puppet_forge-5.0.3/0000755000004100000410000000000014515571425014257 5ustar www-datawww-datapuppet_forge-5.0.3/CODEOWNERS0000644000004100000410000000004614515571425015652 0ustar www-datawww-data* @puppetlabs/forge-team @bastelfreak puppet_forge-5.0.3/README.md0000644000004100000410000002065314515571425015544 0ustar www-datawww-data# Puppet Forge Access and manipulate the [Puppet Forge API](https://forgeapi.puppet.com) from Ruby. ## Installation Add this line to your application's Gemfile: gem 'puppet_forge' And then execute: $ bundle Or install it yourself as: $ gem install puppet_forge ## Requirements * Ruby >= 2.6.0 ## Dependencies * [Faraday]() 2.x * [Typhoeus](https://github.com/typhoeus/typhoeus) ~> 1.0.1 (optional) Typhoeus will be used as the HTTP adapter if it is available, otherwise Net::HTTP will be used. We recommend using Typhoeus for production-level applications. ## Usage First, make sure you have imported the Puppet Forge gem into your application: ```ruby require 'puppet_forge' ``` Next, supply a user-agent string to identify requests sent by your application to the Puppet Forge API: ```ruby PuppetForge.user_agent = "MyApp/1.0.0" ``` Now you can make use of the resource models defined by the gem: * [PuppetForge::V3::User][user_ref] * [PuppetForge::V3::Module][module_ref] * [PuppetForge::V3::Release][release_ref] For convenience, these classes are also aliased as: * [PuppetForge::User][user_ref] * [PuppetForge::Module][module_ref] * [PuppetForge::Release][release_ref] [user_ref]: https://github.com/puppetlabs/forge-ruby/wiki/Resource-Reference#puppetforgeuser [module_ref]: https://github.com/puppetlabs/forge-ruby/wiki/Resource-Reference#puppetforgemodule [release_ref]: https://github.com/puppetlabs/forge-ruby/wiki/Resource-Reference#puppetforgerelease __The aliases will always point to the most modern API implementations for each model.__ You may also use the fully qualified class names (e.g. PuppetForge::V3::User) to ensure your code is forward compatible. See the [Basic Interface](#basic-interface) section below for how to perform common tasks with these models. Please note that PuppetForge models are identified by unique slugs rather than numerical identifiers. The slug format, properties, associations, and methods available on each resource model are documented on the [Resource Reference][resource_ref] page. [resource_ref]: https://github.com/puppetlabs/forge-ruby/wiki/Resource-Reference ### Basic Interface Each of the models uses ActiveRecord-like REST functionality to map over the Forge API endpoints. Most simple ActiveRecord-style interactions function as intended. Currently, only read-only actions are supported. The methods find, where, and all immediately make one API request. ```ruby # Find a Resource by Slug PuppetForge::User.find('puppetlabs') # => # PuppetForge::Module.find('puppetlabs-stdlib') # => # # Find All Resources PuppetForge::Module.all # See "Paginated Collections" below for important info about enumerating resource sets. # Find Resources with Conditions PuppetForge::Module.where(query: 'apache') # See "Paginated Collections" below for important info about enumerating resource sets. PuppetForge::Module.where(query: 'apache').first # => # ``` For compatibility with older versions of the puppet\_forge gem, the following two methods are functionally equivalent. ```ruby PuppetForge::Module.where(query: 'apache') PuppetForge::Module.where(query: 'apache').all # This method is deprecated and not recommended ``` #### Errors All API Requests (whether via find, where, or all) will raise a Faraday::ResourceNotFound error if the request fails. ### Downloading and installing a module release A release tarball can be downloaded and installed by following the steps below. ```ruby release_slug = "puppetlabs-apache-1.6.0" release_tarball = release_slug + ".tar.gz" dest_dir = "/path/to/install/directory" tmp_dir = "/path/to/tmpdir" # Fetch Release information from API # @raise Faraday::ResourceNotFound error if the given release does not exist release = PuppetForge::Release.find release_slug # Download the Release tarball # @raise PuppetForge::ReleaseNotFound error if the given release does not exist release.download(Pathname(release_tarball)) # Verify the MD5 # @raise PuppetForge::V3::Release::ChecksumMismatch error if the file's md5 does not match the API information release.verify(Pathname(release_tarball)) # Unpack the files to a given directory # @raise RuntimeError if it fails to extract the contents of the release tarball PuppetForge::Unpacker.unpack(release_tarball, dest_dir, tmp_dir) ``` ### Uploading a module release You can upload new module versions to the forge by following the steps below. > Note: This API requires authorization. See [Authorization](#authorization) for more information. ```ruby release_tarball = 'pkg/puppetlabs-apache-1.6.0.tar.gz' # Upload a module tarball to the Puppet Forge # Returns an instance of V3::Release class and the response from the forge upload # @raise PuppetForge::ReleaseForbidden if a 403 response is recieved from the server # @raise PuppetForge::ReleaseBadContent if the module to upload is not valid # @raise Faraday::ClientError if any errors encountered in the upload # @raise PuppetForge::FileNotFound if the given tarball cannot be found release, response = PuppetForge::V3::Release.upload(release_tarball) ``` ### Paginated Collections The Forge API only returns paginated collections as of v3. ```ruby PuppetForge::Module.all.total # => 1728 PuppetForge::Module.all.length # => 20 ``` Movement through the collection can be simulated using the `limit` and `offset` parameters, but it's generally preferable to leverage the pagination links provided by the API. For convenience, pagination links are exposed by the library. ```ruby PuppetForge::Module.all.offset # => 0 PuppetForge::Module.all.next_url # => "/v3/modules?limit=20&offset=20" PuppetForge::Module.all.next.offset # => 20 ``` An enumerator exists for iterating over the entire (unpaginated) collection. Keep in mind that this will result in multiple calls to the Forge API. ```ruby PuppetForge::Module.where(query: 'php').total # => 37 PuppetForge::Module.where(query: 'php').unpaginated # => # PuppetForge::Module.where(query: 'php').unpaginated.to_a.length # => 37 ``` ### Associations & Lazy Attributes Associated models are accessible in the API by property name. ```ruby PuppetForge::Module.find('puppetlabs-apache').owner # => # ``` Properties of associated models are then loaded lazily. ```ruby user = PuppetForge::Module.find('puppetlabs-apache').owner # This does not trigger a request user.username # => "puppetlabs" # This *does* trigger a request user.created_at # => "2010-05-19 05:46:26 -0700" ``` ### Configuration To overwrite the default of `https://forgeapi.puppet.com` and set a custom url for the Forge API: ```ruby PuppetForge.host = "https://your-own-api.url/" ``` ### Authorization To authorize your requests with an API key from a Forge user account: ```ruby PuppetForge::Connection.authorization = "" ``` You can generate API keys on your user profile page once you've [logged into the Forge website](https://forge.puppet.com/login). ## Caveats This library currently does no response caching of its own, instead opting to re-issue every request each time. This will be changed in a later release. ## Reporting Issues Please report problems, issues, and feature requests on the public [Puppet Labs issue tracker][issues] under the FORGE project. You will need to create a free account to add new tickets. [issues]: https://tickets.puppetlabs.com/browse/FORGE ## Contributing 1. Fork it ( https://github.com/[my-github-username]/forge-ruby/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request ## Releasing 1. Run the [release_prep] GitHub Action with the new version number, for example, 1.2.3. It will create a new pull request 2. Please check the changelog and ensure all issues/prs have correct labels 3. Run the GitHub Actions [release] workflow, and it will publish a new version on RubyGems [release_prep]: https://github.com/puppetlabs/forge-ruby/actions/workflows/release_prep.yml [release]: https://github.com/puppetlabs/forge-ruby/actions/workflows/release.yml ## Contributors * Pieter van de Bruggen, Puppet Labs * Jesse Scott, Puppet Labs * Austin Blatt, Puppet Labs * Adrien Thebo, Puppet Labs * Anderson Mills, Puppet Labs ## Maintenance Tickets: File at https://tickets.puppet.com/browse/FORGE puppet_forge-5.0.3/spec/0000755000004100000410000000000014515571425015211 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/0000755000004100000410000000000014515571425017062 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/0000755000004100000410000000000014515571425017412 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/modules__owner=puppetlabs.json0000644000004100000410000250424314515571425025535 0ustar www-datawww-data{ "pagination": { "limit": 20, "offset": 0, "first": "/v3/modules?owner=puppetlabs&limit=20&offset=0", "previous": null, "current": "/v3/modules?owner=puppetlabs&limit=20&offset=0", "next": "/v3/modules?owner=puppetlabs&limit=20&offset=20", "total": 76 }, "results": [ { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "downloads": 710089, "created_at": "2011-05-24 18:34:58 -0700", "updated_at": "2014-01-06 14:41:25 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-stdlib-4.1.0", "module": { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "4.1.0", "metadata": { "types": [ { "doc": " A simple resource type intended to be used as an anchor in a composite class.\n\n In Puppet 2.6, when a class declares another class, the resources in the\n interior class are not contained by the exterior class. This interacts badly\n with the pattern of composing complex modules from smaller classes, as it\n makes it impossible for end users to specify order relationships between the\n exterior class and other modules.\n\n The anchor type lets you work around this. By sandwiching any interior\n classes between two no-op resources that _are_ contained by the exterior\n class, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\n This allows the end user of the ntp module to establish require and before\n relationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }\n\n", "parameters": [ { "doc": "The name of the anchor resource.", "name": "name" } ], "name": "anchor", "properties": [ ] }, { "doc": " Ensures that a given line is contained within a file. The implementation\n matches the full line, including whitespace at the beginning and end. If\n the line is not contained in the given file, Puppet will add the line to\n ensure the desired state. Multiple resources may be declared to manage\n multiple lines in the same file.\n\n Example:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\n In this example, Puppet will ensure both of the specified lines are\n contained in the file /etc/sudoers.\n\n", "providers": [ { "doc": "", "name": "ruby" } ], "parameters": [ { "doc": "An arbitrary name used as the identity of the resource.", "name": "name" }, { "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.", "name": "match" }, { "doc": "The line to be appended to the file located by the path parameter.", "name": "line" }, { "doc": "The file Puppet will ensure contains the line specified by the line parameter.", "name": "path" } ], "name": "file_line", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "license": "Apache 2.0", "checksums": { "spec/unit/puppet/parser/functions/uriescape_spec.rb": "8d9e15156d93fe29bfe91a2e83352ff4", "Gemfile": "a7144ac8fdb2255ed7badb6b54f6c342", "spec/unit/facter/root_home_spec.rb": "4f4c4236ac2368d2e27fd2f3eb606a19", "spec/unit/puppet/parser/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", "spec/unit/puppet/parser/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", "spec/unit/puppet/parser/functions/validate_re_spec.rb": "b21292ad2f30c0d43ab2f0c2df0ba7d5", "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a", "lib/puppet/parser/functions/ensure_packages.rb": "ca852b2441ca44b91a984094de4e3afc", "lib/puppet/parser/functions/validate_augeas.rb": "d4acca7b8a9fdada9ae39e5101902cc1", "spec/unit/puppet/parser/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", "tests/has_ip_network.pp": "abc05686797a776ea8c054657e6f7456", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", "spec/unit/puppet/parser/functions/any2array_spec.rb": "167e114cfa222de971bf8be141766b6a", "spec/unit/facter/pe_required_facts_spec.rb": "0ec83db2a004a0d7f6395b34939c53b9", "spec/unit/puppet/parser/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", "lib/facter/root_home.rb": "f559294cceafcf70799339627d94871d", "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", "spec/unit/puppet/parser/functions/is_float_spec.rb": "171fc0e382d9856c2d8db2b70c9ec9cd", "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", "lib/facter/facter_dot_d.rb": "b35b8b59ec579901444f984127f0b833", "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", "spec/spec_helper.rb": "4449b0cafd8f7b2fb440c0cdb0a1f2b3", "lib/puppet/parser/functions/merge.rb": "52281fe881b762e2adfef20f58dc4180", "lib/puppet/parser/functions/validate_slength.rb": "0ca530d1d3b45c3fe2d604c69acfc22f", "spec/unit/puppet/parser/functions/suffix_spec.rb": "c3eed8e40066f2ad56264405c4192f2e", "spec/unit/puppet/parser/functions/validate_bool_spec.rb": "32a580f280ba62bf17ccd30460d357bd", "spec/unit/puppet/parser/functions/str2bool_spec.rb": "60e3eaea48b0f6efccc97010df7d912c", "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", "lib/puppet/parser/functions/delete.rb": "9b17b9f7f820adf02360147c1a2f4279", "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", "LICENSE": "38a048b9d82e713d4e1b2573e370a756", "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", "spec/unit/puppet/parser/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", "spec/unit/puppet/parser/functions/validate_array_spec.rb": "bcd231229554785c4270ca92ef99cb60", "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", "lib/puppet/parser/functions/is_numeric.rb": "0a9bcc49e8f57af81bdfbb7e7c3a575c", "spec/unit/puppet/parser/functions/merge_spec.rb": "a63c0bc2f812e27fbef570d834ef61ce", "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba", "spec/unit/puppet/parser/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", "spec/monkey_patches/publicize_methods.rb": "ce2c98f38b683138c5ac649344a39276", "spec/unit/puppet/parser/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", "lib/puppet/parser/functions/chop.rb": "4691a56e6064b792ed4575e4ad3f3d20", "spec/unit/puppet/parser/functions/validate_cmd_spec.rb": "538db08292a0ecc4cd902a14aaa55d74", "spec/unit/puppet/parser/functions/is_integer_spec.rb": "a302cf1de5ccb494ca9614d2fc2b53c5", "spec/functions/ensure_resource_spec.rb": "3423a445e13efc7663a71c6641d49d07", "spec/unit/puppet/parser/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", "lib/puppet/parser/functions/dirname.rb": "bef7214eb89db3eb8f7ee5fc9dca0233", "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", "spec/unit/puppet/parser/functions/delete_spec.rb": "0d84186ea618523b4b2a4ca0b5a09c9e", "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", "spec/unit/puppet/parser/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", "spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb": "c67b71737bee9936f5261d41a37bad46", "spec/unit/puppet/parser/functions/concat_spec.rb": "c21aaa84609f92290d5ffb2ce8ea4bf5", "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", "CHANGELOG": "344383410cb78409f0c59ecf38e8c21a", "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", "spec/unit/puppet/parser/functions/validate_string_spec.rb": "64a4f681084cba55775a070f7fab5e0c", "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", "lib/puppet/parser/functions/pick.rb": "2bede116a0651405c47e650bbf942abe", "spec/unit/puppet/parser/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", "lib/puppet/parser/functions/ensure_resource.rb": "3f68b8e17a16bfd01455cd73f8e324ba", "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce", "spec/unit/puppet/parser/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", "spec/unit/puppet/parser/functions/num2bool_spec.rb": "8cd5b46b7c8e612dfae3362e3a68a5f9", "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", "lib/puppet/parser/functions/join.rb": "b28087823456ca5cf943de4a233ac77f", "spec/unit/puppet/parser/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", "spec/unit/puppet/parser/functions/validate_augeas_spec.rb": "1d5bcfbf97dc56b45734248a14358d4f", "spec/unit/puppet/parser/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", "lib/puppet/parser/functions/is_function_available.rb": "88c63869cb5df3402bc9756a8d40c16d", "lib/puppet/parser/functions/prefix.rb": "21fd6a2c1ee8370964346b3bfe829d2b", "spec/watchr.rb": "b588ddf9ef1c19ab97aa892cc776da73", "spec/unit/puppet/parser/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", "spec/unit/puppet/parser/functions/validate_slength_spec.rb": "a1b4d805149dc0143e9a57e43e1f84bf", "spec/functions/ensure_packages_spec.rb": "935b4aec5ab36bdd0458c1a9b2a93ad5", "lib/puppet/parser/functions/suffix.rb": "109279db4180441e75545dbd5f273298", "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", "spec/unit/puppet/parser/functions/count_spec.rb": "db98ef89752a7112425f0aade10108e0", "lib/puppet/parser/functions/hash.rb": "9d072527dfc7354b69292e9302906530", "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", "spec/unit/puppet/parser/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", "spec/unit/puppet/parser/functions/get_module_path_spec.rb": "b7ea196f548b1a9a745ab6671295ab27", "lib/puppet/parser/functions/is_integer.rb": "a50ebc15c30bffd759e4a6f8ec6a0cf3", "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", "spec/unit/puppet/parser/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", "spec/unit/puppet/parser/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", "spec/unit/puppet/parser/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", "lib/puppet/parser/functions/chomp.rb": "719d46923d75251f7b6b68b6e015cccc", "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", "spec/unit/puppet/parser/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", "Modulefile": "351bba73290cd526ca7bacd4c7d250dc", "spec/unit/puppet/parser/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", "spec/unit/puppet/type/file_line_spec.rb": "d9f4e08e8b98e565a07f1b995593fa89", "spec/unit/puppet/parser/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", "lib/puppet/parser/functions/concat.rb": "f28a09811ff4d19bb5e7a540e767d65c", "spec/unit/puppet/parser/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", "tests/init.pp": "1d98070412c76824e66db4b7eb74d433", "lib/puppet/provider/file_line/ruby.rb": "a445a57f9b884037320ea37307dbc92b", "tests/has_ip_address.pp": "93ce02915f67ddfb43a049b2b84ef391", "spec/unit/puppet/parser/functions/min_spec.rb": "bf80bf58261117bb24392670b624a611", "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", "lib/puppet/type/file_line.rb": "3e8222cb58f3503b3ea7de3647c602a0", "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", "spec/functions/getparam_spec.rb": "122f37cf9ec7489f1dae10db39c871b5", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "spec/unit/puppet/parser/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", "spec/unit/puppet/parser/functions/max_spec.rb": "5562bccc643443af7e4fa7c9d1e52b8b", "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", "spec/unit/puppet/parser/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", "spec/unit/puppet/parser/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", "spec/unit/puppet/parser/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", "spec/unit/puppet/parser/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", "spec/unit/puppet/parser/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", "lib/puppet/parser/functions/is_domain_name.rb": "fba9f855df3bbf90d72dfd5201f65d2b", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e8cd7432739cb212d40a9148523bd4d7", "spec/unit/puppet/parser/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", "spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb": "1de174be8835ba6fef86b590887bb2cc", "spec/unit/puppet/parser/functions/prefix_spec.rb": "16a95b321d76e773812693c80edfbe36", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "lib/puppet/parser/functions/uriescape.rb": "9ebc34f1b2f319626512b8cd7cde604c", "lib/puppet/parser/functions/floor.rb": "c5a960e9714810ebb99198ff81a11a3b", "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", "spec/unit/puppet/parser/functions/range_spec.rb": "91d69115dea43f62a2dca9a10467d836", "tests/has_interface_with.pp": "59c98b4af0d39fc11d1ef4c7a6dc8f7a", "spec/unit/puppet/parser/functions/is_function_available.rb": "069ef7490eba66424cab75444f36828a", "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", "spec/unit/puppet/parser/functions/flatten_spec.rb": "583c9a70f93e492cfb22ffa1811f6aa0", "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", "lib/puppet/parser/functions/str2bool.rb": "c822a8944747f5624b13f2da0df8db21", "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", "spec/unit/puppet/parser/functions/validate_hash_spec.rb": "8529c74051ceb71e6b1b97c9cecdf625", "spec/unit/puppet/parser/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", "README.markdown": "b63097a958f22abf7999d475a6a4d32a", "spec/unit/puppet/parser/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", "lib/puppet/parser/functions/validate_cmd.rb": "0319a15d24fd077ebabc2f79969f6ab5", "lib/puppet/parser/functions/is_float.rb": "f1b0d333061d31bf0c25bd4c33dc134b", "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", "lib/puppet/parser/functions/validate_bool.rb": "4ddffdf5954b15863d18f392950b88f4", "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", "spec/unit/puppet/parser/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", "spec/unit/puppet/parser/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", "spec/unit/puppet/parser/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", "spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb": "07839082d24d5a7628fd5bce6c8b35c3", "spec/unit/puppet/parser/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", "spec/unit/puppet/type/anchor_spec.rb": "a5478a72a7fab2d215f39982a9230c18", "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", "spec/unit/puppet/parser/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", "spec/unit/puppet/parser/functions/floor_spec.rb": "d01ef7dfe0245d7a0a73d7df13cb02e3", "spec/unit/puppet/parser/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", "spec/unit/puppet/parser/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00", "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", "spec/classes/anchor_spec.rb": "695d65275c3ac310d7fa23b91f8bbb4a", "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", "spec/unit/puppet/parser/functions/pick_spec.rb": "aba6247d3925e373272fca6768fd5403", "spec/unit/puppet/parser/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", "spec/unit/puppet/parser/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", "spec/unit/puppet/parser/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", "spec/unit/facter/util/puppet_settings_spec.rb": "345bcbef720458e25be0190b7638e4d9", "spec/unit/puppet/parser/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", "spec/unit/puppet/parser/functions/dirname_spec.rb": "1d7cf70468c2cfa6dacfc75935322395", "spec/unit/puppet/parser/functions/delete_at_spec.rb": "5a4287356b5bd36a6e4c100421215b8e", "spec/unit/puppet/parser/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", "spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", "lib/puppet/parser/functions/range.rb": "033048bba333fe429e77e0f2e91db25f", "lib/puppet/parser/functions/parseyaml.rb": "00f10ec1e2b050e23d80c256061ebdd7", "spec/unit/puppet/parser/functions/is_numeric_spec.rb": "5f08148803b6088c27b211c446ad3658", "spec/unit/puppet/parser/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6", "CONTRIBUTING.md": "fdddc4606dc3b6949e981e6bf50bc8e5" }, "version": "4.1.0", "description": "Standard Library for Puppet Modules", "source": "git://github.com/puppetlabs/puppetlabs-stdlib.git", "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", "summary": "Puppet Module Standard Library", "dependencies": [ ], "author": "puppetlabs", "name": "puppetlabs-stdlib" }, "tags": [ "puppetlabs", "library", "stdlib", "standard", "stages" ], "file_uri": "/v3/files/puppetlabs-stdlib-4.1.0.tar.gz", "file_size": 67586, "file_md5": "bbf919d7ee9d278d2facf39c25578bf8", "downloads": 628084, "readme": "

Puppet Labs Standard Library

\n\n

\"Build

\n\n

This module provides a "standard library" of resources for developing Puppet\nModules. This modules will include the following additions to Puppet

\n\n
    \n
  • Stages
  • \n
  • Facts
  • \n
  • Functions
  • \n
  • Defined resource types
  • \n
  • Types
  • \n
  • Providers
  • \n
\n\n

This module is officially curated and provided by Puppet Labs. The modules\nPuppet Labs writes and distributes will make heavy use of this standard\nlibrary.

\n\n

To report or research a bug with any part of this module, please go to\nhttp://projects.puppetlabs.com/projects/stdlib

\n\n

Versions

\n\n

This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of Puppet\nEnterprise and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically "merged up" into main. The current\nlist of integration branches are:

\n\n
    \n
  • v2.1.x (v2.1.1 released in PE 1)
  • \n
  • v2.2.x (Never released as part of PE, only to the Forge)
  • \n
  • v2.3.x (Released in PE 2)
  • \n
  • v3.0.x (Never released as part of PE, only to the Forge)
  • \n
  • v4.0.x (Drops support for Puppet 2.7)
  • \n
  • main (mainline development branch)
  • \n
\n\n

The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.

\n\n

Compatibility

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Puppet Versions< 2.62.62.73.x
stdlib 2.xnoyesyesno
stdlib 3.xnonoyesyes
stdlib 4.xnononoyes
\n\n

The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.

\n\n

stdlib 2.x

\n\n

All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.

\n\n

stdlib 3.x

\n\n

The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2 and Puppet 3.

\n\n

stdlib 4.x

\n\n

The 4.0 major release of stdlib drops support for Puppet 2.7. Stdlib 4.x\nsupports Puppet 3. Notably, ruby 1.8.5 is no longer supported though ruby\n1.8.7, 1.9.3, and 2.0.0 are fully supported.

\n\n

Functions

\n\n

abs

\n\n

Returns the absolute value of a number, for example -34.56 becomes\n34.56. Takes a single integer and float value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

any2array

\n\n

This converts any object to an array containing that object. Empty argument\nlists are converted to an empty array. Arrays are left untouched. Hashes are\nconverted to arrays of alternating keys and values.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

bool2num

\n\n

Converts a boolean to a number. Converts the values:\nfalse, f, 0, n, and no to 0\ntrue, t, 1, y, and yes to 1\n Requires a single boolean or string as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

capitalize

\n\n

Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chomp

\n\n

Removes the record separator from the end of a string or an array of\nstrings, for example hello\\n becomes hello.\nRequires a single string or array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chop

\n\n

Returns a new string with the last character removed. If the string ends\nwith \\r\\n, both characters are removed. Applying chop to an empty\nstring returns an empty string. If you wish to merely remove record\nseparators then you should use the chomp function.\nRequires a string or array of strings as input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

concat

\n\n

Appends the contents of array 2 onto array 1.

\n\n

Example:

\n\n
concat(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n

['1','2','3','4','5','6']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

count

\n\n

Takes an array as first argument and an optional second argument.\nCount the number of elements in array that matches second argument.\nIf called with only an array it counts the number of elements that are not nil/undef.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

defined_with_params

\n\n

Takes a resource reference and an optional hash of attributes.

\n\n

Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.

\n\n
user { 'dan':\n  ensure => present,\n}\n\nif ! defined_with_params(User[dan], {'ensure' => 'present' }) {\n  user { 'dan': ensure => present, }\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete

\n\n

Deletes all instances of a given element from an array, substring from a\nstring, or key from a hash.

\n\n

Examples:

\n\n
delete(['a','b','c','b'], 'b')\nWould return: ['a','c']\n\ndelete({'a'=>1,'b'=>2,'c'=>3}, 'b')\nWould return: {'a'=>1,'c'=>3}\n\ndelete('abracadabra', 'bra')\nWould return: 'acada'\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete_at

\n\n

Deletes a determined indexed value from an array.

\n\n

Examples:

\n\n
delete_at(['a','b','c'], 1)\n
\n\n

Would return: ['a','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

dirname

\n\n

Returns the dirname of a path.

\n\n

Examples:

\n\n
dirname('/path/to/a/file.ext')\n
\n\n

Would return: '/path/to/a'

\n\n

downcase

\n\n

Converts the case of a string or all strings in an array to lower case.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

empty

\n\n

Returns true if the variable is empty.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

ensure_packages

\n\n

Takes a list of packages and only installs them if they don't already exist.

\n\n
    \n
  • Type: statement
  • \n
\n\n

ensure_resource

\n\n

Takes a resource type, title, and a list of attributes that describe a\nresource.

\n\n
user { 'dan':\n  ensure => present,\n}\n
\n\n

This example only creates the resource if it does not already exist:

\n\n
ensure_resource('user, 'dan', {'ensure' => 'present' })\n
\n\n

If the resource already exists but does not match the specified parameters,\nthis function will attempt to recreate the resource leading to a duplicate\nresource definition error.

\n\n

An array of resources can also be passed in and each will be created with\nthe type and parameters specified if it doesn't already exist.

\n\n
ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

flatten

\n\n

This function flattens any deeply nested arrays and returns a single flat array\nas a result.

\n\n

Examples:

\n\n
flatten(['a', ['b', ['c']]])\n
\n\n

Would return: ['a','b','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

floor

\n\n

Returns the largest integer less or equal to the argument.\nTakes a single numeric value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

fqdn_rotate

\n\n

Rotates an array a random number of times based on a nodes fqdn.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

get_module_path

\n\n

Returns the absolute path of the specified module for the current\nenvironment.

\n\n

Example:\n $module_path = get_module_path('stdlib')

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getparam

\n\n

Takes a resource reference and name of the parameter and\nreturns value of resource's parameter.

\n\n

Examples:

\n\n
define example_resource($param) {\n}\n\nexample_resource { "example_resource_instance":\n    param => "param_value"\n}\n\ngetparam(Example_resource["example_resource_instance"], "param")\n
\n\n

Would return: param_value

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getvar

\n\n

Lookup a variable in a remote namespace.

\n\n

For example:

\n\n
$foo = getvar('site::data::foo')\n# Equivalent to $foo = $site::data::foo\n
\n\n

This is useful if the namespace itself is stored in a string:

\n\n
$datalocation = 'site::data'\n$bar = getvar("${datalocation}::bar")\n# Equivalent to $bar = $site::data::bar\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

grep

\n\n

This function searches through an array and returns any elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
grep(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['aaa','aaaddd']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_interface_with

\n\n

Returns boolean based on kind and value:

\n\n
    \n
  • macaddress
  • \n
  • netmask
  • \n
  • ipaddress
  • \n
  • network
  • \n
\n\n

has_interface_with("macaddress", "x:x:x:x:x:x")\nhas_interface_with("ipaddress", "127.0.0.1") => true\netc.

\n\n

If no "kind" is given, then the presence of the interface is checked:\nhas_interface_with("lo") => true

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_address

\n\n

Returns true if the client has the requested IP address on some interface.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'ipaddress_IFACE' facts, performing a simple string comparison.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_network

\n\n

Returns true if the client has an IP address within the requested network.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'network_IFACE' facts, performing a simple string comparision.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_key

\n\n

Determine if a hash has a certain key value.

\n\n

Example:

\n\n
$my_hash = {'key_one' => 'value_one'}\nif has_key($my_hash, 'key_two') {\n  notice('we will not reach here')\n}\nif has_key($my_hash, 'key_one') {\n  notice('this will be printed')\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

hash

\n\n

This function converts an array into a hash.

\n\n

Examples:

\n\n
hash(['a',1,'b',2,'c',3])\n
\n\n

Would return: {'a'=>1,'b'=>2,'c'=>3}

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_array

\n\n

Returns true if the variable passed to this function is an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_domain_name

\n\n

Returns true if the string passed to this function is a syntactically correct domain name.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_float

\n\n

Returns true if the variable passed to this function is a float.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_function_available

\n\n

This function accepts a string as an argument, determines whether the\nPuppet runtime has access to a function by that name. It returns a\ntrue if the function exists, false if not.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_hash

\n\n

Returns true if the variable passed to this function is a hash.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_integer

\n\n

Returns true if the variable returned to this string is an integer.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_ip_address

\n\n

Returns true if the string passed to this function is a valid IP address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_mac_address

\n\n

Returns true if the string passed to this function is a valid mac address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_numeric

\n\n

Returns true if the variable passed to this function is a number.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_string

\n\n

Returns true if the variable passed to this function is a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join

\n\n

This function joins an array into a string using a seperator.

\n\n

Examples:

\n\n
join(['a','b','c'], ",")\n
\n\n

Would result in: "a,b,c"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join_keys_to_values

\n\n

This function joins each key of a hash to that key's corresponding value with a\nseparator. Keys and values are cast to strings. The return value is an array in\nwhich each element is one joined key/value pair.

\n\n

Examples:

\n\n
join_keys_to_values({'a'=>1,'b'=>2}, " is ")\n
\n\n

Would result in: ["a is 1","b is 2"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

keys

\n\n

Returns the keys of a hash as an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

loadyaml

\n\n

Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.

\n\n

For example:

\n\n
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

lstrip

\n\n

Strips leading spaces to the left of a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

max

\n\n

Returns the highest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

member

\n\n

This function determines if a variable is a member of an array.

\n\n

Examples:

\n\n
member(['a','b'], 'b')\n
\n\n

Would return: true

\n\n
member(['a','b'], 'c')\n
\n\n

Would return: false

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

merge

\n\n

Merges two or more hashes together and returns the resulting hash.

\n\n

For example:

\n\n
$hash1 = {'one' => 1, 'two', => 2}\n$hash2 = {'two' => 'dos', 'three', => 'tres'}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash =  {'one' => 1, 'two' => 'dos', 'three' => 'tres'}\n
\n\n

When there is a duplicate key, the key in the rightmost hash will "win."

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

min

\n\n

Returns the lowest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

num2bool

\n\n

This function converts a number or a string representation of a number into a\ntrue boolean. Zero or anything non-numeric becomes false. Numbers higher then 0\nbecome true.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parsejson

\n\n

This function accepts JSON as a string and converts into the correct Puppet\nstructure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parseyaml

\n\n

This function accepts YAML as a string and converts it into the correct\nPuppet structure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

pick

\n\n

This function is similar to a coalesce function in SQL in that it will return\nthe first value in a list of values that is not undefined or an empty string\n(two things in Puppet that will return a boolean false value). Typically,\nthis function is used to check for a value in the Puppet Dashboard/Enterprise\nConsole, and failover to a default value like the following:

\n\n
$real_jenkins_version = pick($::jenkins_version, '1.449')\n
\n\n

The value of $real_jenkins_version will first look for a top-scope variable\ncalled 'jenkins_version' (note that parameters set in the Puppet Dashboard/\nEnterprise Console are brought into Puppet as top-scope variables), and,\nfailing that, will use a default value of 1.449.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

prefix

\n\n

This function applies a prefix to all elements in an array.

\n\n

Examples:

\n\n
prefix(['a','b','c'], 'p')\n
\n\n

Will return: ['pa','pb','pc']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

range

\n\n

When given range in the form of (start, stop) it will extrapolate a range as\nan array.

\n\n

Examples:

\n\n
range("0", "9")\n
\n\n

Will return: [0,1,2,3,4,5,6,7,8,9]

\n\n
range("00", "09")\n
\n\n

Will return: 0,1,2,3,4,5,6,7,8,9

\n\n
range("a", "c")\n
\n\n

Will return: ["a","b","c"]

\n\n
range("host01", "host10")\n
\n\n

Will return: ["host01", "host02", ..., "host09", "host10"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reject

\n\n

This function searches through an array and rejects all elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
reject(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['bbb','ccc']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reverse

\n\n

Reverses the order of a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

rstrip

\n\n

Strips leading spaces to the right of the string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

shuffle

\n\n

Randomizes the order of a string or array elements.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

size

\n\n

Returns the number of elements in a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

sort

\n\n

Sorts strings and arrays lexically.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

squeeze

\n\n

Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2bool

\n\n

This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to 'true' and strings that contain things\nlike: 0, f, n, false, no to 'false'.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2saltedsha512

\n\n

This converts a string to a salted-SHA512 password hash (which is used for\nOS X versions >= 10.7). Given any simple string, you will get a hex version\nof a salted-SHA512 password hash that can be inserted into your Puppet\nmanifests as a valid password attribute.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strftime

\n\n

This function returns formatted time.

\n\n

Examples:

\n\n

To return the time since epoch:

\n\n
strftime("%s")\n
\n\n

To return the date:

\n\n
strftime("%Y-%m-%d")\n
\n\n

Format meaning:

\n\n
%a - The abbreviated weekday name (``Sun'')\n%A - The  full  weekday  name (``Sunday'')\n%b - The abbreviated month name (``Jan'')\n%B - The  full  month  name (``January'')\n%c - The preferred local date and time representation\n%C - Century (20 in 2009)\n%d - Day of the month (01..31)\n%D - Date (%m/%d/%y)\n%e - Day of the month, blank-padded ( 1..31)\n%F - Equivalent to %Y-%m-%d (the ISO 8601 date format)\n%h - Equivalent to %b\n%H - Hour of the day, 24-hour clock (00..23)\n%I - Hour of the day, 12-hour clock (01..12)\n%j - Day of the year (001..366)\n%k - hour, 24-hour clock, blank-padded ( 0..23)\n%l - hour, 12-hour clock, blank-padded ( 0..12)\n%L - Millisecond of the second (000..999)\n%m - Month of the year (01..12)\n%M - Minute of the hour (00..59)\n%n - Newline (\n
\n\n

)\n %N - Fractional seconds digits, default is 9 digits (nanosecond)\n %3N millisecond (3 digits)\n %6N microsecond (6 digits)\n %9N nanosecond (9 digits)\n %p - Meridian indicator (AM'' orPM'')\n %P - Meridian indicator (am'' orpm'')\n %r - time, 12-hour (same as %I:%M:%S %p)\n %R - time, 24-hour (%H:%M)\n %s - Number of seconds since 1970-01-01 00:00:00 UTC.\n %S - Second of the minute (00..60)\n %t - Tab character ( )\n %T - time, 24-hour (%H:%M:%S)\n %u - Day of the week as a decimal, Monday being 1. (1..7)\n %U - Week number of the current year,\n starting with the first Sunday as the first\n day of the first week (00..53)\n %v - VMS date (%e-%b-%Y)\n %V - Week number of year according to ISO 8601 (01..53)\n %W - Week number of the current year,\n starting with the first Monday as the first\n day of the first week (00..53)\n %w - Day of the week (Sunday is 0, 0..6)\n %x - Preferred representation for the date alone, no time\n %X - Preferred representation for the time alone, no date\n %y - Year without a century (00..99)\n %Y - Year with century\n %z - Time zone as hour offset from UTC (e.g. +0900)\n %Z - Time zone name\n %% - Literal ``%'' character

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strip

\n\n

This function removes leading and trailing whitespace from a string or from\nevery string inside an array.

\n\n

Examples:

\n\n
strip("    aaa   ")\n
\n\n

Would result in: "aaa"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

suffix

\n\n

This function applies a suffix to all elements in an array.

\n\n

Examples:

\n\n
suffix(['a','b','c'], 'p')\n
\n\n

Will return: ['ap','bp','cp']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

swapcase

\n\n

This function will swap the existing case of a string.

\n\n

Examples:

\n\n
swapcase("aBcD")\n
\n\n

Would result in: "AbCd"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

time

\n\n

This function will return the current time since epoch as an integer.

\n\n

Examples:

\n\n
time()\n
\n\n

Will return something like: 1311972653

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

to_bytes

\n\n

Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

type

\n\n

Returns the type when passed a variable. Type can be one of:

\n\n
    \n
  • string
  • \n
  • array
  • \n
  • hash
  • \n
  • float
  • \n
  • integer
  • \n
  • boolean

  • \n
  • Type: rvalue

  • \n
\n\n

unique

\n\n

This function will remove duplicates from strings and arrays.

\n\n

Examples:

\n\n
unique("aabbcc")\n
\n\n

Will return:

\n\n
abc\n
\n\n

You can also use this with arrays:

\n\n
unique(["a","a","b","b","c","c"])\n
\n\n

This returns:

\n\n
["a","b","c"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

upcase

\n\n

Converts a string or an array of strings to uppercase.

\n\n

Examples:

\n\n
upcase("abcd")\n
\n\n

Will return:

\n\n
ASDF\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

uriescape

\n\n

Urlencodes a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

validate_absolute_path

\n\n

Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.

\n\n

The following values will pass:

\n\n
$my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"\nvalidate_absolute_path($my_path)\n$my_path2 = "/var/lib/puppet"\nvalidate_absolute_path($my_path2)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_absolute_path(true)\nvalidate_absolute_path([ 'var/lib/puppet', '/var/foo' ])\nvalidate_absolute_path([ '/var/lib/puppet', 'var/foo' ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_array

\n\n

Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_array = [ 'one', 'two' ]\nvalidate_array($my_array)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_array(true)\nvalidate_array('some_string')\n$undefined = undef\nvalidate_array($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_augeas

\n\n

Perform validation of a string using an Augeas lens\nThe first argument of this function should be a string to\ntest, and the second argument should be the name of the Augeas lens to use.\nIf Augeas fails to parse the string with the lens, the compilation will\nabort with a parse error.

\n\n

A third argument can be specified, listing paths which should\nnot be found in the file. The $file variable points to the location\nof the temporary file being tested in the Augeas tree.

\n\n

For example, if you want to make sure your passwd content never contains\na user foo, you could write:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo'])\n
\n\n

Or if you wanted to ensure that no users used the '/bin/barsh' shell,\nyou could use:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]']\n
\n\n

If a fourth argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n
validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_bool

\n\n

Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
$some_array = [ true ]\nvalidate_bool("false")\nvalidate_bool("true")\nvalidate_bool($some_array)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_cmd

\n\n

Perform validation of a string with an external command.\nThe first argument of this function should be a string to\ntest, and the second argument should be a path to a test command\ntaking a file as last argument. If the command, launched against\na tempfile containing the passed string, returns a non-null value,\ncompilation will abort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n

Example:

\n\n
validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_hash

\n\n

Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_hash = { 'one' => 'two' }\nvalidate_hash($my_hash)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_hash(true)\nvalidate_hash('some_string')\n$undefined = undef\nvalidate_hash($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_re

\n\n

Perform simple validation of a string against one or more regular\nexpressions. The first argument of this function should be a string to\ntest, and the second argument should be a stringified regular expression\n(without the // delimiters) or an array of regular expressions. If none\nof the regular expressions match the string passed in, compilation will\nabort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

The following strings will validate against the regular expressions:

\n\n
validate_re('one', '^one$')\nvalidate_re('one', [ '^one', '^two' ])\n
\n\n

The following strings will fail to validate, causing compilation to abort:

\n\n
validate_re('one', [ '^two', '^three' ])\n
\n\n

A helpful error message can be returned like this:

\n\n
validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_slength

\n\n

Validate that the first argument is a string (or an array of strings), and\nless/equal to than the length of the second argument. It fails if the first\nargument is not a string or array of strings, and if arg 2 is not convertable\nto a number.

\n\n

The following values will pass:

\n\n

validate_slength("discombobulate",17)\n validate_slength(["discombobulate","moo"],17)

\n\n

The following valueis will not:

\n\n

validate_slength("discombobulate",1)\n validate_slength(["discombobulate","thermometer"],5)

\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_string

\n\n

Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_string = "one two"\nvalidate_string($my_string, 'three')\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_string(true)\nvalidate_string([ 'some', 'array' ])\n$undefined = undef\nvalidate_string($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

values

\n\n

When given a hash this function will return the values of that hash.

\n\n

Examples:

\n\n
$hash = {\n  'a' => 1,\n  'b' => 2,\n  'c' => 3,\n}\nvalues($hash)\n
\n\n

This example would return:

\n\n
[1,2,3]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

values_at

\n\n

Finds value inside an array based on location.

\n\n

The first argument is the array you want to analyze, and the second element can\nbe a combination of:

\n\n
    \n
  • A single numeric index
  • \n
  • A range in the form of 'start-stop' (eg. 4-9)
  • \n
  • An array combining the above
  • \n
\n\n

Examples:

\n\n
values_at(['a','b','c'], 2)\n
\n\n

Would return ['c'].

\n\n
values_at(['a','b','c'], ["0-1"])\n
\n\n

Would return ['a','b'].

\n\n
values_at(['a','b','c','d','e'], [0, "2-3"])\n
\n\n

Would return ['a','c','d'].

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

zip

\n\n

Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.

\n\n

Example:

\n\n
zip(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n
["1", "4"], ["2", "5"], ["3", "6"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

This page autogenerated on 2013-04-11 13:54:25 -0700

\n
", "changelog": "
2013-05-06 - Jeff McCune <jeff@puppetlabs.com> - 4.1.0\n * (#20582) Restore facter_dot_d to stdlib for PE users (3b887c8)\n * (maint) Update Gemfile with GEM_FACTER_VERSION (f44d535)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> - 4.1.0\n * Terser method of string to array conversion courtesy of ethooz. (d38bce0)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Refactor ensure_resource expectations (b33cc24)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Changed str-to-array conversion and removed abbreviation. (de253db)\n\n2013-05-03 - Alex Cline <acline@us.ibm.com> 4.1.0\n * (#20548) Allow an array of resource titles to be passed into the ensure_resource function (e08734a)\n\n2013-05-02 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.1.0\n * Add a dirname function (2ba9e47)\n\n2013-04-29 - Mark Smith-Guerrero <msmithgu@gmail.com> - 4.1.0\n * (maint) Fix a small typo in hash() description (928036a)\n\n2013-04-12 - Jeff McCune <jeff@puppetlabs.com> - 4.0.2\n * Update user information in gemspec to make the intent of the Gem clear.\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.1\n * Fix README function documentation (ab3e30c)\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * stdlib 4.0 drops support with Puppet 2.7\n * stdlib 4.0 preserves support with Puppet 3\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add ability to use puppet from git via bundler (9c5805f)\n\n2013-04-10 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Make stdlib usable as a Ruby GEM (e81a45e)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Add a count function (f28550e)\n\n2013-03-31 - Amos Shapira <ashapira@atlassian.com> - 4.0.0\n * (#19998) Implement any2array (7a2fb80)\n\n2013-03-29 - Steve Huff <shuff@vecna.org> - 4.0.0\n * (19864) num2bool match fix (8d217f0)\n\n2013-03-20 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Allow comparisons of Numeric and number as String (ff5dd5d)\n\n2013-03-26 - Richard Soderberg <rsoderberg@mozilla.com> - 4.0.0\n * add suffix function to accompany the prefix function (88a93ac)\n\n2013-03-19 - Kristof Willaert <kristof.willaert@gmail.com> - 4.0.0\n * Add floor function implementation and unit tests (0527341)\n\n2012-04-03 - Eric Shamow <eric@puppetlabs.com> - 4.0.0\n * (#13610) Add is_function_available to stdlib (961dcab)\n\n2012-12-17 - Justin Lambert <jlambert@eml.cc> - 4.0.0\n * str2bool should return a boolean if called with a boolean (5d5a4d4)\n\n2012-10-23 - Uwe Stuehler <ustuehler@team.mobile.de> - 4.0.0\n * Fix number of arguments check in flatten() (e80207b)\n\n2013-03-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add contributing document (96e19d0)\n\n2013-03-04 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)\n\n2013-02-14 - Joshua Hoblitt <jhoblitt@cpan.org> - 4.0.0\n * (#19272) Add has_element() function (95cf3fe)\n\n2013-02-07 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_augeas function (3a97c23)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_cmd function (6902cc5)\n\n2013-01-14 - David Schmitt <david@dasz.at> - 4.0.0\n * Add geppetto project definition (b3fc0a3)\n\n2013-01-02 - Jaka Hudoklin <jakahudoklin@gmail.com> - 4.0.0\n * Add getparam function to get defined resource parameters (20e0e07)\n\n2013-01-05 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Add Travis CI Support (d082046)\n\n2012-12-04 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Clarify that stdlib 3 supports Puppet 3 (3a6085f)\n\n2012-11-30 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * maint: style guideline fixes (7742e5f)\n\n2012-11-09 - James Fryman <james@frymanet.com> - 4.0.0\n * puppet-lint cleanup (88acc52)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 4.0.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)\n\n2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0\n * (#14670) autorequire a file_line resource's path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0\n * stdlib 3.0 drops support with Puppet 2.6\n * stdlib 3.0 preserves support with Puppet 2.7\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0\n * Add support for a 'match' parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0\n * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2\n * Make file_line default to ensure => present (1373e70)\n * Memoize file_line spec instance variables (20aacc5)\n * Fix spec tests using the new spec_helper (1ebfa5d)\n * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)\n * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)\n * (#13439) Fix test failures with Puppet 2.6.x (665610b)\n * (#13439) refactor spec helper for compatibility with both puppet 2.7 and main (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3\n* (#11607) Add Rakefile to enable spec testing\n* (#12377) Avoid infinite loop when retrying require json\n\n2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0\n* Add a large number of new Puppet functions\n* Backwards compatibility preserved with 2.2.x\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0\n* #10285 - Refactor json to use pson instead.\n* Maint  - Add watchr autotest script\n* Maint  - Make rspec tests work with Puppet 2.6.4\n* #9859  - Add root_home fact and tests\n\n2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* /etc/facter/facts.d\n* /etc/puppetlabs/facter/facts.d\n\n2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0\n* Add R.I. Pienaar's facts.d custom facter fact\n* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are\n  automatically loaded now.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0\n* Rename whole_line to file_line\n* This is an API change and as such motivating a 2.0.0 release according to semver.org.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0\n* Rename append_line to whole_line\n* This is an API change and as such motivating a 1.1.0 release.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0\n* Initial stable release\n* Add validate_array and validate_string functions\n* Make merge() function work with Ruby 1.8.5\n* Add hash merging function\n* Add has_key function\n* Add loadyaml() function\n* Add append_line native\n\n2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Add stdlib::stages class with a standard set of stages\n
", "license": "
Copyright (C) 2011 Puppet Labs Inc\n\nand some parts:\n\nCopyright (C) 2011 Krzysztof Wilczynski\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-05-13 08:31:19 -0700", "updated_at": "2013-05-13 08:31:19 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-stdlib-4.1.0", "version": "4.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.2.0", "version": "3.2.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.1.1", "version": "3.1.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.1.0", "version": "3.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.0.1", "version": "3.0.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.6.0", "version": "2.6.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.5.1", "version": "2.5.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.5.0", "version": "2.5.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.4.0", "version": "2.4.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.3", "version": "2.3.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.2", "version": "2.3.2" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.1", "version": "2.3.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.0", "version": "2.3.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.2.1", "version": "2.2.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.2.0", "version": "2.2.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.1.3", "version": "2.1.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.7", "version": "0.1.7" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.6", "version": "0.1.6" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.5", "version": "0.1.5" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.4", "version": "0.1.4" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.3", "version": "0.1.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.1", "version": "0.1.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-stdlib", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "downloads": 181047, "created_at": "2012-03-08 03:28:14 -0800", "updated_at": "2014-01-06 14:41:29 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-apt-1.4.0", "module": { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.4.0", "metadata": { "name": "puppetlabs-apt", "version": "1.4.0", "summary": "Puppet Labs Apt Module", "author": "Evolving Web / Puppet Labs", "description": "APT Module for Puppet", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "0c43f56b0bb8e8d04e8051a0e7aa37a5", ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".nodeset.yml": "78d78c172336a387a1067464434ffbcb", ".travis.yml": "782420dcc9d6412c79c30f03b1f3613c", "CHANGELOG": "f5488e1e891a8f8c47143dac790ddab3", "Gemfile": "1bfa7eb6e30346c9ddb4a8b144b0d255", "Gemfile.lock": "8ff8bc3d32bb7412bd97e48190a93b2f", "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d", "Modulefile": "b34e93626fbc137cbb651952e7509839", "README.md": "65176b395f7202fe5d222ae7b0de4e05", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70", "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd", "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3", "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5", "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5", "manifests/force.pp": "cf871e869f4114f32ab164de2a67e7e2", "manifests/init.pp": "5ec106a7a03313c544159a9a1f6b78e6", "manifests/key.pp": "3cf082ed91a3933ab7218d1be3464f4f", "manifests/params.pp": "ca4ce3730a65c43f884ab3e6445f1661", "manifests/pin.pp": "dea8cbaabc37010ce25838080608802b", "manifests/ppa.pp": "754a83944ae79b5001fc0c0a8c775985", "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9", "manifests/source.pp": "6eab8d33c173a066f5dec8474efdedb6", "manifests/unattended_upgrades.pp": "e97f908b42010ff9a85be4afd2c721ab", "manifests/update.pp": "436c79f160f2cb603710795a9ec71ac7", "spec/classes/apt_spec.rb": "54841b04b42026770ed6d744a82c55df", "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f", "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e", "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7", "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4", "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4", "spec/classes/unattended_upgrades_spec.rb": "a2e206bda79d24cdb43312d035eff66f", "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5", "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c", "spec/defines/force_spec.rb": "97098c5b123be49e321e71cda288fe53", "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0", "spec/defines/pin_spec.rb": "c912e59e9e3d1145280d659cccabe72b", "spec/defines/ppa_spec.rb": "72ce037a1d6ea0a33f369b1f3d98b3d6", "spec/defines/source_spec.rb": "e553bb9598dbe2becba6ae7f91d4deb0", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "e67d2574baae312f1095f90d78fdf5e9", "spec/system/apt_builddep_spec.rb": "97be5a48d2d16d96cb7c35ccdbcdcb69", "spec/system/apt_key_spec.rb": "098835d0c53c69390d4c3b6ea8ef3815", "spec/system/apt_ppa_spec.rb": "c96f6d0bbdafac39beaf0d5e6eba9010", "spec/system/apt_source_spec.rb": "df5aa98b03688884903c564bb507469f", "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6", "spec/system/class_spec.rb": "2ba4265236f00685c23cb00f908defc1", "templates/10periodic.erb": "2aeea866a39f19a62254abbb4f1bc59d", "templates/50unattended-upgrades.erb": "ae995ade214fdaefab51d335c85819ae", "templates/pin.pref.erb": "623249839cee7788fa0805a3474396db", "templates/source.list.erb": "65a016e60daf065c481f3d5f2c883324", "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88", "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb", "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca", "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600", "tests/init.pp": "551138eb704e71ab3687932dda429a81", "tests/key.pp": "371a695e1332d51a38e283a87be52798", "tests/params.pp": "900db40f3fc84b0be173278df2ebff35", "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff", "tests/release.pp": "53ce5debe6fa5bee42821767599cc768", "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98", "tests/unattended-upgrades.pp": "cdc853f1b58e5206c5a538621ddca161" }, "source": "https://github.com/puppetlabs/puppetlabs-apt", "project_page": "https://github.com/puppetlabs/puppetlabs-apt", "license": "Apache License 2.0" }, "tags": [ "apt", "debian", "ubuntu", "dpkg", "apt-get", "aptitude", "ppa" ], "file_uri": "/v3/files/puppetlabs-apt-1.4.0.tar.gz", "file_size": 27238, "file_md5": "c483d6e375387d5e1fe780ee51ee512c", "downloads": 61047, "readme": "

apt

\n\n

\"Build

\n\n

Description

\n\n

Provides helpful definitions for dealing with Apt.

\n\n

Overview

\n\n

The APT module provides a simple interface for managing APT source, key, and definitions with Puppet.

\n\n

Module Description

\n\n

APT automates obtaining and installing software packages on *nix systems.

\n\n

Setup

\n\n

What APT affects:

\n\n
    \n
  • package/service/configuration files for APT
  • \n
  • your system's sources.list file and sources.list.d directory\n\n
      \n
    • NOTE: Setting the purge_sources_list and purge_sources_list_d parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.
    • \n
  • \n
  • system repositories
  • \n
  • authentication keys
  • \n
  • wget (optional)
  • \n
\n\n

Beginning with APT

\n\n

To begin using the APT module with default parameters, declare the class

\n\n
class { 'apt': }\n
\n\n

Puppet code that uses anything from the APT module requires that the core apt class be declared.

\n\n

Usage

\n\n

Using the APT module consists predominantly in declaring classes that provide desired functionality and features.

\n\n

apt

\n\n

apt provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.

\n\n

The parameters for apt are not required in general and are predominantly for development environment use-cases.

\n\n
class { 'apt':\n  always_apt_update    => false,\n  disable_keys         => undef,\n  proxy_host           => false,\n  proxy_port           => '8080',\n  purge_sources_list   => false,\n  purge_sources_list_d => false,\n  purge_preferences_d  => false,\n  update_timeout       => undef\n}\n
\n\n

Puppet will manage your system's sources.list file and sources.list.d directory but will do its best to respect existing content.

\n\n

If you declare your apt class with purge_sources_list and purge_sources_list_d set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.

\n\n

apt::builddep

\n\n

Installs the build depends of a specified package.

\n\n
apt::builddep { 'glusterfs-server': }\n
\n\n

apt::force

\n\n

Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
apt::force { 'glusterfs-server':\n  release => 'unstable',\n  version => '3.0.3',\n  require => Apt::Source['debian_unstable'],\n}\n
\n\n

apt::key

\n\n

Adds a key to the list of keys used by APT to authenticate packages.

\n\n
apt::key { 'puppetlabs':\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n\napt::key { 'jenkins':\n  key        => 'D50582E6',\n  key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',\n}\n
\n\n

Note that use of key_source requires wget to be installed and working.

\n\n

apt::pin

\n\n

Adds an apt pin for a certain release.

\n\n
apt::pin { 'karmic': priority => 700 }\napt::pin { 'karmic-updates': priority => 700 }\napt::pin { 'karmic-security': priority => 700 }\n
\n\n

Note you can also specifying more complex pins using distribution properties.

\n\n
apt::pin { 'stable':\n  priority        => -10,\n  originator      => 'Debian',\n  release_version => '3.0',\n  component       => 'main',\n  label           => 'Debian'\n}\n
\n\n

apt::ppa

\n\n

Adds a ppa repository using add-apt-repository.

\n\n
apt::ppa { 'ppa:drizzle-developers/ppa': }\n
\n\n

apt::release

\n\n

Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
class { 'apt::release':\n  release_id => 'precise',\n}\n
\n\n

apt::source

\n\n

Adds an apt source to /etc/apt/sources.list.d/.

\n\n
apt::source { 'debian_unstable':\n  location          => 'http://debian.mirror.iweb.ca/debian/',\n  release           => 'unstable',\n  repos             => 'main contrib non-free',\n  required_packages => 'debian-keyring debian-archive-keyring',\n  key               => '55BE302B',\n  key_server        => 'subkeys.pgp.net',\n  pin               => '-10',\n  include_src       => true\n}\n
\n\n

If you would like to configure your system so the source is the Puppet Labs APT repository

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

Testing

\n\n

The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources.

\n\n

Example Test

\n\n

This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.

\n\n

Check your smoke test for syntax errors

\n\n
$ puppet parser validate tests/puppetlabs-apt.pp\n
\n\n

If you receive no output from that command, it means nothing is wrong. Then apply the code

\n\n
$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e'\ninfo: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]\nnotice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>\n
\n\n

The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.

\n\n

Implementation

\n\n

apt::backports

\n\n

Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to $lsbdistcodename. Setting this manually can cause undefined behavior (read: universe exploding).

\n\n

Limitations

\n\n

This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Contributors

\n\n

A lot of great people have contributed to this module. A somewhat current list follows:

\n\n\n
", "changelog": "
2013-10-08 1.4.0\n\nSummary:\n\nMinor bugfix and allow the timeout to be adjusted.\n\nFeatures:\n- Add an `updates_timeout` to apt::params\n\nFixes:\n- Ensure apt::ppa can readd a ppa removed by hand.\n\nSummary\n\n1.3.0\n=====\n\nSummary:\n\nThis major feature in this release is the new apt::unattended_upgrades class,\nallowing you to handle Ubuntu's unattended feature.  This allows you to select\nspecific packages to automatically upgrade without any further user\ninvolvement.\n\nIn addition we extend our Wheezy support, add proxy support to apt:ppa and do\nvarious cleanups and tweaks.\n\nFeatures:\n- Add apt::unattended_upgrades support for Ubuntu.\n- Add wheezy backports support.\n- Use the geoDNS http.debian.net instead of the main debian ftp server.\n- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command.\n- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt).\n\nBugfixes:\n- Fix regsubst() calls to quote single letters (for future parser).\n- Fix lint warnings and other misc cleanup.\n\n1.2.0\n=====\n\nFeatures:\n- Add geppetto `.project` natures\n- Add GH auto-release\n- Add `apt::key::key_options` parameter\n- Add complex pin support using distribution properties for `apt::pin` via new properties:\n  - `apt::pin::codename`\n  - `apt::pin::release_version`\n  - `apt::pin::component`\n  - `apt::pin::originator`\n  - `apt::pin::label`\n- Add source architecture support to `apt::source::architecture`\n\nBugfixes:\n- Use apt-get instead of aptitude in apt::force\n- Update default backports location\n- Add dependency for required packages before apt-get update\n\n\n1.1.1\n=====\n\nThis is a bug fix release that resolves a number of issues:\n\n* By changing template variable usage, we remove the deprecation warnings\n  for Puppet 3.2.x\n* Fixed proxy file removal, when proxy absent\n\nSome documentation, style and whitespaces changes were also merged. This\nrelease also introduced proper rspec-puppet unit testing on Travis-CI to help\nreduce regression.\n\nThanks to all the community contributors below that made this patch possible.\n\n#### Detail Changes\n\n* fix minor comment type (Chris Rutter)\n* whitespace fixes (Michael Moll)\n* Update travis config file (William Van Hevelingen)\n* Build all branches on travis (William Van Hevelingen)\n* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)\n* Updated content to conform to README best practices template (Lauren Rother)\n* Fix apt::release example in readme (Brian Galey)\n* add @ to variables in template (Peter Hoeg)\n* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)\n* Update travis.yml to latest versions of puppet (Ken Barber)\n* Fix proxy file removal (Scott Barber)\n* Add spec test for removing proxy configuration (Dean Reilly)\n* Fix apt::key listing longer than 8 chars (Benjamin Knofe)\n\n\n---------------------------------------\n\n1.1.0\n=====\n\nThis release includes Ubuntu 12.10 (Quantal) support for PPAs.\n\n---------------------------------------\n\n2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4\n * Fix ppa list filename when there is a period in the PPA name\n * Add .pref extension to apt preferences files\n * Allow preferences to be purged\n * Extend pin support\n\n2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support 'ensure => absent' for all defined types\n * add apt::conf\n * add apt::backports\n * fixed Modulefile for module tool dependency resolution\n * configure proxy before doing apt-get update\n * use apt-get update instead of aptitude for apt::ppa\n * add support to pin release\n\n\n2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2\n41cedbb (#13261) Add real examples to smoke tests.\nd159a78 (#13261) Add key.pp smoke test\n7116c7a (#13261) Replace foo source with puppetlabs source\n1ead0bf Ignore pkg directory.\n9c13872 (#13289) Fix some more style violations\n0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path\na758247 (#13289) Clean up style violations and fix corresponding tests\n99c3fd3 (#13289) Add puppet lint tests to Rakefile\n5148cbf (#13125) Apt keys should be case insensitive\nb9607a4 Convert apt::key to use anchors\n\n2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1\nd4fec56 Modify apt::source release parameter test\n1132a07 (#12917) Add contributors to README\n8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it\n7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input\nbe2cc3e (#12522) Adjust spec test for splitting purge\n7dc60ae (#12522) Split purge option to spare sources.list\n9059c4e Fix source specs to test all key permutations\n8acb202 Add test for python-software-properties package\na4af11f Check if python-software-properties is defined before attempting to define it.\n1dcbf3d Add tests for required_packages change\nf3735d2 Allow duplicate $required_packages\n74c8371 (#12430) Add tests for changes to apt module\n97ebb2d Test two sources with the same key\n1160bcd (#12526) Add ability to reverse apt { disable_keys => true }\n2842d73 Add Modulefile to puppet-apt\nc657742 Allow the use of the same key in multiple sources\n8c27963 (#12522) Adding purge option to apt class\n997c9fd (#12529) Add unit test for apt proxy settings\n50f3cca (#12529) Add parameter to support setting a proxy for apt\nd522877 (#12094) Replace chained .with_* with a hash\n8cf1bd0 (#12094) Remove deprecated spec.opts file\n2d688f4 (#12094) Add rspec-puppet tests for apt\n0fb5f78 (#12094) Replace name with path in file resources\nf759bc0 (#11953) Apt::force passes $version to aptitude\nf71db53 (#11413) Add spec test for apt::force to verify changes to unless\n2f5d317 (#11413) Update dpkg query used by apt::force\ncf6caa1 (#10451) Add test coverage to apt::ppa\n0dd697d include_src parameter in example; Whitespace cleanup\nb662eb8 fix typos in "repositories"\n1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added\n864302a Set the pin priority before adding the source (Fix #10449)\n1de4e0a Refactored as per mlitteken\n1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!\n52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep\n5c05fa0 added builddep command.\na11af50 added the ability to specify the content of a key\nc42db0f Fixes ppa test.\n77d2b0d reformatted whitespace to match recommended style of 2 space indentation.\n27ebdfc ignore swap files.\n377d58a added smoke tests for module.\n18f614b reformatted apt::ppa according to recommended style.\nd8a1e4e Created a params class to hold global data.\n636ae85 Added two params for apt class\n148fc73 Update LICENSE.\ned2d19e Support ability to add more than one PPA\n420d537 Add call to apt-update after add-apt-repository in apt::ppa\n945be77 Add package definition for python-software-properties\n71fc425 Abs paths for all commands\n9d51cd1 Adding LICENSE\n71796e3 Heading fix in README\n87777d8 Typo in README\nf848bac First commit\n
", "license": "
Copyright (c) 2011 Evolving Web Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2013-10-15 11:06:03 -0700", "updated_at": "2013-10-15 11:06:03 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apt-1.4.0", "version": "1.4.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.1.1", "version": "1.1.1" }, { "uri": "/v3/releases/puppetlabs-apt-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-apt-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apt", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "downloads": 120794, "created_at": "2011-10-18 22:14:41 -0700", "updated_at": "2014-01-06 14:40:35 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-firewall-0.4.2", "module": { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.2", "metadata": { "name": "puppetlabs-firewall", "version": "0.4.2", "source": "git://github.com/puppetlabs/puppetlabs-firewall.git", "author": "puppetlabs", "license": "ASL 2.0", "summary": "Firewall Module", "description": "Manages Firewalls such as iptables", "project_page": "http://forge.puppetlabs.com/puppetlabs/firewall", "dependencies": [ ], "types": [ { "name": "firewall", "doc": " This type provides the capability to manage firewall rules within\n puppet.\n\n **Autorequires:**\n\n If Puppet is managing the iptables or ip6tables chains specified in the\n `chain` or `jump` parameters, the firewall resource will autorequire\n those firewallchain resources.\n\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables or ip6tables, the firewall resource will\n autorequire those packages to ensure that any required binaries are\n installed.\n", "properties": [ { "name": "ensure", "doc": " Manage the state of this rule. The default action is *present*.\n Valid values are `present`, `absent`." }, { "name": "action", "doc": " This is the action to perform on a match. Can be one of:\n\n * accept - the packet is accepted\n * reject - the packet is rejected with a suitable ICMP response\n * drop - the packet is dropped\n\n If you specify no value it will simply match the rule but perform no\n action unless you provide a provider specific parameter (such as *jump*).\n Valid values are `accept`, `reject`, `drop`." }, { "name": "source", "doc": " The source address. For example:\n\n source => '192.168.2.0/24'\n\n The source can also be an IPv6 address if your provider supports it.\n" }, { "name": "src_range", "doc": " The source IP range. For example:\n\n src_range => '192.168.1.1-192.168.1.10'\n\n The source IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "destination", "doc": " The destination address to match. For example:\n\n destination => '192.168.1.0/24'\n\n The destination can also be an IPv6 address if your provider supports it.\n" }, { "name": "dst_range", "doc": " The destination IP range. For example:\n\n dst_range => '192.168.1.1-192.168.1.10'\n\n The destination IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "sport", "doc": " The source port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dport", "doc": " The destination port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "port", "doc": " The destination or source port to match for this filter (if the protocol\n supports ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dst_type", "doc": " The destination address type. For example:\n\n dst_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "src_type", "doc": " The source address type. For example:\n\n src_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "proto", "doc": " The specific protocol to match for this rule. By default this is\n *tcp*.\n Valid values are `tcp`, `udp`, `icmp`, `ipv6-icmp`, `esp`, `ah`, `vrrp`, `igmp`, `ipencap`, `ospf`, `gre`, `all`." }, { "name": "tcp_flags", "doc": " Match when the TCP flags are as specified.\n Is a string with a list of comma-separated flag names for the mask,\n then a space, then a comma-separated list of flags that should be set.\n The flags are: SYN ACK FIN RST URG PSH ALL NONE\n Note that you specify them in the order that iptables --list-rules\n would list them to avoid having puppet think you changed the flags.\n Example: FIN,SYN,RST,ACK SYN matches packets with the SYN bit set and the\n\t ACK,RST and FIN bits cleared. Such packets are used to request\n TCP connection initiation.\n Requires features tcp_flags." }, { "name": "chain", "doc": " Name of the chain to use. Can be one of the built-ins:\n\n * INPUT\n * FORWARD\n * OUTPUT\n * PREROUTING\n * POSTROUTING\n\n Or you can provide a user-based chain.\n\n The default value is 'INPUT'.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features iptables." }, { "name": "table", "doc": " Table to use. Can be one of:\n\n * nat\n * mangle\n * filter\n * raw\n * rawpost\n\n By default the setting is 'filter'.\n Valid values are `nat`, `mangle`, `filter`, `raw`, `rawpost`. Requires features iptables." }, { "name": "jump", "doc": " The value for the iptables --jump parameter. Normal values are:\n\n * QUEUE\n * RETURN\n * DNAT\n * SNAT\n * LOG\n * MASQUERADE\n * REDIRECT\n * MARK\n\n But any valid chain name is allowed.\n\n For the values ACCEPT, DROP and REJECT you must use the generic\n 'action' parameter. This is to enfore the use of generic parameters where\n possible for maximum cross-platform modelling.\n\n If you set both 'accept' and 'jump' parameters, you will get an error as\n only one of the options should be set.\n Requires features iptables." }, { "name": "iniface", "doc": " Input interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "outiface", "doc": " Output interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "tosource", "doc": " When using jump => \"SNAT\" you can specify the new source address using\n this parameter.\n Requires features snat." }, { "name": "todest", "doc": " When using jump => \"DNAT\" you can specify the new destination address\n using this paramter.\n Requires features dnat." }, { "name": "toports", "doc": " For DNAT this is the port that will replace the destination port.\n Requires features dnat." }, { "name": "reject", "doc": " When combined with jump => \"REJECT\" you can specify a different icmp\n response to be sent back to the packet sender.\n Requires features reject_type." }, { "name": "log_level", "doc": " When combined with jump => \"LOG\" specifies the system log level to log\n to.\n Requires features log_level." }, { "name": "log_prefix", "doc": " When combined with jump => \"LOG\" specifies the log prefix to use when\n logging.\n Requires features log_prefix." }, { "name": "icmp", "doc": " When matching ICMP packets, this is the type of ICMP packet to match.\n\n A value of \"any\" is not supported. To achieve this behaviour the\n parameter should simply be omitted or undefined.\n Requires features icmp_match." }, { "name": "state", "doc": " Matches a packet based on its state in the firewall stateful inspection\n table. Values can be:\n\n * INVALID\n * ESTABLISHED\n * NEW\n * RELATED\n Valid values are `INVALID`, `ESTABLISHED`, `NEW`, `RELATED`. Requires features state_match." }, { "name": "limit", "doc": " Rate limiting value for matched packets. The format is:\n rate/[/second/|/minute|/hour|/day].\n\n Example values are: '50/sec', '40/min', '30/hour', '10/day'.\"\n Requires features rate_limiting." }, { "name": "burst", "doc": " Rate limiting burst value (per second) before limit checks apply.\n Values can match `/^\\d+$/`. Requires features rate_limiting." }, { "name": "uid", "doc": " UID or Username owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple uid in a single\n statement.\n Requires features owner." }, { "name": "gid", "doc": " GID or Group owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple gid in a single\n statement.\n Requires features owner." }, { "name": "set_mark", "doc": " Set the Netfilter mark value associated with the packet. Accepts either of:\n mark/mask or mark. These will be converted to hex if they are not already.\n Requires features mark." }, { "name": "pkttype", "doc": " Sets the packet type to match.\n Valid values are `unicast`, `broadcast`, `multicast`. Requires features pkttype." }, { "name": "isfragment", "doc": " Set to true to match tcp fragments (requires type to be set to tcp)\n Valid values are `true`, `false`. Requires features isfragment." }, { "name": "socket", "doc": " If true, matches if an open socket can be found by doing a coket lookup\n on the packet.\n Valid values are `true`, `false`. Requires features socket." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the rule. This name is also used for ordering\n so make sure you prefix the rule with a number:\n\n 000 this runs first\n 999 this runs last\n\n Depending on the provider, the name of the rule can be stored using\n the comment feature of the underlying firewall subsystem.\n Values can match `/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`." }, { "name": "line", "doc": " Read-only property for caching the rule line.\n" } ], "providers": [ { "name": "ip6tables", "doc": "Ip6tables type provider\n\nRequired binaries: `ip6tables`, `ip6tables-save`. Supported features: `dnat`, `icmp_match`, `interface_match`, `iptables`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `state_match`, `tcp_flags`." }, { "name": "iptables", "doc": "Iptables type provider\n\nRequired binaries: `iptables`, `iptables-save`. Default for `kernel` == `linux`. Supported features: `address_type`, `dnat`, `icmp_match`, `interface_match`, `iprange`, `iptables`, `isfragment`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `socket`, `state_match`, `tcp_flags`." } ] }, { "name": "firewallchain", "doc": " This type provides the capability to manage rule chains for firewalls.\n\n Currently this supports only iptables, ip6tables and ebtables on Linux. And\n provides support for setting the default policy on chains and tables that\n allow it.\n\n **Autorequires:**\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables_chain, the firewall resource will autorequire\n those packages to ensure that any required binaries are installed.\n", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "policy", "doc": " This is the action to when the end of the chain is reached.\n It can only be set on inbuilt chains (INPUT, FORWARD, OUTPUT,\n PREROUTING, POSTROUTING) and can be one of:\n\n * accept - the packet is accepted\n * drop - the packet is dropped\n * queue - the packet is passed userspace\n * return - the packet is returned to calling (jump) queue\n or the default of inbuilt chains\n Valid values are `accept`, `drop`, `queue`, `return`." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the chain.\n\n For iptables the format must be {chain}:{table}:{protocol}.\n" } ], "providers": [ { "name": "iptables_chain", "doc": "Iptables chain provider\n\nRequired binaries: `iptables`, `iptables-save`, `ip6tables`, `ip6tables-save`, `ebtables`, `ebtables-save`. Default for `kernel` == `linux`. Supported features: `iptables_chain`, `policy`." } ] } ], "checksums": { "CONTRIBUTING.md": "346969b756bc432a2a2fab4307ebb93a", "Changelog": "1de1691b4ab10ee354f761a1f4c6f443", "Gemfile": "cbdce086f4dbabe5394121e2281b739f", "Gemfile.lock": "df949ce515d5c06d6ed31b9d7e5e3391", "LICENSE": "ade7f2bb88b5b4f034152822222ec314", "Modulefile": "5e06a785cd9bce7b53f95c23eba506d2", "README.markdown": "41df885b5286abc9ba27f054c5ff6dbf", "Rakefile": "35d0261289b65faa09bef45b888d40ae", "lib/facter/ip6tables_version.rb": "091123ad703f1706686bca4398c5b06f", "lib/facter/iptables_persistent_version.rb": "b7a47827cd3d3bb1acbd526a31da3acb", "lib/facter/iptables_version.rb": "facbd760223f236538b731c1d1f6cf8f", "lib/puppet/provider/firewall/ip6tables.rb": "e9579ae3afdf8b1392cbdc0335ef5464", "lib/puppet/provider/firewall/iptables.rb": "bb7ea2c54c60c1047e68745f3b370c6f", "lib/puppet/provider/firewall.rb": "32d2f5e5dcc082986b82ef26a119038b", "lib/puppet/provider/firewallchain/iptables_chain.rb": "e98592c22901792305e0d20376c9a281", "lib/puppet/type/firewall.rb": "2a591254b2df7528eafaa6dff5459ace", "lib/puppet/type/firewallchain.rb": "91ebccecff290a9ab2116867a74080c7", "lib/puppet/util/firewall.rb": "a9f0057c1b16a51a0bace5d4a8cc4ea4", "lib/puppet/util/ipcidr.rb": "e1160dfd6e73fc5ef2bb8abc291f6fd5", "manifests/init.pp": "ba3e697f00fc3d4e7e5b9c7fdbc6a89d", "manifests/linux/archlinux.pp": "1257fe335ecafa0629b285dc8621cf75", "manifests/linux/debian.pp": "626f0fd23f2f451ca14e2b7f690675fe", "manifests/linux/redhat.pp": "44ce25057ae8d814465260767b39c414", "manifests/linux.pp": "7380519131fa8daae0ef45f9a162aff7", "spec/fixtures/iptables/conversion_hash.rb": "012d92a358cc0c74304de14657bf9a23", "spec/spec_helper.rb": "faae8467928b93bd251a1a66e1eedbe5", "spec/spec_helper_system.rb": "4981e0b995c12996e628d004ffdcc9f4", "spec/system/basic_spec.rb": "34a22dedba01b8239024137bda8ab3f8", "spec/system/class_spec.rb": "04d89039312c3b9293dbb680878101c6", "spec/system/params_spec.rb": "f982f9eb6ecc8d6782b9267b59d321bf", "spec/system/purge_spec.rb": "a336e8a20d4c330606bf5955799a7e35", "spec/system/resource_cmd_spec.rb": "f991d2b7a3e2eb6d28471534cd38b0c8", "spec/system/standard_usage_spec.rb": "f80f86703843775ac14635464e9f7549", "spec/unit/classes/firewall_linux_archlinux_spec.rb": "1c600a9852ec328b14cb15b0630ed5ff", "spec/unit/classes/firewall_linux_debian_spec.rb": "6334936fb16223cf15f637083c67850e", "spec/unit/classes/firewall_linux_redhat_spec.rb": "f41b21caf6948f3ac08f42c1bc59ba1b", "spec/unit/classes/firewall_linux_spec.rb": "b934ab4e0a806f29bfdabd2369e41d0e", "spec/unit/classes/firewall_spec.rb": "14fc76eeb702913159661c01125baabb", "spec/unit/facter/iptables_persistent_version_spec.rb": "98aa337aae2ae8a2ac7f70586351e928", "spec/unit/facter/iptables_spec.rb": "ebb008f0e01530a49007228ca1a81097", "spec/unit/puppet/provider/iptables_chain_spec.rb": "6265dbb6be5af74f056d32c7e7236d0a", "spec/unit/puppet/provider/iptables_spec.rb": "b1e92084c8595b7e2ef21aa0800ea084", "spec/unit/puppet/type/firewall_spec.rb": "f229613c1bec34b6f84b544e021dc856", "spec/unit/puppet/type/firewallchain_spec.rb": "49157d8703daf8776e414ef9ea9e5cb3", "spec/unit/puppet/util/firewall_spec.rb": "3d7858f46ea3c97617311b7a5cebbae1", "spec/unit/puppet/util/ipcidr_spec.rb": "1a6eeb2dd7c9634fcfb60d8ead6e1d79" } }, "tags": [ "iptables", "security", "firewall", "ip6tables", "archlinux", "redhat", "centos", "debian", "ubuntu" ], "file_uri": "/v3/files/puppetlabs-firewall-0.4.2.tar.gz", "file_size": 51834, "file_md5": "7862ef0aa64d9a4b87152ef27302c9e4", "downloads": 53034, "readme": "

firewall

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Firewall module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Firewall\n\n
  6. \n
  7. Usage - Configuration and customization options\n\n
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module\n\n
  14. \n
\n\n

Overview

\n\n

The Firewall module lets you manage firewall rules with Puppet.

\n\n

Module Description

\n\n

PuppetLabs' Firewall introduces the resource firewall, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables.

\n\n

The module also introduces the resource firewallchain, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported.

\n\n

Setup

\n\n

What Firewall affects:

\n\n
    \n
  • every node running a firewall
  • \n
  • system's firewall settings
  • \n
  • connection settings for managed nodes
  • \n
  • unmanaged resources (get purged)
  • \n
  • site.pp
  • \n
\n\n

Setup Requirements

\n\n

Firewall uses Ruby-based providers, so you must have pluginsync enabled.

\n\n

Beginning with Firewall

\n\n

To begin, you need to provide some initial top-scope configuration to ensure your firewall configurations are ordered properly and you do not lock yourself out of your box or lose any configuration.

\n\n

Persistence of rules between reboots is handled automatically, although there are known issues with ip6tables on older Debian/Ubuntu, as well as known issues with ebtables.

\n\n

In your site.pp (or some similarly top-scope file), set up a metatype to purge unmanaged firewall resources. This will clear any existing rules and make sure that only rules defined in Puppet exist on the machine.

\n\n
resources { "firewall":\n  purge => true\n}\n
\n\n

Next, set up the default parameters for all of the firewall rules you will be establishing later. These defaults will ensure that the pre and post classes (you will be setting up in just a moment) are run in the correct order to avoid locking you out of your box during the first puppet run.

\n\n
Firewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\n
\n\n

You also need to declare the my_fw::pre & my_fw::post classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following

\n\n
class { ['my_fw::pre', 'my_fw::post']: }\n
\n\n

Finally, you should include the firewall class to ensure the correct packages are installed.

\n\n
class { 'firewall': }\n
\n\n

Now to create the my_fw::pre and my_fw::post classes. Firewall acts on your running firewall, making immediate changes as the catalog executes. Defining default pre and post rules allows you provide global defaults for your hosts before and after any custom rules; it is also required to avoid locking yourself out of your own boxes when Puppet runs. This approach employs a allowlist setup, so you can define what rules you want and everything else is ignored rather than removed.

\n\n

The pre class should be located in my_fw/manifests/pre.pp and should contain any default rules to be applied first.

\n\n
class my_fw::pre {\n  Firewall {\n    require => undef,\n  }\n\n  # Default firewall rules\n  firewall { '000 accept all icmp':\n    proto   => 'icmp',\n    action  => 'accept',\n  }->\n  firewall { '001 accept all to lo interface':\n    proto   => 'all',\n    iniface => 'lo',\n    action  => 'accept',\n  }->\n  firewall { '002 accept related established rules':\n    proto   => 'all',\n    state   => ['RELATED', 'ESTABLISHED'],\n    action  => 'accept',\n  }\n}\n
\n\n

The rules in pre should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed.

\n\n

The post class should be located in my_fw/manifests/post.pp and include any default rules to be applied last.

\n\n
class my_fw::post {\n  firewall { '999 drop all':\n    proto   => 'all',\n    action  => 'drop',\n    before  => undef,\n  }\n}\n
\n\n

To put it all together: the before parameter in Firewall {} ensures my_fw::post is run before any other rules and the the require parameter ensures my_fw::pre is run after any other rules. So the run order is:

\n\n
    \n
  • run the rules in my_fw::pre
  • \n
  • run your rules (defined in code)
  • \n
  • run the rules in my_fw::post
  • \n
\n\n

Upgrading

\n\n

Upgrading from version 0.2.0 and newer

\n\n

Upgrade the module with the puppet module tool as normal:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Upgrading from version 0.1.1 and older

\n\n

Start by upgrading the module using the puppet module tool:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Previously, you would have required the following in your site.pp (or some other global location):

\n\n
# Always persist firewall rules\nexec { 'persist-firewall':\n  command     => $operatingsystem ? {\n    'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n    /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n  },\n  refreshonly => true,\n}\nFirewall {\n  notify  => Exec['persist-firewall'],\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nFirewallchain {\n  notify  => Exec['persist-firewall'],\n}\nresources { "firewall":\n  purge => true\n}\n
\n\n

With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre & post rules.

\n\n
resources { "firewall":\n  purge => true\n}\nFirewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nclass { ['my_fw::pre', 'my_fw::post']: }\nclass { 'firewall': }\n
\n\n

Consult the the documentation below for more details around the classes my_fw::pre and my_fw::post.

\n\n

Usage

\n\n

There are two kinds of firewall rules you can use with Firewall: default rules and application-specific rules. Default rules apply to general firewall settings, whereas application-specific rules manage firewall settings of a specific application, node, etc.

\n\n

All rules employ a numbering system in the resource's title that is used for ordering. When titling your rules, make sure you prefix the rule with a number.

\n\n
  000 this runs first\n  999 this runs last\n
\n\n

Default rules

\n\n

You can place default rules in either my_fw::pre or my_fw::post, depending on when you would like them to run. Rules placed in the pre class will run first, rules in the post class, last.

\n\n

Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match /^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/.

\n\n

Examples of default rules

\n\n

Basic accept ICMP request example:

\n\n
firewall { "000 accept all icmp requests":\n  proto  => "icmp",\n  action => "accept",\n}\n
\n\n

Drop all:

\n\n
firewall { "999 drop all other requests":\n  action => "drop",\n}\n
\n\n

Application-specific rules

\n\n

Application-specific rules can live anywhere you declare the firewall resource. It is best to put your firewall rules close to the service that needs it, such as in the module that configures it.

\n\n

You should be able to add firewall rules to your application-specific classes so firewalling is performed at the same time when the class is invoked.

\n\n

For example, if you have an Apache module, you could declare the class as below

\n\n
class apache {\n  firewall { '100 allow http and https access':\n    port   => [80, 443],\n    proto  => tcp,\n    action => accept,\n  }\n  # ... the rest of your code ...\n}\n
\n\n

When someone uses the class, firewalling is provided automatically.

\n\n
class { 'apache': }\n
\n\n

Other rules

\n\n

You can also apply firewall rules to specific nodes. Usually, you will want to put the firewall rule in another class and apply that class to a node. But you can apply a rule to a node.

\n\n
node 'foo.bar.com' {\n  firewall { '111 open port 111':\n    dport => 111\n  }\n}\n
\n\n

You can also do more complex things with the firewall resource. Here we are doing some NAT configuration.

\n\n
firewall { '100 snat for network foo2':\n  chain    => 'POSTROUTING',\n  jump     => 'MASQUERADE',\n  proto    => 'all',\n  outiface => "eth0",\n  source   => '10.1.2.0/24',\n  table    => 'nat',\n}\n
\n\n

In the below example, we are creating a new chain and forwarding any port 5000 access to it.

\n\n
firewall { '100 forward to MY_CHAIN':\n  chain   => 'INPUT',\n  jump    => 'MY_CHAIN',\n}\n# The namevar here is in the format chain_name:table:protocol\nfirewallchain { 'MY_CHAIN:filter:IPv4':\n  ensure  => present,\n}\nfirewall { '100 my rule':\n  chain   => 'MY_CHAIN',\n  action  => 'accept',\n  proto   => 'tcp',\n  dport   => 5000,\n}\n
\n\n

Additional Information

\n\n

You can access the inline documentation:

\n\n
puppet describe firewall\n
\n\n

Or

\n\n
puppet doc -r type\n(and search for firewall)\n
\n\n

Reference

\n\n

Classes:

\n\n\n\n

Types:

\n\n\n\n

Facts:

\n\n\n\n

Class: firewall

\n\n

This class is provided to do the basic setup tasks required for using the firewall resources.

\n\n

At the moment this takes care of:

\n\n
    \n
  • iptables-persistent package installation
  • \n
\n\n

You should include the class for nodes that need to use the resources in this module. For example

\n\n
class { 'firewall': }\n
\n\n

ensure

\n\n

Indicates the state of iptables on your system, allowing you to disable iptables if desired.

\n\n

Can either be running or stopped. Default to running.

\n\n

Type: firewall

\n\n

This type provides the capability to manage firewall rules within puppet.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Type:: firewallchain

\n\n

This type provides the capability to manage rule chains for firewalls.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Fact: ip6tables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution.

\n\n

Fact: iptables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution.

\n\n

Fact: iptables_persistent_version

\n\n

Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact.

\n\n

Limitations

\n\n

While we aim to support as low as Puppet 2.6.x (for now), we recommend installing the latest Puppet version from the Puppetlabs official repos.

\n\n

Please note, we only aim support for the following distributions and versions - that is, we actually do ongoing system tests on these platforms:

\n\n
    \n
  • Redhat 5.9 and 6.4
  • \n
  • Debian 6.0 and 7.0
  • \n
  • Ubuntu 10.04 and 12.04
  • \n
\n\n

If you want a new distribution supported feel free to raise a ticket and we'll consider it. If you want an older revision supported we'll also consider it, but don't get insulted if we reject it. Specifically, we will not consider Redhat 4.x support - its just too old.

\n\n

If you really want to get support for your OS we suggest writing any patch fix yourself, and for continual system testing if you can provide a sufficient trusted Veewee template we could consider adding such an OS to our ongoing continuous integration tests.

\n\n

Also, as this is a 0.x release the API is still in flux and may change. Make sure\nyou read the release notes before upgrading.

\n\n

Bugs can be reported using Github Issues:

\n\n

http://github.com/puppetlabs/puppetlabs-firewall/issues

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

For this particular module, please also read CONTRIBUTING.md before contributing.

\n\n

Currently we support:

\n\n
    \n
  • iptables
  • \n
  • ip6tables
  • \n
  • ebtables (chains only)
  • \n
\n\n

But plans are to support lots of other firewall implementations:

\n\n
    \n
  • FreeBSD (ipf)
  • \n
  • Mac OS X (ipfw)
  • \n
  • OpenBSD (pf)
  • \n
  • Cisco (ASA and basic access lists)
  • \n
\n\n

If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.

\n\n

Testing

\n\n

Make sure you have:

\n\n
    \n
  • rake
  • \n
  • bundler
  • \n
\n\n

Install the necessary gems:

\n\n
bundle install\n
\n\n

And run the tests from the root of the source code:

\n\n
rake test\n
\n\n

If you have a copy of Vagrant 1.1.0 you can also run the system tests:

\n\n
RSPEC_SET=debian-606-x64 rake spec:system\nRSPEC_SET=centos-58-x64 rake spec:system\n
\n\n

Note: system testing is fairly alpha at this point, your mileage may vary.

\n
", "changelog": "
## puppetlabs-firewall changelog\n\nRelease notes for puppetlabs-firewall module.\n\n---------------------------------------\n\n#### 0.4.2 - 2013-09-10\n\nAnother attempt to fix the packaging issue.  We think we understand exactly\nwhat is failing and this should work properly for the first time.\n\n---------------------------------------\n\n#### 0.4.1 - 2013-08-09\n\nBugfix release to fix a packaging issue that may have caused puppet module\ninstall commands to fail.\n\n---------------------------------------\n\n#### 0.4.0 - 2013-07-11\n\nThis release adds support for address type, src/dest ip ranges, and adds\nadditional testing and bugfixes.\n\n#### Features\n* Add `src_type` and `dst_type` attributes (Nick Stenning)\n* Add `src_range` and `dst_range` attributes (Lei Zhang)\n* Add SL and SLC operatingsystems as supported (Steve Traylen)\n\n#### Bugfixes\n* Fix parser for bursts other than 5 (Chris Rutter)\n* Fix parser for -f in --comment (Georg Koester)\n* Add doc headers to class files (Dan Carley)\n* Fix lint warnings/errors (Wolf Noble)\n\n---------------------------------------\n\n#### 0.3.1 - 2013/6/10\n\nThis minor release provides some bugfixes and additional tests.\n\n#### Changes\n\n* Update tests for rspec-system-puppet 2 (Ken Barber)\n* Update rspec-system tests for rspec-system-puppet 1.5 (Ken Barber)\n* Ensure all services have 'hasstatus => true' for Puppet 2.6 (Ken Barber)\n* Accept pre-existing rule with invalid name (Joe Julian)\n* Swap log_prefix and log_level order to match the way it's saved (Ken Barber)\n* Fix log test to replicate bug #182 (Ken Barber)\n* Split argments while maintaining quoted strings (Joe Julian)\n* Add more log param tests (Ken Barber)\n* Add extra tests for logging parameters (Ken Barber)\n* Clarify OS support (Ken Barber)\n\n---------------------------------------\n\n#### 0.3.0 - 2013/4/25\n\nThis release introduces support for Arch Linux and extends support for Fedora 15 and up. There are also lots of bugs fixed and improved testing to prevent regressions.\n\n##### Changes\n\n* Fix error reporting for insane hostnames (Tomas Doran)\n* Support systemd on Fedora 15 and up (Eduardo Gutierrez)\n* Move examples to docs (Ken Barber)\n* Add support for Arch Linux platform (Ingmar Steen)\n* Add match rule for fragments (Georg Koester)\n* Fix boolean rules being recognized as changed (Georg Koester)\n* Same rules now get deleted (Anastasis Andronidis)\n* Socket params test (Ken Barber)\n* Ensure parameter can disable firewall (Marc Tardif)\n\n---------------------------------------\n\n#### 0.2.1 - 2012/3/13\n\nThis maintenance release introduces the new README layout, and fixes a bug with iptables_persistent_version.\n\n##### Changes\n\n* (GH-139) Throw away STDERR from dpkg-query in Fact\n* Update README to be consistent with module documentation template\n* Fix failing spec tests due to dpkg change in iptables_persistent_version\n\n---------------------------------------\n\n#### 0.2.0 - 2012/3/3\n\nThis release introduces automatic persistence, removing the need for the previous manual dependency requirement for persistent the running rules to the OS persistence file.\n\nPreviously you would have required the following in your site.pp (or some other global location):\n\n    # Always persist firewall rules\n    exec { 'persist-firewall':\n      command     => $operatingsystem ? {\n        'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n        /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n      },\n      refreshonly => true,\n    }\n    Firewall {\n      notify  => Exec['persist-firewall'],\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n    Firewallchain {\n      notify  => Exec['persist-firewall'],\n    }\n    resources { "firewall":\n      purge => true\n    }\n\nYou only need:\n\n    class { 'firewall': }\n    Firewall {\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n\nTo install pre-requisites and to create dependencies on your pre & post rules. Consult the README for more information.\n\n##### Changes\n\n* Firewall class manifests (Dan Carley)\n* Firewall and firewallchain persistence (Dan Carley)\n* (GH-134) Autorequire iptables related packages (Dan Carley)\n* Typo in #persist_iptables OS normalisation (Dan Carley)\n* Tests for #persist_iptables (Dan Carley)\n* (GH-129) Replace errant return in autoreq block (Dan Carley)\n\n---------------------------------------\n\n#### 0.1.1 - 2012/2/28\n\nThis release primarily fixes changing parameters in 3.x\n\n##### Changes\n\n* (GH-128) Change method_missing usage to define_method for 3.x compatibility\n* Update travis.yml gem specifications to actually test 2.6\n* Change source in Gemfile to use a specific URL for Ruby 2.0.0 compatibility\n\n---------------------------------------\n\n#### 0.1.0 - 2012/2/24\n\nThis release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won't fall this far behind again :-).\n\n##### Changes\n\n* Add support for MARK target and set-mark property (Johan Huysmans)\n* Fix broken call to super for ruby-1.9.2 in munge (Ken Barber)\n* simple fix of the error message for allowed values of the jump property (Daniel Black)\n* Adding OSPF(v3) protocol to puppetlabs-firewall (Arnoud Vermeer)\n* Display multi-value: port, sport, dport and state command seperated (Daniel Black)\n* Require jump=>LOG for log params (Daniel Black)\n* Reject and document icmp => "any" (Dan Carley)\n* add firewallchain type and iptables_chain provider (Daniel Black)\n* Various fixes for firewallchain resource (Ken Barber)\n* Modify firewallchain name to be chain:table:protocol (Ken Barber)\n* Fix allvalidchain iteration (Ken Barber)\n* Firewall autorequire Firewallchains (Dan Carley)\n* Tests and docstring for chain autorequire (Dan Carley)\n* Fix README so setup instructions actually work (Ken Barber)\n* Support vlan interfaces (interface containing ".") (Johan Huysmans)\n* Add tests for VLAN support for iniface/outiface (Ken Barber)\n* Add the table when deleting rules (Johan Huysmans)\n* Fix tests since we are now prefixing -t)\n* Changed 'jump' to 'action', commands to lower case (Jason Short)\n* Support interface names containing "+" (Simon Deziel)\n* Fix for when iptables-save spews out "FATAL" errors (Sharif Nassar)\n* Fix for incorrect limit command arguments for ip6tables provider (Michael Hsu)\n* Document Util::Firewall.host_to_ip (Dan Carley)\n* Nullify addresses with zero prefixlen (Dan Carley)\n* Add support for --tcp-flags (Thomas Vander Stichele)\n* Make tcp_flags support a feature (Ken Barber)\n* OUTPUT is a valid chain for the mangle table (Adam Gibbins)\n* Enable travis-ci support (Ken Barber)\n* Convert an existing test to CIDR (Dan Carley)\n* Normalise iptables-save to CIDR (Dan Carley)\n* be clearer about what distributions we support (Ken Barber)\n* add gre protocol to list of acceptable protocols (Jason Hancock)\n* Added pkttype property (Ashley Penney)\n* Fix mark to not repeat rules with iptables 1.4.1+ (Sharif Nassar)\n* Stub iptables_version for now so tests run on non-Linux hosts (Ken Barber)\n* Stub iptables facts for set_mark tests (Dan Carley)\n* Update formatting of README to meet Puppet Labs best practices (Will Hopper)\n* Support for ICMP6 type code resolutions (Dan Carley)\n* Insert order hash included chains from different tables (Ken Barber)\n* rspec 2.11 compatibility (Jonathan Boyett)\n* Add missing class declaration in README (sfozz)\n* array_matching is contraindicated (Sharif Nassar)\n* Convert port Fixnum into strings (Sharif Nassar)\n* Update test framework to the modern age (Ken Barber)\n* working with ip6tables support (wuwx)\n* Remove gemfile.lock and add to gitignore (William Van Hevelingen)\n* Update travis and gemfile to be like stdlib travis files (William Van Hevelingen)\n* Add support for -m socket option (Ken Barber)\n* Add support for single --sport and --dport parsing (Ken Barber)\n* Fix tests for Ruby 1.9.3 from 3e13bf3 (Dan Carley)\n* Mock Resolv.getaddress in #host_to_ip (Dan Carley)\n* Update docs for source and dest - they are not arrays (Ken Barber)\n\n---------------------------------------\n\n#### 0.0.4 - 2011/12/05\n\nThis release adds two new parameters, 'uid' and 'gid'. As a part of the owner module, these params allow you to specify a uid, username, gid, or group got a match:\n\n    firewall { '497 match uid':\n      port => '123',\n      proto => 'mangle',\n      chain => 'OUTPUT',\n      action => 'drop'\n      uid => '123'\n    }\n\nThis release also adds value munging for the 'log_level', 'source', and 'destination' parameters. The 'source' and 'destination' now support hostnames:\n\n    firewall { '498 accept from puppetlabs.com':\n      port => '123',\n      proto => 'tcp',\n      source => 'puppetlabs.com',\n      action => 'accept'\n    }\n\n\nThe 'log_level' parameter now supports using log level names, such as 'warn', 'debug', and 'panic':\n\n    firewall { '499 logging':\n      port => '123',\n      proto => 'udp',\n      log_level => 'debug',\n      action => 'drop'\n    }\n\nAdditional changes include iptables and ip6tables version facts, general whitespace cleanup, and adding additional unit tests.\n\n##### Changes\n\n* (#10957) add iptables_version and ip6tables_version facts\n* (#11093) Improve log_level property so it converts names to numbers\n* (#10723) Munge hostnames and IPs to IPs with CIDR\n* (#10718) Add owner-match support\n* (#10997) Add fixtures for ipencap\n* (#11034) Whitespace cleanup\n* (#10690) add port property support to ip6tables\n\n---------------------------------------\n\n#### 0.0.3 - 2011/11/12\n\nThis release introduces a new parameter 'port' which allows you to set both\nsource and destination ports for a match:\n\n    firewall { "500 allow NTP requests":\n      port => "123",\n      proto => "udp",\n      action => "accept",\n    }\n\nWe also have the limit parameter finally working:\n\n    firewall { "500 limit HTTP requests":\n      dport => 80,\n      proto => tcp,\n      limit => "60/sec",\n      burst => 30,\n      action => accept,\n    }\n\nState ordering has been fixed now, and more characters are allowed in the\nnamevar:\n\n* Alphabetical\n* Numbers\n* Punctuation\n* Whitespace\n\n##### Changes\n\n* (#10693) Ensure -m limit is added for iptables when using 'limit' param\n* (#10690) Create new port property\n* (#10700) allow additional characters in comment string\n* (#9082) Sort iptables --state option values internally to keep it consistent across runs\n* (#10324) Remove extraneous whitespace from iptables rule line in spec tests\n\n---------------------------------------\n\n#### 0.0.2 - 2011/10/26\n\nThis is largely a maintanence and cleanup release, but includes the ability to\nspecify ranges of ports in the sport/dport parameter:\n\n    firewall { "500 allow port range":\n      dport => ["3000-3030","5000-5050"],\n      sport => ["1024-65535"],\n      action => "accept",\n    }\n\n##### Changes\n\n* (#10295) Work around bug #4248 whereby the puppet/util paths are not being loaded correctly on the primary Puppet server\n* (#10002) Change to dport and sport to handle ranges, and fix handling of name to name to port\n* (#10263) Fix tests on Puppet 2.6.x\n* (#10163) Cleanup some of the inline documentation and README file to align with general forge usage\n\n---------------------------------------\n\n#### 0.0.1 - 2011/10/18\n\nInitial release.\n\n##### Changes\n\n* (#9362) Create action property and perform transformation for accept, drop, reject value for iptables jump parameter\n* (#10088) Provide a customised version of CONTRIBUTING.md\n* (#10026) Re-arrange provider and type spec files to align with Puppet\n* (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default\n* (#9439) fix parsing and deleting existing rules\n* (#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider\n* (#9576) Stub provider so it works properly outside of Linux\n* (#9576) Align spec framework with Puppet core\n* and lots of other earlier development tasks ...\n
", "license": "
Puppet Firewall Module - Puppet module for managing Firewalls\n\nCopyright (C) 2011-2013 Puppet Labs, Inc.\nCopyright (C) 2011 Jonathan Boyett\nCopyright (C) 2011 Media Temple, Inc.\n\nSome of the iptables code was taken from puppet-iptables which was:\n\nCopyright (C) 2011 Bob.sh Limited\nCopyright (C) 2008 Camptocamp Association\nCopyright (C) 2007 Dmitri Priimak\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-09-10 13:27:07 -0700", "updated_at": "2013-09-10 13:27:07 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-firewall-0.4.2", "version": "0.4.2" }, { "uri": "/v3/releases/puppetlabs-firewall-0.4.1", "version": "0.4.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.3.1", "version": "0.3.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-firewall", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "downloads": 81387, "created_at": "2010-05-20 22:43:19 -0700", "updated_at": "2014-01-06 14:42:07 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.10.0", "metadata": { "name": "puppetlabs-apache", "version": "0.10.0", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`, `apache2ctl`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs\n\nRequired binaries: `apachectl`. Default for `osfamily` == `redhat`." } ] } ], "checksums": { "CHANGELOG.md": "2ed7b976e9c4542fd1626006cb44783b", "CONTRIBUTING.md": "5520c75162725951733fa7d88e57f31f", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "13733647826ec5cff955b593fd9a9c5c", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "560b5e9d2b04ddbc23f3803645bfbda5", "README.md": "c937c2d34a76185fe8cfc61d671c47ec", "README.passenger.md": "0316c4a152fd51867ece8ea403250fcb", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/confd/no_accf.pp": "c44b75749a3a56c0306433868d6b762c", "manifests/default_confd_files.pp": "7cbc2f15bfd34eb2f5160c671775c0f6", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/default_mods.pp": "ea267ac599fc3d76db6298c3710cee60", "manifests/dev.pp": "639ba24711be5d7cea0c792e05008c86", "manifests/init.pp": "ffc69874d88f7ac581138fbf47d04d04", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod/alias.pp": "3c144a2aa8231de61e68eced58dc9287", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/authnz_ldap.pp": "10c795251b2327614ef0b433591ed128", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "d218c11d4798453d6075f8f1553c94de", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "a166fc9b780abea2eec1ab723ce3a773", "manifests/mod/dav_svn.pp": "641911969d921123865e6566954c0edb", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "f19193d4f119224e19713e0c96a0de6d", "manifests/mod/event.pp": "e48aefd215dd61980f0b9c4d16ef094a", "manifests/mod/expires.pp": "a9b7537846258af84f12b8ce3510dfa8", "manifests/mod/fastcgi.pp": "fec8afea5424f25109a0b7ca912b16b1", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "7c32234950dc74354b06a2da15197179", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "0fa7835f270e511616927afe01a0526c", "manifests/mod/mime_magic.pp": "fe249dd7e1faa5ec5dd936877c64e856", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/nss.pp": "f7a7efaac854599aa7b872665eb5d93c", "manifests/mod/passenger.pp": "e6c48c22a69933b0975609f2bacf2b5d", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/peruser.pp": "3a2eaab65d7be2373740302eac33e5b1", "manifests/mod/php.pp": "a3725f487f58eb354c84a4fee704daa9", "manifests/mod/prefork.pp": "84b64cb7b46ab0c544dfecb476d65e3d", "manifests/mod/proxy.pp": "eb1e8895edee5e97edc789923fc128c8", "manifests/mod/proxy_ajp.pp": "f9b72f1339cc03f068fa684f38793120", "manifests/mod/proxy_balancer.pp": "5ab6987614f8a1afde3a8b701fbbe22a", "manifests/mod/proxy_html.pp": "1a96fd029a305eb88639bf5baf06abdd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/rpaf.pp": "1125f0c5296ca584fa71de474c95475f", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "c8ab5728fda7814dace9a8eebf13476c", "manifests/mod/status.pp": "d7366470082970ac62984581a0ea3fd7", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "b1809ac41b322b090be410d41e57157e", "manifests/mod/wsgi.pp": "a0073502c2267d7e72caaf9f4942ab7c", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/mod.pp": "2d4ab8907db92e50c5ed6e1357fed9fb", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/package.pp": "c32ba42fe3ab4acc49d2e28258108ba1", "manifests/params.pp": "221fa0dcbdd00066e074bc443c0d8fdb", "manifests/peruser/multiplexer.pp": "712017c1d1cee710cd7392a4c4821044", "manifests/peruser/processor.pp": "293fcb9d2e7ae98b36f544953e33074e", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "56e90e48165989a7df3360dc55b01360", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost/custom.pp": "58bd40d3d12d01549545b85667855d38", "manifests/vhost.pp": "41c68c9ef48c3ef9d1c4feb167d71dd2", "spec/classes/apache_spec.rb": "70ebba6cbb794fe0239b0e353796bae9", "spec/classes/dev_spec.rb": "051fcee20c1b04a7d52481c4a23682b3", "spec/classes/mod/auth_kerb_spec.rb": "229c730ac88b05c4ea4e64d395f26f27", "spec/classes/mod/authnz_ldap_spec.rb": "19cef4733927bc3548af8c75a66a8b11", "spec/classes/mod/dav_svn_spec.rb": "b41e721c0b5c7bac1295187f89d27ab7", "spec/classes/mod/dev_spec.rb": "81d37ad0a51e6cae22e79009e719d648", "spec/classes/mod/dir_spec.rb": "a8d473ce36e0aaec0f9f3463cd4bb549", "spec/classes/mod/event_spec.rb": "cce445ab0a7140bdb50897c6f692ec17", "spec/classes/mod/fastcgi_spec.rb": "ff35691208f95aee61150682728c2891", "spec/classes/mod/fcgid_spec.rb": "ca3ee773bdf9ac82e63edee4411d0281", "spec/classes/mod/info_spec.rb": "90f35932812cc86058b6ccfd48eba6e8", "spec/classes/mod/itk_spec.rb": "261aa7759e232f07d70b102f0e8ab828", "spec/classes/mod/mime_magic_spec.rb": "a3748b9bd66514b56aa29a377a233606", "spec/classes/mod/passenger_spec.rb": "ece983e4b228f99f670a5f98878f964b", "spec/classes/mod/perl_spec.rb": "123e73d8de752e83336bed265a354c08", "spec/classes/mod/peruser_spec.rb": "72d00a427208a3bc0dda5578d36e7b0e", "spec/classes/mod/php_spec.rb": "3907e0075049b0d3cdadb17445acae2d", "spec/classes/mod/prefork_spec.rb": "537882d6f314a17c3ead6f51a67b20b8", "spec/classes/mod/proxy_html_spec.rb": "3587873d56172c431f93a78845b7d24e", "spec/classes/mod/python_spec.rb": "9011cd2ac1d452daec091e5cf337dbe7", "spec/classes/mod/rpaf_spec.rb": "b419712d8e6acbe00f5c4034161e40af", "spec/classes/mod/ssl_spec.rb": "969111556de99092152735764194d267", "spec/classes/mod/status_spec.rb": "a1f70673810840e591ac25a1803c39d7", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "cf005d3606362360f7fcccce04e53be6", "spec/classes/mod/wsgi_spec.rb": "37ad1d623b1455e237a75405776d58d9", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "d522ae1652cc87a4b9c6e33034ee5774", "spec/defines/mod_spec.rb": "80d167b475191b63713087462e960a44", "spec/defines/vhost_spec.rb": "89905755a72b938e99f4a01ef64203e9", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "6f29d603a809ae6208243911c0b250e4", "spec/system/default_mods_spec.rb": "fff758602ee95ee67cad2abc71bc54fb", "spec/system/itk_spec.rb": "c645ac3b306da4d3733c33f662959e36", "spec/system/mod_php_spec.rb": "b823cdcfe4288359a3d2dfd70868691d", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "a6f1b3fb3024a0dce75e45a7c2d6cfd0", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "86e147833f1acebf2b08451f02919581", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0", "templates/httpd.conf.erb": "6e768a748deb4737a8faf82ea80196c1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "e65c27aafd88c825ab35b34dd04221ea", "templates/mod/authnz_ldap.conf.erb": "12c9a1482694ddad3143e5eef03fb531", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/event.conf.erb": "dc4223dfb2729e54d4a33cdec03bd518", "templates/mod/fastcgi.conf.erb": "8692d14c4462335c845eede011f6db2f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "8f953519790a5900369fb656054cae35", "templates/mod/mime_magic.conf.erb": "f910e66299cba6ead5f0444e522a0c76", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/nss.conf.erb": "9a9667d308f0783448ca2689b9fc2b93", "templates/mod/passenger.conf.erb": "68a350cf4cf037c2ae64f015cc7a61a3", "templates/mod/peruser.conf.erb": "ac1c2bf2a771ed366f688ec337d6da02", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "38668e1cb5a19d7708e9d26f99e21264", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "907dc25931c6bdb7ce4b61a81be788f8", "templates/mod/status.conf.erb": "afb05015a8337b232127199aa085a023", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "125949c9120aee15303ad755e105d852", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost/_aliases.erb": "e5e3ba8a9ce994334644bd19ad342d8b", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "eca2a0abc3a23d1e08b1132baeade372", "templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2", "templates/vhost/_fastcgi.erb": "e0a1702445e9be189dabe04b829acd7f", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "1f9cc42aaafb80a658294fc39cf61395", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "9c714277eaad73d05d073c1b6c62106a", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "e9fca0c12325af10797b80d827dfddee", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "templates/vhost.conf.erb": "5dc0337da18ff36184df07343982dc93", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mod_load_params.pp": "5981af4d625a906fce1cedeb3f70cb90", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "60e7939034d531dd6b95af35338bcbe7", "tests/vhost.pp": "164bec943d7d5eee1ad6d6c41fe7c28e", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.10.0.tar.gz", "file_size": 85004, "file_md5": "4036f35903264c9b6e3289455cfee225", "downloads": 6389, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
  • /etc/make.conf on FreeBSD
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods        => false,\n      default_confd_files => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with IP address different than '*'

\n\n
    apache::vhost { 'subdomain.example.com':\n      ip      => '127.0.0.1',\n      port    => '80',\n      docrout => '/var/www/subdomain',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n      directories         => { path => '/home/appuser/myphpapp',\n        'suphp'           => { user => 'myappuser', group => 'myappgroup' },\n      }\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

Starting 2.2.16, httpd supports FallbackResource which is a simple replace for common RewriteRules:

\n\n
    apache::vhost { 'wordpress.example.com':\n      port                => '80',\n      docroot             => '/var/www/wordpress',\n      fallbackresource    => '/index.php',\n    }\n
\n\n

Please note that the disabled argument to FallbackResource is only supported since 2.2.24.

\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_confd_files
\n\n

Generates default set of include-able apache configuration files under ${apache::confd_dir} directory. These configuration files correspond to what is usually installed with apache package on given platform.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian, /usr/local/etc/apache22/server.crt for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian, /usr/local/etc/apache22/server.key for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_name
\n\n

Name of apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted. Defaults to 'true'.

\n\n
service_ensure
\n\n

Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.

\n\n
purge_configs
\n\n

Removes all other apache configs and vhosts, which is automatically set to true. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise managed configuration. It is recommended that you move your configuration entirely to resources within this module.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat, /etc/apache2 on Debian and /usr/local on FreeBSD.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat and /etc/apache2 on Debian.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork or apache::mod::worker classes with parameters. All possible values are event, itk, peruser, prefork, worker (valid values depend on agent's OS), or the boolean false. Defaults to prefork on RedHat and FreeBSD and worker on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing $mpm_module one has to deinstall all packages that depend on currently installed apache.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
log_level
\n\n

Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are emerg, alert, crit, error, warn, notice, info or debug.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n
server_tokens
\n\n

Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'.

\n\n
server_signature
\n\n

Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'.

\n\n
trace_enable
\n\n

Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for 'TraceEnable'. Defaults to 'On'.

\n\n
manage_user
\n\n

Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.

\n\n
manage_group
\n\n

Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.

\n\n
package_ensure
\n\n

Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • dav_svn
  • \n
  • deflate
  • \n
  • dev
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • event
  • \n
  • fastcgi
  • \n
  • fcgid
  • \n
  • headers
  • \n
  • info
  • \n
  • itk
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic*
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • nss*
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • peruser
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_ajp
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • rewrite
  • \n
  • rpaf*
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status*
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • vhost_alias
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template. These are the defaults:

\n\n
    class { 'apache::mod::ssl':\n      ssl_compression => false,\n      ssl_options     => [ 'StdEnvVars' ],\n  }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n      wsgi_python_path   => '/path/to/virtenv/site-packages',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias or AliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [\n  { aliasmatch => '^/image/(.*)\\.jpg$', path => '/files/jpg.images/$1.jpg' }\n  { alias      => '/image',             path => '/ftp/pub/image' },\n],\n
\n\n

For Alias and AliasMatch to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block. The Alias and AliasMatch directives are created in the order specified in the aliases paramter. As described in the mod_alias documentation more specific Alias or AliasMatch directives should come before the more general ones to avoid shadowing.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. An optional provider defaults to directory. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

provider can be set to any of directory, files, or location. If the pathspec starts with a ~, httpd will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch, respectively.

\n\n
    apache::vhost { 'files.example.net':\n      docroot     => '/var/www/files',\n      directories => [\n        { path => '~ (\\.swp|\\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },\n      ],\n    }\n
\n\n

The directives will be embedded within the Directory (Files, or Location) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this directory. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      directories => [ { path => '/srv/www'\n        error_documents => [\n          { 'error_code' => '503', 'document' => '/service-unavail' },\n        ],\n      }]\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
index_options
\n\n

Styles the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],\n    }\n
\n\n
index_order_default
\n\n

Sets the order of the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
ssl_options
\n\n

String or list of SSLOptions for the given <Directory> block. This overrides, or refines the SSLOptions of the parent block (either vhost, or server).

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', ssl_options => '+ExportCertData' }\n        { path => '/path/to/different/dir', ssl_options => [ '-StdEnvVars', '+ExportCertData'] },\n      ],\n    }\n
\n\n
suphp
\n\n

An array containing two values: User and group for the suPHP_UserGroup setting.\nThis directive must be used with suphp_engine => on in the vhost declaration. This directive only works in <Directory> or <Location>.

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', suphp => { user =>  'myappuser', group => 'myappgroup' }\n      ],\n    }\n
\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
directoryindex
\n\n

Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this vhost. Defaults to []. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      error_documents => [\n        { 'error_code' => '503', 'document' => '/service-unavail' },\n        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },\n      ],\n    }\n
\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
fastcgi_server
\n\n

Specifies the filename as an external FastCGI application. Defaults to 'undef'.

\n\n
fastcgi_socket
\n\n

Filename used to communicate with the web server. Defaults to 'undef'.

\n\n
fastcgi_dir
\n\n

Directory to enable for FastCGI. Defaults to 'undef'.

\n\n
additional_includes
\n\n

Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
log_level
\n\n

Specifies the verbosity level of the error log. Defaults to warn for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for log_level is one of emerg, alert, crit, error, warn, notice, info or debug.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
scriptaliases
\n\n

Passes a list of hashes to the vhost to create ScriptAlias or ScriptAliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
    scriptaliases => [\n      {\n        alias => '/myscript',\n        path  => '/usr/share/myscript',\n      },\n      {\n        aliasmatch => '^/foo(.*)',\n        path       => '/usr/share/fooscripts$1',\n      },\n      {\n        aliasmatch => '^/bar/(.*)',\n        path       => '/usr/share/bar/wrapper.sh/$1',\n      },\n      {\n        alias => '/neatscript',\n        path  => '/usr/share/neatscript',\n      },\n    ]\n
\n\n

These directives are created in the order specified. As with Alias and AliasMatch directives the more specific aliases should come before the more general ones to avoid shadowing.

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_protocol
\n\n

Specifies the SSL Protocol (SSLProtocol).

\n\n
ssl_cipher
\n\n

Specifies the SSLCipherSuite.

\n\n
ssl_honorcipherorder
\n\n

Sets SSLHonorCipherOrder directive, used to prefer the server's cipher preference order

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs on Debian and /etc/pki/tls/certs on RedHat.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
ssl_verify_client
\n\n

Sets SSLVerifyClient directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_client => 'optional',\n    }\n
\n\n
ssl_verify_depth
\n\n

Sets SSLVerifyDepth directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_depth => 1,\n    }\n
\n\n
ssl_options
\n\n

Sets SSLOptions directives as per the Apache Core documentation. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => '+ExportCertData',\n    }\n
\n\n

An array of strings example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => [ '+StrictRequire', '+ExportCertData' ],\n    }\n
\n\n
ssl_proxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

On FreeBSD you're required to define apache::package or apache class before apache::dev.

\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "

2013-12-05 Release 0.10.0

\n\n

Summary:

\n\n

This release adds FreeBSD osfamily support and various other improvements to some mods.

\n\n

Features:

\n\n
    \n
  • Add suPHP_UserGroup directive to directory context
  • \n
  • Add support for ScriptAliasMatch directives
  • \n
  • Set SSLOptions StdEnvVars in server context
  • \n
  • No implicit entry for ScriptAlias path
  • \n
  • Add support for overriding ErrorDocument
  • \n
  • Add support for AliasMatch directives
  • \n
  • Disable default "allow from all" in vhost-directories
  • \n
  • Add WSGIPythonPath as an optional parameter to mod_wsgi.
  • \n
  • Add mod_rpaf support
  • \n
  • Add directives: IndexOptions, IndexOrderDefault
  • \n
  • Add ability to include additional external configurations in vhost
  • \n
  • need to use the provider variable not the provider key value from the directory hash for matches
  • \n
  • Support for FreeBSD and few other features
  • \n
  • Add new params to apache::mod::mime class
  • \n
  • Allow apache::mod to specify module id and path
  • \n
  • added $server_root parameter
  • \n
  • Add Allow and ExtendedStatus support to mod_status
  • \n
  • Expand vhost/_directories.pp directive support
  • \n
  • Add initial support for nss module (no directives in vhost template yet)
  • \n
  • added peruser and event mpms
  • \n
  • added $service_name parameter
  • \n
  • add parameter for TraceEnable
  • \n
  • Make LogLevel configurable for server and vhost
  • \n
  • Add documentation about $ip
  • \n
  • Add ability to pass ip (instead of wildcard) in default vhost files
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Don't listen on port or set NameVirtualHost for non-existent vhost
  • \n
  • only apply Directory defaults when provider is a directory
  • \n
  • Working mod_authnz_ldap support on Debian/Ubuntu
  • \n
\n\n

2013-09-06 Release 0.9.0

\n\n

Summary:

\n\n

This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.

\n\n

Backwards-incompatible Changes:

\n\n
    \n
  • Remove many default mods that are not normally needed.
  • \n
  • Remove rewrite_base apache::vhost parameter; did not work anyway.
  • \n
  • Specify dependencies on stdlib >=2.4.0 (this was already the case, but\nmaking explicit)
  • \n
  • Deprecate a2mod in favor of the apache::mod::* classes and apache::mod\ndefined resource.
  • \n
\n\n

Features:

\n\n
    \n
  • apache class\n\n
      \n
    • Add httpd_dir parameter to change the location of the configuration\nfiles.
    • \n
    • Add logroot parameter to change the logroot
    • \n
    • Add ports_file parameter to changes the ports.conf file location
    • \n
    • Add keepalive parameter to enable persistent connections
    • \n
    • Add keepalive_timeout parameter to change the timeout
    • \n
    • Update default_mods to be able to take an array of mods to enable.
    • \n
  • \n
  • apache::vhost\n\n
      \n
    • Add wsgi_daemon_process, wsgi_daemon_process_options,\nwsgi_process_group, and wsgi_script_aliases parameters for per-vhost\nWSGI configuration.
    • \n
    • Add access_log_syslog parameter to enable syslogging.
    • \n
    • Add error_log_syslog parameter to enable syslogging of errors.
    • \n
    • Add directories hash parameter. Please see README for documentation.
    • \n
    • Add sslproxyengine parameter to enable SSLProxyEngine
    • \n
    • Add suphp_addhandler, suphp_engine, and suphp_configpath for\nconfiguring SuPHP.
    • \n
    • Add custom_fragment parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)
    • \n
  • \n
  • Add apache::mod::suphp class for configuring SuPHP.
  • \n
  • Add apache::mod::itk class for configuring ITK mpm module.
  • \n
  • Update apache::mod::wsgi class for global WSGI configuration with\nwsgi_socket_prefix and wsgi_python_home parameters.
  • \n
  • Add README.passenger.md to document the apache::mod::passenger usage.\nAdded passenger_high_performance, passenger_pool_idle_time,\npassenger_max_requests, passenger_stat_throttle_rate, rack_autodetect,\nand rails_autodetect parameters.
  • \n
  • Separate the httpd service resource into a new apache::service class for\ndependency chaining of Class['apache'] -> <resource> ~>\nClass['apache::service']
  • \n
  • Added apache::mod::proxy_balancer class for apache::balancer
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Change dependency to puppetlabs-concat
  • \n
  • Fix ruby 1.9 bug for a2mod
  • \n
  • Change servername to be $::hostname if there is no $::fqdn
  • \n
  • Make /etc/ssl/certs the default ssl certs directory for RedHat non-5.
  • \n
  • Make php the default php package for RedHat non-5.
  • \n
  • Made aliases able to take a single alias hash instead of requiring an\narray.
  • \n
\n\n

2013-07-26 Release 0.8.1

\n\n

Bugfixes:

\n\n
    \n
  • Update apache::mpm_module detection for worker/prefork
  • \n
  • Update apache::mod::cgi and apache::mod::cgid detection for\nworker/prefork
  • \n
\n\n

2013-07-16 Release 0.8.0

\n\n

Features:

\n\n
    \n
  • Add servername parameter to apache class
  • \n
  • Add proxy_set parameter to apache::balancer define
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix ordering for multiple apache::balancer clusters
  • \n
  • Fix symlinking for sites-available on Debian-based OSs
  • \n
  • Fix dependency ordering for recursive confdir management
  • \n
  • Fix apache::mod::* to notify the service on config change
  • \n
  • Documentation updates
  • \n
\n\n

2013-07-09 Release 0.7.0

\n\n

Changes:

\n\n
    \n
  • Essentially rewrite the module -- too many to list
  • \n
  • apache::vhost has many abilities -- see README.md for details
  • \n
  • apache::mod::* classes provide httpd mod-loading capabilities
  • \n
  • apache base class is much more configurable
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Many. And many more to come
  • \n
\n\n

2013-03-2 Release 0.6.0

\n\n
    \n
  • update travis tests (add more supported versions)
  • \n
  • add access log_parameter
  • \n
  • make purging of vhost dir configurable
  • \n
\n\n

2012-08-24 Release 0.4.0

\n\n

Changes:

\n\n
    \n
  • include apache is now required when using apache::mod::*
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix syntax for validate_re
  • \n
  • Fix formatting in vhost template
  • \n
  • Fix spec tests such that they pass

    \n\n

    2012-05-08 Puppet Labs info@puppetlabs.com - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache

  • \n
\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-05 15:29:14 -0800", "updated_at": "2013-12-05 15:29:14 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "version": "0.10.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.5.0-rc1", "version": "0.5.0-rc1" }, { "uri": "/v3/releases/puppetlabs-apache-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.2", "version": "0.2.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apache", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-mysql", "name": "mysql", "downloads": 70534, "created_at": "2011-12-13 22:11:06 -0800", "updated_at": "2014-01-06 14:39:08 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-mysql-2.1.0", "module": { "uri": "/v3/modules/puppetlabs-mysql", "name": "mysql", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "2.1.0", "metadata": { "name": "puppetlabs-mysql", "version": "2.1.0", "summary": "Mysql module", "author": "Puppet Labs", "description": "Mysql module", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ { "properties": [ { "name": "password_hash", "doc": "The password hash of the user. Use mysql_password() for creating such a hash." }, { "name": "max_user_connections", "doc": "Max concurrent connections for the user. 0 means no (or global) limit." } ], "parameters": [ { "name": "name", "doc": "The name of the user. This uses the 'username@hostname' or username@hostname." } ], "providers": [ { "name": "mysql", "doc": "manage users for a mysql database." } ], "name": "database_user", "doc": "Manage a database user. This includes management of users password as well as privileges" }, { "properties": [ { "name": "charset", "doc": "The CHARACTER SET setting for the database" }, { "name": "collate", "doc": "The COLLATE setting for the database" } ], "parameters": [ { "name": "name", "doc": "The name of the MySQL database to manage." } ], "providers": [ { "name": "mysql", "doc": "Manages MySQL databases." } ], "name": "mysql_database", "doc": "Manage MySQL databases." }, { "properties": [ { "name": "password_hash", "doc": "The password hash of the user. Use mysql_password() for creating such a hash." }, { "name": "max_user_connections", "doc": "Max concurrent connections for the user. 0 means no (or global) limit." }, { "name": "max_connections_per_hour", "doc": "Max connections per hour for the user. 0 means no (or global) limit." }, { "name": "max_queries_per_hour", "doc": "Max queries per hour for the user. 0 means no (or global) limit." }, { "name": "max_updates_per_hour", "doc": "Max updates per hour for the user. 0 means no (or global) limit." } ], "parameters": [ { "name": "name", "doc": "The name of the user. This uses the 'username@hostname' or username@hostname." } ], "providers": [ { "name": "mysql", "doc": "manage users for a mysql database." } ], "name": "mysql_user", "doc": "Manage a MySQL user. This includes management of users password as well as privileges." }, { "properties": [ { "name": "charset", "doc": "The characterset to use for a database" } ], "parameters": [ { "name": "name", "doc": "The name of the database." } ], "providers": [ { "name": "mysql", "doc": "Manages MySQL database." } ], "name": "database", "doc": "Manage databases." }, { "properties": [ { "name": "privileges", "doc": "The privileges the user should have. The possible values are implementation dependent." } ], "parameters": [ { "name": "name", "doc": "The primary key: either user@host for global privilges or user@host/database for database specific privileges" } ], "providers": [ { "name": "mysql", "doc": "Uses mysql as database." } ], "name": "database_grant", "doc": "Manage a database user's rights." }, { "properties": [ { "name": "privileges", "doc": "Privileges for user" }, { "name": "table", "doc": "Table to apply privileges to." }, { "name": "user", "doc": "User to operate on." }, { "name": "options", "doc": "Options to grant." } ], "parameters": [ { "name": "name", "doc": "Name to describe the grant." } ], "providers": [ { "name": "mysql", "doc": "Set grants for users in MySQL." } ], "name": "mysql_grant", "doc": "Manage a MySQL user's rights." } ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "754de171830d3a00220cdc85bcb794a0", ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "35fe54be03fbc47ce9b015b22240e683", "CHANGELOG": "0955be7c90f16e48ae9749641170ca69", "Gemfile": "4d0813cea67347e0abb409f53f814155", "Gemfile.lock": "9ee04c7900f8209895e1acee1664ce7d", "LICENSE": "6089b6bd1f0d807edb8bdfd76da0b038", "Modulefile": "8faf920c294adde182c9087cf1113db3", "README.md": "9afcf56a8845ec7e06739bb74478929e", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "TODO": "88ca4024a37992b46c34cb46e4ac39e6", "files/mysqltuner.pl": "65056d1386e04fdf22a1fee556c1b9fc", "lib/puppet/parser/functions/mysql_deepmerge.rb": "6f20428e15e98f2368ee63a56412a7c3", "lib/puppet/parser/functions/mysql_password.rb": "a4c8ec72dede069508dbc266131b06a3", "lib/puppet/parser/functions/mysql_strip_hash.rb": "3efe69f1eb189b2913e178b8472aaede", "lib/puppet/provider/database/mysql.rb": "66e7506c4823bb5ea150ca3c1b62bc98", "lib/puppet/provider/database_grant/mysql.rb": "163fd7c65bc3e1371393f3d5c8d6ae10", "lib/puppet/provider/database_user/mysql.rb": "47f13b62d5bb05ae7184e50a6a38a13c", "lib/puppet/provider/mysql.rb": "e8eb4be7cead5b8627ccaea1f435c95a", "lib/puppet/provider/mysql_database/mysql.rb": "466af4dc5e7689b47a9322f4d8a9b3f2", "lib/puppet/provider/mysql_grant/mysql.rb": "f27f8cc23f74ce59a49172d8e6a0d5dc", "lib/puppet/provider/mysql_user/mysql.rb": "87aee13a24a2d01ed34e3b91b9297e40", "lib/puppet/type/database.rb": "7b4b49b841d41541ce719d1a051ee94b", "lib/puppet/type/database_grant.rb": "66fce5df0f3f4111fe37f094965f6f93", "lib/puppet/type/database_user.rb": "b2a87e3854324fb0ae407a1fbad5802a", "lib/puppet/type/mysql_database.rb": "e21a38611edc6cba5454889170bc0ebc", "lib/puppet/type/mysql_grant.rb": "9e34c78952e5fcc073f089e58ab35cf3", "lib/puppet/type/mysql_user.rb": "ddb054a5fd03689ae4325fbe003a41d3", "manifests/backup.pp": "dfa324a48d47935a8423b102458c6516", "manifests/bindings.pp": "5976e9b74a29cc3a102f49867709a08f", "manifests/bindings/java.pp": "6a581f1da1690d436ae14832af551ca2", "manifests/bindings/perl.pp": "e765d0792afacbe72cf3e65804b78fe7", "manifests/bindings/php.pp": "09017ca0adefbb8bf894393371cfad94", "manifests/bindings/python.pp": "50c22f04074695f17ea383b307d01ea3", "manifests/bindings/ruby.pp": "99f7c01e468136c8e699fcbb36d037fa", "manifests/client.pp": "ab5a3ece8f5c4cc2174532472bdc5afe", "manifests/client/install.pp": "381f70bfbaac921d631e3b115d8ae264", "manifests/db.pp": "0dd59f8d1578c25a2517d4fda862624b", "manifests/init.pp": "52ad9ac01674695edaf62cc1c48ef4f8", "manifests/params.pp": "033b2e0f88f15b2d8aab3b08ed470abd", "manifests/server.pp": "1bafcd02849a12efaa2271e55380393b", "manifests/server/account_security.pp": "c793a434142ddaa6a529ed59739368fb", "manifests/server/backup.pp": "ff6239ff4e2c46f42ec9b34a805c6718", "manifests/server/config.pp": "dcc92deb6e2e100bf150016a8fb2a42d", "manifests/server/install.pp": "8666481a3ea12e9f76c47dfa558c09e6", "manifests/server/monitor.pp": "a63731018c171de9e441009d453dcac8", "manifests/server/mysqltuner.pp": "4b19b075ecb7a7054cac237e5f50ed16", "manifests/server/providers.pp": "87a019dce5bbb6b18c9aa61b5f99134c", "manifests/server/root_password.pp": "73738c1b6ee42b896db5356575c95af6", "manifests/server/service.pp": "e79e2206b06d41956fb6d87fc1d20aa0", "spec/classes/mysql_bindings_spec.rb": "cfc90d020af62a2315129c84f6acc7d9", "spec/classes/mysql_client_spec.rb": "1849bea122f7282153cbc46ca04aa851", "spec/classes/mysql_server_account_security_spec.rb": "e223281077baa230fb6b7387f56af6d8", "spec/classes/mysql_server_backup_spec.rb": "4c7e64b955bf1df76aead3bf93c2ae1c", "spec/classes/mysql_server_monitor_spec.rb": "2bf20049616769424afd4a5137e25511", "spec/classes/mysql_server_mysqltuner_spec.rb": "7a098808c21e3f08cd26237a96acc878", "spec/classes/mysql_server_spec.rb": "bc2dccc7ea00340a048ac91d602c1ac0", "spec/defines/mysql_db_spec.rb": "26b348846df5013819c7c9f18090ffc4", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "92fefec2bd21423ec2aece165375678b", "spec/spec_helper_system.rb": "30ef76d722878ce9049203e753663335", "spec/system/mysql_account_delete_spec.rb": "ff8d45ad704f7e3c5fdcae7a4be2ea6e", "spec/system/mysql_backup_spec.rb": "e30ef8f335f216afa489077643f57c98", "spec/system/mysql_bindings_spec.rb": "1e8cb8b2eb50ee3a7f663d6bc979ae2d", "spec/system/mysql_db_spec.rb": "798771e3185a52fdc29513bf4eb33d15", "spec/system/mysql_server_monitor_spec.rb": "5f282becde15a434aee3f56c99e61ca2", "spec/system/mysql_server_root_password_spec.rb": "3e8fd20f19e0803dcd20cdac5f0179c8", "spec/system/mysql_server_spec.rb": "f3039e1e7737712ca45d7e14e2cad28f", "spec/system/types/mysql_grant_spec.rb": "7224f1d7d44e63a5d3a44b43cc38be5d", "spec/system/types/mysql_user_spec.rb": "63f1d4c5136291b3cfba33a07e8bb37d", "spec/unit/mysql_password_spec.rb": "7e1f9c635cb9dd4143054e096515006b", "spec/unit/puppet/functions/mysql_deepmerge_spec.rb": "6b33280aa390e1e7788168df65499fd5", "spec/unit/puppet/provider/database/mysql_spec.rb": "3bb92bdaaddfd54e7700012b2418f1ba", "spec/unit/puppet/provider/database_grant/mysql_spec.rb": "261c22e57374b6651b87fcac86c9b563", "spec/unit/puppet/provider/database_user/mysql_spec.rb": "50709cf2cf3f852a56de1856222b9b1f", "spec/unit/puppet/provider/mysql_database/mysql_spec.rb": "86bfe78acaefd34ed195742e9aff5896", "spec/unit/puppet/provider/mysql_user/mysql_spec.rb": "d59edf286efa51990d0db1c0307e91ea", "spec/unit/puppet/type/mysql_database_spec.rb": "0b32abc822e7613bdbb46f0a35c5b999", "spec/unit/puppet/type/mysql_user_spec.rb": "1a20ac660f54f9976bb5a0c03c339efc", "templates/my.cnf.erb": "0cb43aad4d2c5903cad87bffa3569348", "templates/my.cnf.pass.erb": "30b24a3f29fcc644bd3a73929305cda0", "templates/my.conf.cnf.erb": "5ebda0d5d774b2a51c25c43fbfed544a", "templates/mysqlbackup.sh.erb": "b5ca36fac16da99ec88344addd03b997", "tests/backup.pp": "caae4da564c1f663341bbe50915a5f7d", "tests/bindings.pp": "dda8795d67098b66aa65e81ccc48ed73", "tests/init.pp": "6b34827ac4731829c8a117f0b3fb8167", "tests/java.pp": "0ad9de4f9f2c049642bcf08124757085", "tests/mysql_database.pp": "2a85cd95a9952e3d93aa05f8f236551e", "tests/mysql_grant.pp": "cd42336a6c7b2d27f5d5d6d0e310ee1a", "tests/mysql_user.pp": "7aa29740f3b6cd8a7041d59af2d595cc", "tests/perl.pp": "6e496f19eaae83c90ce8b93236d44bca", "tests/python.pp": "b093828acfed9c14e25ebdd60d90c282", "tests/ruby.pp": "6c5071fcaf731995c9b8e31e00eaffa0", "tests/server.pp": "72e22552a95b9a5e4a349dbfc13639dc", "tests/server/account_security.pp": "47f79d7ae9eac2bf2134db27abf1db37", "tests/server/config.pp": "619b4220138a12c6cb5f10af9867d8a1" }, "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", "license": "Apache 2.0" }, "tags": [ "mysql", "database", "percona", "mariadb", "centos", "rhel", "ubuntu", "debian", "mysql_grant", "mysql_user", "mysql_database", "providers" ], "file_uri": "/v3/files/puppetlabs-mysql-2.1.0.tar.gz", "file_size": 59365, "file_md5": "e5ebf6b7e92cac28feb381f601ac9422", "downloads": 9105, "readme": "

MySQL

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with mysql\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

The MySQL module installs, configures, and manages the MySQL service.

\n\n

Module Description

\n\n

The MySQL module manages both the installation and configuration of MySQL as\nwell as extends Pupppet to allow management of MySQL resources, such as\ndatabases, users, and grants.

\n\n

Backwards Compatibility

\n\n

This module has just undergone a very large rewrite. As a result it will no\nlonger work with the previous classes and configuration as before. We've\nattempted to handle backwards compatibility automatically by adding a\nattempt_compatibility_mode parameter to the main mysql class. If you set\nthis to true it will attempt to map your previous parameters into the new\nmysql::server class.

\n\n

WARNING

\n\n

This may fail. It may eat your MySQL server. PLEASE test it before running it\nlive. Even if it's just a no-op and a manual comparision. Please be careful!

\n\n

Setup

\n\n

What MySQL affects

\n\n
    \n
  • MySQL package.
  • \n
  • MySQL configuration files.
  • \n
  • MySQL service.
  • \n
\n\n

Beginning with MySQL

\n\n

If you just want a server installing with the default options you can run\ninclude '::mysql::server'. If you need to customize options, such as the root\npassword or /etc/my.cnf settings then you can also include mysql::server and\npass in an override hash as seen below:

\n\n
class { '::mysql::server':\n  root_password    => 'strongpassword',\n  override_options => { 'mysqld' => { 'max_connections' => '1024' } }\n}\n
\n\n

Usage

\n\n

All interaction for the server is done via mysql::server. To install the\nclient you use mysql::client, and to install bindings you can use\nmysql::bindings.

\n\n

Overrides

\n\n

The hash structure for overrides in mysql::server is as follows:

\n\n
$override_options = {\n  'section' => {\n    'item'             => 'thing',\n  }\n}\n
\n\n

For items that you would traditionally represent as:

\n\n
\n[section]\nthing\n
\n\n

You can just make an entry like thing => true in the hash. MySQL doesn't\ncare if thing is alone or set to a value, it'll happily accept both.

\n\n

Custom configuration

\n\n

To add custom mysql configuration you can drop additional files into\n/etc/mysql/conf.d/ in order to override settings or add additional ones (if you\nchoose not to use override_options in mysql::server). This location is\nhardcoded into the my.cnf template file.

\n\n

Reference

\n\n

Classes

\n\n

Public classes

\n\n
    \n
  • mysql::server: Installs and configures MySQL.
  • \n
  • mysql::server::account_security: Deletes default MySQL accounts.
  • \n
  • mysql::server::monitor: Sets up a monitoring user.
  • \n
  • mysql::server::mysqltuner: Installs MySQL tuner script.
  • \n
  • mysql::server::backup: Sets up MySQL backups via cron.
  • \n
  • mysql::bindings: Installs various MySQL language bindings.
  • \n
  • mysql::client: Installs MySQL client (for non-servers).
  • \n
\n\n

Private classes

\n\n
    \n
  • mysql::server::install: Installs packages.
  • \n
  • mysql::server::config: Configures MYSQL.
  • \n
  • mysql::server::service: Manages service.
  • \n
  • mysql::server::root_password: Sets MySQL root password.
  • \n
  • mysql::server::providers: Creates users, grants, and databases.
  • \n
  • mysql::bindings::java: Installs Java bindings.
  • \n
  • mysql::bindings::perl: Installs Perl bindings.
  • \n
  • mysql::bindings::python: Installs Python bindings.
  • \n
  • mysql::bindings::ruby: Installs Ruby bindings.
  • \n
  • mysql::client::install: Installs MySQL client.
  • \n
\n\n

Parameters

\n\n

mysql::server

\n\n
root_password
\n\n

What is the MySQL root password. Puppet will attempt to set it to this and update /root/.my.cnf.

\n\n
old_root_password
\n\n

What was the previous root password (REQUIRED if you wish to change the root password via Puppet.)

\n\n
override_options
\n\n

This is the hash of override options to pass into MySQL. It can be visualized\nlike a hash of the my.cnf file, so that entries look like:

\n\n
$override_options = {\n  'section' => {\n    'item'             => 'thing',\n  }\n}\n
\n\n

For items that you would traditionally represent as:

\n\n
\n[section]\nthing\n
\n\n

You can just make an entry like thing => true in the hash. MySQL doesn't\ncare if thing is alone or set to a value, it'll happily accept both.

\n\n
config_file
\n\n

The location of the MySQL configuration file.

\n\n
manage_config_file
\n\n

Should we manage the MySQL configuration file.

\n\n
purge_conf_dir
\n\n

Should we purge the conf.d directory?

\n\n
restart
\n\n

Should the service be restarted when things change?

\n\n
root_group
\n\n

What is the group used for root?

\n\n
package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
package_name
\n\n

What is the name of the mysql server package to install.

\n\n
remove_default_accounts
\n\n

Boolean to decide if we should automatically include\nmysql::server::account_security.

\n\n
service_enabled
\n\n

Boolean to decide if the service should be enabled.

\n\n
service_manage
\n\n

Boolean to decide if the service should be managed.

\n\n
service_name
\n\n

What is the name of the mysql server service.

\n\n
service_provider
\n\n

Which provider to use to manage the service.

\n\n
users
\n\n

Optional hash of users to create, which are passed to mysql_user. Example:

\n\n
$users = {\n  'someuser@localhost' => {\n    ensure                   => 'present',\n    max_connections_per_hour => '0',\n    max_queries_per_hour     => '0',\n    max_updates_per_hour     => '0',\n    max_user_connections     => '0',\n    password_hash            => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF',\n  },\n}\n
\n\n
grants
\n\n

Optional hash of grants, which are passed to mysql_grant. Example:

\n\n
$grants = {\n  'someuser@localhost/somedb.*' => {\n    ensure     => 'present',\n    options    => ['GRANT'],\n    privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'],\n    table      => 'somedb.*',\n    user       => 'someuser@localhost',\n  },\n}\n
\n\n
databases
\n\n

Optional hash of databases to create, which are passed to mysql_database. Example:

\n\n
$databases = {\n  'somedb' => {\n    ensure  => 'present',\n    charset => 'utf8',\n  },\n}\n
\n\n
service_provider
\n\n

mysql::server::backup

\n\n
backupuser
\n\n

MySQL user to create for backing up.

\n\n
backuppassword
\n\n

MySQL user password for backups.

\n\n
backupdir
\n\n

Directory to backup into.

\n\n
backupcompress
\n\n

Boolean to determine if backups should be compressed.

\n\n
backuprotate
\n\n

How many days to keep backups for.

\n\n
delete_before_dump
\n\n

Boolean to determine if you should cleanup before backing up or after.

\n\n
backupdatabases
\n\n

Array of databases to specifically backup.

\n\n
file_per_database
\n\n

Should a seperate file be used per database.

\n\n
ensure
\n\n

Present or absent, allows you to remove the backup scripts.

\n\n
time
\n\n

An array of two elements to set the time to backup. Allows ['23', '5'] or ['3', '45'] for HH:MM times.

\n\n

mysql::server::monitor

\n\n
mysql_monitor_username
\n\n

The username to create for MySQL monitoring.

\n\n
mysql_monitor_password
\n\n

The password to create for MySQL monitoring.

\n\n
mysql_monitor_hostname
\n\n

The hostname to allow to access the MySQL monitoring user.

\n\n

mysql::bindings

\n\n
java_enable
\n\n

Boolean to decide if the Java bindings should be installed.

\n\n
perl_enable
\n\n

Boolean to decide if the Perl bindings should be installed.

\n\n
php_enable
\n\n

Boolean to decide if the PHP bindings should be installed.

\n\n
python_enable
\n\n

Boolean to decide if the Python bindings should be installed.

\n\n
ruby_enable
\n\n

Boolean to decide if the Ruby bindings should be installed.

\n\n
java_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
java_package_name
\n\n

The name of the package to install.

\n\n
java_package_provider
\n\n

What provider should be used to install the package.

\n\n
perl_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
perl_package_name
\n\n

The name of the package to install.

\n\n
perl_package_provider
\n\n

What provider should be used to install the package.

\n\n
python_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
python_package_name
\n\n

The name of the package to install.

\n\n
python_package_provider
\n\n

What provider should be used to install the package.

\n\n
ruby_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
ruby_package_name
\n\n

The name of the package to install.

\n\n
ruby_package_provider
\n\n

What provider should be used to install the package.

\n\n

mysql::client

\n\n
bindings_enable
\n\n

Boolean to automatically install all bindings.

\n\n
package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
package_name
\n\n

What is the name of the mysql client package to install.

\n\n

Defines

\n\n

mysql::db

\n\n

Creates a database with a user and assign some privileges.

\n\n
    mysql::db { 'mydb':\n      user     => 'myuser',\n      password => 'mypass',\n      host     => 'localhost',\n      grant    => ['SELECT', 'UPDATE'],\n    }\n
\n\n

Providers

\n\n

mysql_database

\n\n

mysql_database can be used to create and manage databases within MySQL:

\n\n
mysql_database { 'information_schema':\n  ensure  => 'present',\n  charset => 'utf8',\n  collate => 'utf8_swedish_ci',\n}\nmysql_database { 'mysql':\n  ensure  => 'present',\n  charset => 'latin1',\n  collate => 'latin1_swedish_ci',\n}\n
\n\n

mysql_user

\n\n

mysql_user can be used to create and manage user grants within MySQL:

\n\n
mysql_user { 'root@127.0.0.1':\n  ensure                   => 'present',\n  max_connections_per_hour => '0',\n  max_queries_per_hour     => '0',\n  max_updates_per_hour     => '0',\n  max_user_connections     => '0',\n}\n
\n\n

mysql_grant

\n\n

mysql_grant can be used to create grant permissions to access databases within\nMySQL. To use it you must create the title of the resource as shown below,\nfollowing the pattern of username@hostname/database.table:

\n\n
mysql_grant { 'root@localhost/*.*':\n  ensure     => 'present',\n  options    => ['GRANT'],\n  privileges => ['ALL'],\n  table      => '*.*',\n  user       => 'root@localhost',\n}\n
\n\n

Limitations

\n\n

This module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Authors

\n\n

This module is based on work by David Schmitt. The following contributor have contributed patches to this module (beyond Puppet Labs):

\n\n
    \n
  • Larry Ludwig
  • \n
  • Christian G. Warden
  • \n
  • Daniel Black
  • \n
  • Justin Ellison
  • \n
  • Lowe Schmidt
  • \n
  • Matthias Pigulla
  • \n
  • William Van Hevelingen
  • \n
  • Michael Arnold
  • \n
  • Chris Weyl
  • \n
\n
", "changelog": "
2013-11-13 - Version 2.1.0\n\nSummary:\n\nThe most important changes in 2.1.0 are improvements to the my.cnf creation,\nas well as providers.  Setting options to = true strips them to be just the\nkey name itself, which is required for some options.\n\nThe provider updates fix a number of bugs, from lowercase privileges to\ndeprecation warnings.\n\nLast, the new hiera integration functionality should make it easier to\nexternalize all your grantts, users, and, databases.  Another great set of\ncommunity submissions helped to make this release.\n\nFeatures:\n- Some options can not take a argument. Gets rid of the '= true' when an\noption is set to true.\n- Easier hiera integration:  Add hash parameters to mysql::server to allow\nspecifying grants, users, and databases.\n\nFixes:\n- Fix an issue with lowercase privileges in mysql_grant{} causing them to be reapplied needlessly.\n- Changed defaults-file to defaults-extra-file in providers.\n- Ensure /root/.my.cnf is 0600 and root owned.\n- database_user deprecation warning was incorrect.\n- Add anchor pattern for client.pp\n- Documentation improvements.\n- Various test fixes.\n\n2013-10-21 - Version 2.0.1\n\nSummary:\n\nThis is a bugfix release to handle an issue where unsorted mysql_grant{}\nprivileges could cause Puppet to incorrectly reapply the permissions on\neach run.\n\nFixes:\n- Mysql_grant now sorts privileges in the type and provider for comparision.\n- Comment and test tweak for PE3.1.\n\n2013-10-14 - Version 2.0.0\n\nSummary:\n\n(Previously detailed in the changelog for 2.0.0-rc1)\n\nThis module has been completely refactored and works significantly different.\nThe changes are broad and touch almost every piece of the module.\n\nSee the README.md for full details of all changes and syntax.\nPlease remain on 1.0.0 if you don't have time to fully test this in dev.\n\n* mysql::server, mysql::client, and mysql::bindings are the primary interface\nclasses.\n* mysql::server takes an `options_override` parameter to set my.cnf options,\nwith the hash format: { 'section' => { 'thing' => 'value' }}\n* mysql attempts backwards compatibility by forwarding all parameters to\nmysql::server.\n\n2013-10-09 - Version 2.0.0-rc5\n\nSummary:\n\nHopefully the final rc!  Further fixes to mysql_grant (stripping out the\ncleverness so we match a much wider range of input.)\n\nFixes:\n- Make mysql_grant accept '.*'@'.*' in terms of input for user@host.\n\n2013-10-09 - Version 2.0.0-rc4\n\nSummary:\n\nBugfixes to mysql_grant and mysql_user form the bulk of this rc, as well as\nensuring that values in the override_options hash that contain a value of ''\nare created as just "key" in the conf rather than "key =" or "key = false".\n\nFixes:\n- Improve mysql_grant to work with IPv6 addresses (both long and short).\n- Ensure @host users work as well as user@host users.\n- Updated my.cnf template to support items with no values.\n\n2013-10-07 - Version 2.0.0-rc3\n\nSummary:\n\nFix mysql::server::monitor's use of mysql_user{}.\n\nFixes:\n- Fix myql::server::monitor's use of mysql_user{} to grant the proper\npermissions.  Add specs as well.  (Thanks to treydock!)\n\n2013-10-03 - Version 2.0.0-rc2\n\nSummary:\n\nBugfixes\n\nFixes:\n- Fix a duplicate parameter in mysql::server\n\n2013-10-03 - Version 2.0.0-rc1\n\nSummary:\n\nThis module has been completely refactored and works significantly different.\nThe changes are broad and touch almost every piece of the module.\n\nSee the README.md for full details of all changes and syntax.\nPlease remain on 1.0.0 if you don't have time to fully test this in dev.\n\n* mysql::server, mysql::client, and mysql::bindings are the primary interface\nclasses.\n* mysql::server takes an `options_override` parameter to set my.cnf options,\nwith the hash format: { 'section' => { 'thing' => 'value' }}\n* mysql attempts backwards compatibility by forwarding all parameters to\nmysql::server.\n\n2013-09-23 - Version 1.0.0\n\nSummary:\n\nThis release introduces a number of new type/providers, to eventually\nreplace the database_ ones.  The module has been converted to call the\nnew providers rather than the previous ones as they have a number of\nfixes, additional options, and work with puppet resource.\n\nThis 1.0.0 release precedes a large refactoring that will be released\nalmost immediately after as 2.0.0.\n\nFeatures:\n- Added mysql_grant, mysql_database, and mysql_user.\n- Add `mysql::bindings` class and refactor all other bindings to be contained underneath mysql::bindings:: namespace.\n- Added support to back up specified databases only with 'mysqlbackup' parameter.\n- Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file\n\nBugfixes:\n- Update my.cnf.pass.erb to allow custom socket support\n- Add environment variable for .my.cnf in mysql::db.\n- Add HOME environment variable for .my.cnf to mysqladmin command when\n(re)setting root password\n\n2013-07-15 - Version 0.9.0\nFeatures:\n- Add `mysql::backup::backuprotate` parameter\n- Add `mysql::backup::delete_before_dump` parameter\n- Add `max_user_connections` attribute to `database_user` type\n\nBugfixes:\n- Add client package dependency for `mysql::db`\n- Remove duplicate `expire_logs_days` and `max_binlog_size` settings\n- Make root's `.my.cnf` file path dynamic\n- Update pidfile path for Suse variants\n- Fixes for lint\n\n2013-07-05 - Version 0.8.1\nBugfixes:\n - Fix a typo in the Fedora 19 support.\n\n2013-07-01 - Version 0.8.0\nFeatures:\n - mysql::perl class to install perl-DBD-mysql.\n - minor improvements to the providers to improve reliability\n - Install the MariaDB packages on Fedora 19 instead of MySQL.\n - Add new `mysql` class parameters:\n  -  `max_connections`: The maximum number of allowed connections.\n  -  `manage_config_file`: Opt out of puppetized control of my.cnf.\n  -  `ft_min_word_len`: Fine tune the full text search.\n  -  `ft_max_word_len`: Fine tune the full text search.\n - Add new `mysql` class performance tuning parameters:\n  -  `key_buffer`\n  -  `thread_stack`\n  -  `thread_cache_size`\n  -  `myisam-recover`\n  -  `query_cache_limit`\n  -  `query_cache_size`\n  -  `max_connections`\n  -  `tmp_table_size`\n  -  `table_open_cache`\n  -  `long_query_time`\n - Add new `mysql` class replication parameters:\n  -  `server_id`\n  -  `sql_log_bin`\n  -  `log_bin`\n  -  `max_binlog_size`\n  -  `binlog_do_db`\n  -  `expire_logs_days`\n  -  `log_bin_trust_function_creators`\n  -  `replicate_ignore_table`\n  -  `replicate_wild_do_table`\n  -  `replicate_wild_ignore_table`\n  -  `expire_logs_days`\n  -  `max_binlog_size`\n\nBugfixes:\n - No longer restart MySQL when /root/.my.cnf changes.\n - Ensure mysql::config runs before any mysql::db defines.\n\n2013-06-26 - Version 0.7.1\nBugfixes:\n- Single-quote password for special characters\n- Update travis testing for puppet 3.2.x and missing Bundler gems\n\n2013-06-25 - Version 0.7.0\nThis is a maintenance release for community bugfixes and exposing\nconfiguration variables.\n\n* Add new `mysql` class parameters:\n -  `basedir`: The base directory mysql uses\n -  `bind_address`: The IP mysql binds to\n -  `client_package_name`: The name of the mysql client package\n -  `config_file`: The location of the server config file\n -  `config_template`: The template to use to generate my.cnf\n -  `datadir`: The directory MySQL's datafiles are stored\n -  `default_engine`: The default engine to use for tables\n -  `etc_root_password`: Whether or not to add the mysql root password to\n /etc/my.cnf\n -  `java_package_name`: The name of the java package containing the java\n connector\n -  `log_error`: Where to log errors\n -  `manage_service`: Boolean dictating if mysql::server should manage the\n service\n -  `max_allowed_packet`: Maximum network packet size mysqld will accept\n -  `old_root_password`: Previous root user password\n -  `php_package_name`: The name of the phpmysql package to install\n -  `pidfile`: The location mysql will expect the pidfile to be\n -  `port`: The port mysql listens on\n -  `purge_conf_dir`: Value fed to recurse and purge parameters of the\n /etc/mysql/conf.d resource\n -  `python_package_name`: The name of the python mysql package to install\n -  `restart`: Whether to restart mysqld\n -  `root_group`: Use specified group for root-owned files\n -  `root_password`: The root MySQL password to use\n -  `ruby_package_name`: The name of the ruby mysql package to install\n -  `ruby_package_provider`: The installation suite to use when installing the\n ruby package\n -  `server_package_name`: The name of the server package to install\n -  `service_name`: The name of the service to start\n -  `service_provider`: The name of the service provider\n -  `socket`: The location of the MySQL server socket file\n -  `ssl_ca`: The location of the SSL CA Cert\n -  `ssl_cert`: The location of the SSL Certificate to use\n -  `ssl_key`: The SSL key to use\n -  `ssl`: Whether or not to enable ssl\n -  `tmpdir`: The directory MySQL's tmpfiles are stored\n* Deprecate `mysql::package_name` parameter in favor of\n`mysql::client_package_name`\n* Fix local variable template deprecation\n* Fix dependency ordering in `mysql::db`\n* Fix ANSI quoting in queries\n* Fix travis support (but still messy)\n* Fix typos\n\n2013-01-11 - Version 0.6.1\n* Fix providers when /root/.my.cnf is absent\n\n2013-01-09 - Version 0.6.0\n* Add `mysql::server::config` define for specific config directives\n* Add `mysql::php` class for php support\n* Add `backupcompress` parameter to `mysql::backup`\n* Add `restart` parameter to `mysql::config`\n* Add `purge_conf_dir` parameter to `mysql::config`\n* Add `manage_service` parameter to `mysql::server`\n* Add syslog logging support via the `log_error` parameter\n* Add initial SuSE support\n* Fix remove non-localhost root user when fqdn != hostname\n* Fix dependency in `mysql::server::monitor`\n* Fix .my.cnf path for root user and root password\n* Fix ipv6 support for users\n* Fix / update various spec tests\n* Fix typos\n* Fix lint warnings\n\n2012-08-23 - Version 0.5.0\n* Add puppetlabs/stdlib as requirement\n* Add validation for mysql privs in provider\n* Add `pidfile` parameter to mysql::config\n* Add `ensure` parameter to mysql::db\n* Add Amazon linux support\n* Change `bind_address` parameter to be optional in my.cnf template\n* Fix quoting root passwords\n\n2012-07-24 - Version 0.4.0\n* Fix various bugs regarding database names\n* FreeBSD support\n* Allow specifying the storage engine\n* Add a backup class\n* Add a security class to purge default accounts\n\n2012-05-03 - Version 0.3.0\n* #14218 Query the database for available privileges\n* Add mysql::java class for java connector installation\n* Use correct error log location on different distros\n* Fix set_mysql_rootpw to properly depend on my.cnf\n\n2012-04-11 - Version 0.2.0\n\n2012-03-19 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13203) Add ssl support (f7e0ea5)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Travis ci before script needs success exit code. (0ea463b)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Fix Puppet 2.6 compilation issues. (9ebbbc4)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Add travis.ci for testing multiple puppet versions. (33c72ef)\n\n2012-03-15 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13163) Datadir should be configurable (f353fc6)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Document create_resources dependency. (558a59c)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix spec test issues related to error message. (eff79b5)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix mysql service on Ubuntu. (72da2c5)\n\n2012-03-16 - Dan Bode <dan@puppetlabs.com>\n* Add more spec test coverage (55e399d)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* (#11963) Fix spec test due to path changes. (1700349)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Add a test to check path for 'mysqld-restart' (b14c7d1)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Fix path for 'mysqld-restart' (1a9ae6b)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Add rspec-puppet tests for mysql::config (907331a)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Moved class dependency between sever and config to server (da62ad6)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Notify mysql restart from set_mysql_rootpw exec (0832a2c)\n\n2012-03-15 - Nan Liu <nan@puppetlabs.com>\n* Add documentation related to osfamily fact. (8265d28)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Mention osfamily value in failure message (e472d3b)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Fix bug when querying for all database users (015490c)\n\n2012-02-09 - Nan Liu <nan@puppetlabs.com>\n* Major refactor of mysql module. (b1f90fd)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Per @ghoneycutt, we should fail explicitly and explain why. (09af083)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Removing duplicate declaration (7513d03)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Use socket value from params class instead of hardcoding. (663e97c)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Instead of hardcoding the config file target, pull it from mysql::params (031a47d)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Moved $socket to within the case to toggle between distros.  Added a $config_file variable to allow per-distro config file destinations. (360eacd)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b)\n\n2012-02-09 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* Changed the README to use markdown (3b7dfeb)\n\n2012-02-04 - Daniel Black <grooverdan@users.sourceforge.net>\n* (#12412) mysqltuner.pl update (b809e6f)\n\n2011-11-17 - Matthias Pigulla <mp@webfactory.de>\n* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1)\n\n2011-12-20 - Jeff McCune <jeff@puppetlabs.com>\n* (minor) Fixup typos in Modulefile metadata (a0ed6a1)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* Only notify Exec to import sql if sql is given (0783c74)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* (#11508) Only load sql_scripts on DB creation (e3b9fd9)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Require not needed due to implicit dependencies (3058feb)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d)\n\n2011-06-03 - Dan Bode <dan@puppetlabs.com> - 0.0.1\n* initial commit\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2013 Puppet Labs\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-11-13 10:18:01 -0800", "updated_at": "2013-11-13 10:18:01 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-mysql-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc5", "version": "2.0.0-rc5" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc4", "version": "2.0.0-rc4" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc3", "version": "2.0.0-rc3" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc2", "version": "2.0.0-rc2" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc1", "version": "2.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-mysql-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.7.1", "version": "0.7.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.6.1", "version": "0.6.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.5.0", "version": "0.5.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://github.com/puppetlabs/puppetlabs-mysql", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-concat", "name": "concat", "downloads": 68527, "created_at": "2013-08-09 17:55:07 -0700", "updated_at": "2014-01-06 14:41:11 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-concat-1.0.0", "module": { "uri": "/v3/modules/puppetlabs-concat", "name": "concat", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.0", "metadata": { "name": "puppetlabs-concat", "version": "1.0.0", "source": "git://github.com/puppetlabs/puppetlabs-concat.git", "author": "Puppetlabs", "license": "Apache 2.0", "summary": "Concat module", "description": "Concat module", "project_page": "http://github.com/puppetlabs/puppetlabs-concat", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "89220fae3ab04a350132fe94d7a6ca00", "Gemfile": "a913d6f7a0420e07539d8ff1ef047ffb", "LICENSE": "f5a76685d453424cd63dde1535811cf0", "Modulefile": "f99ee2f6778b9e23635ac1027888bbd3", "README": "d15ec3400f628942dd7b7fa8c1a18da3", "README.markdown": "d82e203d729ea4785bdcaca1be166e62", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/concatfragments.sh": "2fbba597a1513eb61229551d35d42b9f", "lib/facter/concat_basedir.rb": "e152593fafe27ef305fc473929c62ca6", "manifests/fragment.pp": "196ee8e405b3a31b84ae618ed54377ed", "manifests/init.pp": "8d0cc8e9cf145ca7a23db05a30252476", "manifests/setup.pp": "2246572410d94c68aff310f8132c55b4", "spec/defines/init_spec.rb": "35e41d4abceba0dca090d3addd92bb4f", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "9c3742bf87d62027f080c6b9fa98b979", "spec/system/basic_spec.rb": "9135d9af6a21f16980ab59b58e91ed9a", "spec/system/concat_spec.rb": "5fe675ec42ca441d0c7e431c31bbc238", "spec/system/empty_spec.rb": "51ab1fc7c86268f1ab1cda72dc5ff583", "spec/system/replace_spec.rb": "275295e6b4f04fc840dc3f87faf56249", "spec/system/warn_spec.rb": "0ea35b44e8f0ac5352256f95115995ce" } }, "tags": [ "concat", "files", "fragments", "templates" ], "file_uri": "/v3/files/puppetlabs-concat-1.0.0.tar.gz", "file_size": 11866, "file_md5": "b46fed82226a08b37428769f4fa6e534", "downloads": 66264, "readme": "

What is it?

\n\n

A Puppet module that can construct files from fragments.

\n\n

Please see the comments in the various .pp files for details\nas well as posts on my blog at http://www.devco.net/

\n\n

Released under the Apache 2.0 licence

\n\n

Usage:

\n\n

If you wanted a /etc/motd file that listed all the major modules\non the machine. And that would be maintained automatically even\nif you just remove the include lines for other modules you could\nuse code like below, a sample /etc/motd would be:

\n\n
\nPuppet modules on this server:\n\n    -- Apache\n    -- MySQL\n
\n\n

Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.

\n\n
\n# class to setup basic motd, include on all nodes\nclass motd {\n   $motd = \"/etc/motd\"\n\n   concat{$motd:\n      owner => root,\n      group => root,\n      mode  => '0644',\n   }\n\n   concat::fragment{\"motd_header\":\n      target => $motd,\n      content => \"\\nPuppet modules on this server:\\n\\n\",\n      order   => 01,\n   }\n\n   # local users on the machine can append to motd by just creating\n   # /etc/motd.local\n   concat::fragment{\"motd_local\":\n      target => $motd,\n      ensure  => \"/etc/motd.local\",\n      order   => 15\n   }\n}\n\n# used by other modules to register themselves in the motd\ndefine motd::register($content=\"\", $order=10) {\n   if $content == \"\" {\n      $body = $name\n   } else {\n      $body = $content\n   }\n\n   concat::fragment{\"motd_fragment_$name\":\n      target  => \"/etc/motd\",\n      content => \"    -- $body\\n\"\n   }\n}\n\n# a sample apache module\nclass apache {\n   include apache::install, apache::config, apache::service\n\n   motd::register{\"Apache\": }\n}\n
\n\n

Detailed documentation of the class options can be found in the\nmanifest files.

\n\n

Known Issues:

\n\n
    \n
  • Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true on the [main] section of your\nnode's '/etc/puppet/puppet.conf' for at least the first run.\nYou have this issue if puppet fails to run on the client and you have\na message similar to\n"err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
  • \n
\n\n

Contributors:

\n\n

Paul Elliot

\n\n
    \n
  • Provided 0.24.8 support, shell warnings and empty file creation support.
  • \n
\n\n

Chad Netzer

\n\n
    \n
  • Various patches to improve safety of file operations
  • \n
  • Symlink support
  • \n
\n\n

David Schmitt

\n\n
    \n
  • Patch to remove hard coded paths relying on OS path
  • \n
  • Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
  • \n
\n\n

Peter Meier

\n\n
    \n
  • Basedir as a fact
  • \n
  • Unprivileged user support
  • \n
\n\n

Sharif Nassar

\n\n
    \n
  • Solaris/Nexenta support
  • \n
  • Better error reporting
  • \n
\n\n

Christian G. Warden

\n\n
    \n
  • Style improvements
  • \n
\n\n

Reid Vandewiele

\n\n
    \n
  • Support non GNU systems by default
  • \n
\n\n

Erik Dalén

\n\n
    \n
  • Style improvements
  • \n
\n\n

Gildas Le Nadan

\n\n
    \n
  • Documentation improvements
  • \n
\n\n

Paul Belanger

\n\n
    \n
  • Testing improvements and Travis support
  • \n
\n\n

Branan Purvine-Riley

\n\n
    \n
  • Support Puppet Module Tool better
  • \n
\n\n

Dustin J. Mitchell

\n\n
    \n
  • Always include setup when using the concat define
  • \n
\n\n

Andreas Jaggi

\n\n
    \n
  • Puppet Lint support
  • \n
\n\n

Jan Vansteenkiste

\n\n
    \n
  • Configurable paths
  • \n
\n\n

Contact:

\n\n

puppet-users@ mailing list.

\n
", "changelog": "
2013-08-09 1.0.0\n\nSummary:\n\nMany new features and bugfixes in this release, and if you're a heavy concat\nuser you should test carefully before upgrading.  The features should all be\nbackwards compatible but only light testing has been done from our side before\nthis release.\n\nFeatures:\n- New parameters in concat:\n - `replace`: specify if concat should replace existing files.\n - `ensure_newline`: controls if fragments should contain a newline at the end.\n- Improved README documentation.\n- Add rspec:system tests (rake spec:system to test concat)\n\nBugfixes\n- Gracefully handle \\n in a fragment resource name.\n- Adding more helpful message for 'pluginsync = true'\n- Allow passing `source` and `content` directly to file resource, rather than\ndefining resource defaults.\n- Added -r flag to read so that filenames with \\ will be read correctly.\n- sort always uses LANG=C.\n- Allow WARNMSG to contain/start with '#'.\n- Replace while-read pattern with for-do in order to support Solaris.\n\nCHANGELOG:\n- 2010/02/19 - initial release\n- 2010/03/12 - add support for 0.24.8 and newer\n             - make the location of sort configurable\n             - add the ability to add shell comment based warnings to\n               top of files\n             - add the ablity to create empty files\n- 2010/04/05 - fix parsing of WARN and change code style to match rest\n               of the code\n             - Better and safer boolean handling for warn and force\n             - Don't use hard coded paths in the shell script, set PATH\n               top of the script\n             - Use file{} to copy the result and make all fragments owned\n               by root.  This means we can chnage the ownership/group of the\n               resulting file at any time.\n             - You can specify ensure => "/some/other/file" in concat::fragment\n               to include the contents of a symlink into the final file.\n- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name\n- 2010/05/22 - Improve documentation and show the use of ensure =>\n- 2010/07/14 - Add support for setting the filebucket behavior of files\n- 2010/10/04 - Make the warning message configurable\n- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011/02/03 - Make the shell script more portable and add a config option for root group\n- 2011/06/21 - Make base dir root readable only for security\n- 2011/06/23 - Set base directory using a fact instead of hardcoding it\n- 2011/06/23 - Support operating as non privileged user\n- 2011/06/23 - Support dash instead of bash or sh\n- 2011/07/11 - Better solaris support\n- 2011/12/05 - Use fully qualified variables\n- 2011/12/13 - Improve Nexenta support\n- 2012/04/11 - Do not use any GNU specific extensions in the shell script\n- 2012/03/24 - Comply to community style guides\n- 2012/05/23 - Better errors when basedir isnt set\n- 2012/05/31 - Add spec tests\n- 2012/07/11 - Include concat::setup in concat improving UX\n- 2012/08/14 - Puppet Lint improvements\n- 2012/08/30 - The target path can be different from the $name\n- 2012/08/30 - More Puppet Lint cleanup\n- 2012/09/04 - RELEASE 0.2.0\n- 2012/12/12 - Added (file) $replace parameter to concat\n
", "license": "
   Copyright 2012 R.I.Pienaar\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-08-14 15:59:00 -0700", "updated_at": "2013-08-14 15:59:00 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-concat-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-concat-1.0.0-rc1", "version": "1.0.0-rc1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-concat", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-postgresql", "name": "postgresql", "downloads": 63819, "created_at": "2012-10-24 17:23:51 -0700", "updated_at": "2014-01-06 14:40:36 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-postgresql-3.2.0", "module": { "uri": "/v3/modules/puppetlabs-postgresql", "name": "postgresql", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.2.0", "metadata": { "name": "puppetlabs-postgresql", "version": "3.2.0", "source": "git://github.com/puppetlabs/puppet-postgresql.git", "author": "Inkling/Puppet Labs", "license": "ASL 2.0", "summary": "PostgreSQL defined resource types", "description": "PostgreSQL defined resource types", "project_page": "https://github.com/puppetlabs/puppet-postgresql", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">=3.2.0 <5.0.0" }, { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/apt", "version_requirement": ">=1.1.0 <2.0.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0 <2.0.0" } ], "types": [ { "name": "postgresql_conf", "doc": "This type allows puppet to manage postgresql.conf parameters.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value to set for this parameter." }, { "name": "target", "doc": "The path to postgresql.conf" } ], "parameters": [ { "name": "name", "doc": "The postgresql parameter name to manage. Values can match `/^[\\w\\.]+$/`." } ], "providers": [ { "name": "parsed", "doc": "Set key/values in postgresql.conf." } ] }, { "name": "postgresql_psql", "doc": "", "properties": [ { "name": "command", "doc": "The SQL command to execute via psql." } ], "parameters": [ { "name": "name", "doc": "An arbitrary tag for your own reference; the name of the message." }, { "name": "unless", "doc": "An optional SQL command to execute prior to the main :command; this is generally intended to be used for idempotency, to check for the existence of an object in the database to determine whether or not the main SQL command needs to be executed at all." }, { "name": "db", "doc": "The name of the database to execute the SQL command against." }, { "name": "search_path", "doc": "The schema search path to use when executing the SQL command" }, { "name": "psql_path", "doc": "The path to psql executable." }, { "name": "psql_user", "doc": "The system user account under which the psql command should be executed." }, { "name": "psql_group", "doc": "The system user group account under which the psql command should be executed." }, { "name": "cwd", "doc": "The working directory under which the psql command should be executed." }, { "name": "refreshonly", "doc": "If 'true', then the SQL will only be executed via a notify/subscribe event. Valid values are `true`, `false`." } ], "providers": [ { "name": "ruby", "doc": "" } ] } ], "checksums": { "Changelog": "3bff00e6b5ac42cd8055ee8d7337c4ff", "Gemfile": "d29b809bd75c2aa7c160e45e66483d8c", "Gemfile.lock": "9c04244f3ad5b505c9f36daf40a5677f", "LICENSE": "746fe83ebbf8970af0a9ea13962293e9", "Modulefile": "6a824d502980df77edf9d414b5e3e2f2", "NOTICE": "d8ffc52f00e00877b45d2b77e709f69e", "README.md": "049d45d3aa128c29e16e9a0dcf67517f", "Rakefile": "7e458ced5c7b798430ee6371f860057e", "files/RPM-GPG-KEY-PGDG": "78b5db170d33f80ad5a47863a7476b22", "files/validate_postgresql_connection.sh": "20301932819f035492a30880f5bf335a", "lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb": "d518a7959b950874820a3b0a7a324488", "lib/puppet/parser/functions/postgresql_escape.rb": "2e136fcd653ab38d831c5b40806d47d1", "lib/puppet/parser/functions/postgresql_password.rb": "820da02a888ab42357fe9bc2352b1c37", "lib/puppet/provider/postgresql_conf/parsed.rb": "9c198422c0558faab1bedc00b68cfe45", "lib/puppet/provider/postgresql_psql/ruby.rb": "506a07dc159de91fe212133103b9dcff", "lib/puppet/type/postgresql_conf.rb": "4f333138a3689f9768e7fe4bc3cde9fd", "lib/puppet/type/postgresql_psql.rb": "2c1270cfed4ffb2971059846a57cf983", "manifests/client.pp": "f9bc3a578017fe8eb881de2255bdc023", "manifests/globals.pp": "64d9cdb6894ba6334992e9365a1e2096", "manifests/lib/devel.pp": "94ae7eac3acf1dd3072d481eca4d2d7f", "manifests/lib/java.pp": "6e4a2187c2b4caecad8098b46e99c8e0", "manifests/lib/python.pp": "90736f86301c4c6401ec1180c176b616", "manifests/params.pp": "109138ba7df4ad7da71b302a20f33b29", "manifests/repo/apt_postgresql_org.pp": "ef7012ea3c5429bea11b1114183d32c3", "manifests/repo/yum_postgresql_org.pp": "e0c445f877cdb39774b735417c967d1d", "manifests/repo.pp": "a18a5cb760dbb1e10bdd83730300c1fe", "manifests/server/config.pp": "a05f4aeb3f09b2e5e9ee8b9467519afb", "manifests/server/config_entry.pp": "a3823efa15fe96535335bd7b722fef9a", "manifests/server/contrib.pp": "3112bd1edbed51b68e1402027f9d53b1", "manifests/server/database.pp": "ebf356e8cadf5bef884e5597fd60724e", "manifests/server/database_grant.pp": "66e5470bb932b087b540c444ee49941b", "manifests/server/db.pp": "f35e4974ffee6136e2de1a3edc9cbf21", "manifests/server/firewall.pp": "98632b073511a00926908c6951851052", "manifests/server/grant.pp": "81c8d6b64a6b938fe57346ede5cdfeb7", "manifests/server/initdb.pp": "91e27eaf448817c0f904e5267816a16a", "manifests/server/install.pp": "8520e3a86c74e0587a46c4548097bab3", "manifests/server/passwd.pp": "96214f099cfb97d361f9bdc0734baf38", "manifests/server/pg_hba_rule.pp": "01a1bf9503f908531af9990909d8ba45", "manifests/server/plperl.pp": "d6a2e2f0c93c7b543e9db64202c2e48d", "manifests/server/reload.pp": "d62c048c8f25c167d266e99e36c0f227", "manifests/server/role.pp": "43eeda8b6a40b587d688e2ce33c4e780", "manifests/server/service.pp": "e1896d429a032c4522201e9048d204db", "manifests/server/table_grant.pp": "bbc864f0ad8545837cf7782d1f7a1755", "manifests/server/tablespace.pp": "beda12859757f7f677a711304dfd5185", "manifests/server.pp": "d147bf997967eeb428c6e681dbe89d67", "manifests/validate_db_connection.pp": "be61434836f7d25cc184126a91b2e3e6", "spec/spec_helper.rb": "d4e4a9a154ada34e7f13b0d8ece0f5db", "spec/spec_helper_system.rb": "ecedca722f54627ef2c5f8a0da5f2163", "spec/system/client_spec.rb": "b477056c567ecc479a3bbc6e283df7ba", "spec/system/common_patterns_spec.rb": "696033dd862db23f45e86b2099e47810", "spec/system/contrib_spec.rb": "326208830a51cf74841bae361709863a", "spec/system/lib/devel_spec.rb": "5e69579d3e2e4f854640e3afb1122162", "spec/system/lib/java_spec.rb": "e88f705ae328f8a830ae027fca35a474", "spec/system/lib/python_spec.rb": "2690f7530f806fa52cbedbb2c86988e6", "spec/system/postgresql_psql_spec.rb": "6dd5c8ec1e0f493143fa2b89b044ee3d", "spec/system/server/config_entry_spec.rb": "0a8a3c42efad84ab7aca367b8c3e8160", "spec/system/server/database_grant_spec.rb": "f5736d6ac16ad1d2ed5f9f3442e3dda4", "spec/system/server/database_spec.rb": "5405572c72b39d72d7975da02eef8569", "spec/system/server/db_spec.rb": "5a6fcf61718af48e2b1fb79ba040da93", "spec/system/server/grant_spec.rb": "fc629944a71faa1d871f3d3a7e4e4a83", "spec/system/server/pg_hba_rule_spec.rb": "ff0c8c772ed60f8667dd2531029830b9", "spec/system/server/plperl_spec.rb": "cd54753b2c8d5e4aaad13daeb8b61e7a", "spec/system/server/role_spec.rb": "5b566002ba577f737d4e2a7b3fccb221", "spec/system/server/table_grant_spec.rb": "260490ebb6c8b9b9f73551fb4eca8ea5", "spec/system/server/tablespace_spec.rb": "48fed176f821c77d24366d70e9d15ff2", "spec/system/server_spec.rb": "e93f4a14e5916eac7961e8d5215e16e2", "spec/system/validate_db_connection_spec.rb": "1a454b555c6f0539d7e6e47e177a68cf", "spec/unit/classes/client_spec.rb": "b26438da8906e68d17e568252c1e43b5", "spec/unit/classes/globals_spec.rb": "952cba1463ca000e288cbfd56ec8c771", "spec/unit/classes/lib/devel_spec.rb": "f660eb0afe4fa75e999ab192e39b58d8", "spec/unit/classes/lib/java_spec.rb": "bdb60c3b379a3788b3bf1f6c29b31c0a", "spec/unit/classes/lib/python_spec.rb": "677c763c1a43a0e33ef7e6e819ec9f0a", "spec/unit/classes/params_spec.rb": "2661b999fc13cd3368b54549f3267be0", "spec/unit/classes/repo_spec.rb": "a24b152315c86146881b6a39a7a22cd0", "spec/unit/classes/server/contrib_spec.rb": "16528171ee3e058c06c5fea454dc9dbc", "spec/unit/classes/server/initdb_spec.rb": "7f17f9cc6091c9e9ff789dc2f1653bff", "spec/unit/classes/server/plperl_spec.rb": "120e0280679b21b4348dd992f39f83b3", "spec/unit/classes/server_spec.rb": "244a793964c16cb3f4d819998e8f07a4", "spec/unit/defines/server/config_entry_spec.rb": "cc2d9d0e4508d745f85c3446ccf76eb4", "spec/unit/defines/server/database_grant_spec.rb": "e09254037c042efa5a29ba8d777c882f", "spec/unit/defines/server/database_spec.rb": "090e9cf334843a4dc8b3f4eadce0109b", "spec/unit/defines/server/db_spec.rb": "9f2181b0df771f4c6adf089b788adf42", "spec/unit/defines/server/grant_spec.rb": "b8d8f46c7c4539747ee0b797a3a1834f", "spec/unit/defines/server/pg_hba_rule_spec.rb": "3ed69d689bf28b56a030c543e7ce6775", "spec/unit/defines/server/role_spec.rb": "fdb53fa637ccd79f8231e15383099137", "spec/unit/defines/server/table_grant_spec.rb": "bb794a0b15dc74e8c8fa5d4878fd3c79", "spec/unit/defines/server/tablespace_spec.rb": "68e7b9a193475491c58485debf1be220", "spec/unit/defines/validate_db_connection_spec.rb": "88e57a8f780d381d75fe062f1178e1ce", "spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb": "e7740c3cd2110e2fcebab8356012267c", "spec/unit/functions/postgresql_escape_spec.rb": "6e52e4f3ca56491f8ba2d1490a5fd1ad", "spec/unit/functions/postgresql_password_spec.rb": "76034569a5ff627073c5e6ff69176ac3", "spec/unit/provider/postgresql_conf/parsed_spec.rb": "7295501a413d8cf99df6f40ea50a36fc", "spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb": "deef7a3f574269889e7d050a55e847f4", "spec/unit/puppet/type/postgresql_psql_spec.rb": "2af5b74f7f4b89ff246818cd79488b3e", "spec/unit/type/postgresql_conf_spec.rb": "76f460e0dfc90a1f38c407e5a0d4f463", "templates/pg_hba_rule.conf": "13b46eecdfd359eddff71fa485ef2f54" } }, "tags": [ "database", "postgresql", "postgres", "centos", "rhel", "ubuntu", "debian", "pgsql" ], "file_uri": "/v3/files/puppetlabs-postgresql-3.2.0.tar.gz", "file_size": 58331, "file_md5": "ad3148ba3cefc15e655b721bfa476637", "downloads": 13123, "readme": "

postgresql

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the PostgreSQL module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with PostgreSQL module
  6. \n
  7. Usage - How to use the module for various tasks
  8. \n
  9. Upgrading - Guide for upgrading from older revisions of this module
  10. \n
  11. Reference - The classes, defines,functions and facts available in this module
  12. \n
  13. Limitations - OS compatibility, etc.
  14. \n
  15. Development - Guide for contributing to the module
  16. \n
  17. Disclaimer - Licensing information
  18. \n
  19. Transfer Notice - Notice of authorship change
  20. \n
  21. Contributors - List of module contributors
  22. \n
\n\n

Overview

\n\n

The PostgreSQL module allows you to easily manage postgres databases with Puppet.

\n\n

Module Description

\n\n

PostgreSQL is a high-performance, free, open-source relational database server. The postgresql module allows you to manage PostgreSQL packages and services on several operating systems, while also supporting basic management of PostgreSQL databases and users. The module offers support for managing firewall for postgres ports on RedHat-based distros, as well as support for basic management of common security settings.

\n\n

Setup

\n\n

What puppetlabs-PostgreSQL affects:

\n\n
    \n
  • package/service/configuration files for PostgreSQL
  • \n
  • listened-to ports
  • \n
  • system firewall (optional)
  • \n
  • IP and mask (optional)
  • \n
\n\n

Introductory Questions

\n\n

The postgresql module offers many security configuration settings. Before getting started, you will want to consider:

\n\n
    \n
  • Do you want/need to allow remote connections?\n\n
      \n
    • If yes, what about TCP connections?
    • \n
  • \n
  • Would you prefer to work around your current firewall settings or overwrite some of them?
  • \n
  • How restrictive do you want the database superuser's permissions to be?
  • \n
\n\n

Your answers to these questions will determine which of the module's parameters you'll want to specify values for.

\n\n

Configuring the server

\n\n

The main configuration you'll need to do will be around the postgresql::server class. The default parameters are reasonable, but fairly restrictive regarding permissions for who can connect and from where. To manage a PostgreSQL server with sane defaults:

\n\n
class { 'postgresql::server': }\n
\n\n

For a more customized configuration:

\n\n
class { 'postgresql::server':\n  ip_mask_deny_postgres_user => '0.0.0.0/32',\n  ip_mask_allow_all_users    => '0.0.0.0/0',\n  listen_addresses           => '*',\n  ipv4acls                   => ['hostssl all johndoe 192.168.0.0/24 cert'],\n  manage_firewall            => true,\n  postgres_password          => 'TPSrep0rt!',\n}\n
\n\n

Once you've completed your configuration of postgresql::server, you can test out your settings from the command line:

\n\n
$ psql -h localhost -U postgres\n$ psql -h my.postgres.server -U\n
\n\n

If you get an error message from these commands, it means that your permissions are set in a way that restricts access from where you're trying to connect. That might be a good thing or a bad thing, depending on your goals.

\n\n

For more details about server configuration parameters consult the PostgreSQL Runtime Configuration docs.

\n\n

Usage

\n\n

Creating a database

\n\n

There are many ways to set up a postgres database using the postgresql::server::db class. For instance, to set up a database for PuppetDB:

\n\n
class { 'postgresql::server': }\n\npostgresql::server::db { 'mydatabasename':\n  user     => 'mydatabaseuser',\n  password => postgresql_password('mydatabaseuser', 'mypassword'),\n}\n
\n\n

Managing users, roles and permissions

\n\n

To manage users, roles and permissions:

\n\n
class { 'postgresql::server': }\n\npostgresql::server::role { 'marmot':\n  password_hash => postgresql_password('marmot', 'mypasswd'),\n}\n\npostgresql::server::database_grant { 'test1':\n  privilege => 'ALL',\n  db        => 'test1',\n  role      => 'marmot',\n}\n\npostgresql::server::table_grant { 'my_table of test2':\n  privilege => 'ALL',\n  table     => 'my_table',\n  db        => 'test2',\n  role      => 'marmot',\n}\n
\n\n

In this example, you would grant ALL privileges on the test1 database and on the my_table table of the test2 database to the user or group specified by dan.

\n\n

At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go.

\n\n

Upgrading

\n\n

Upgrading from 2.x to version 3

\n\n

Note: if you are upgrading for 2.x, you must read this, as just about everything has changed.

\n\n

Version 3 was a major rewrite to fix some internal dependency issues, and to make the new Public API more clear. As a consequence a lot of things have changed for version 3 and older revisions that we will try to outline here.

\n\n

Server specific objects now moved under postgresql::server:: namespace

\n\n

To restructure server specific elements under the postgresql::server:: namespaces the following objects were renamed as such:

\n\n
    \n
  • postgresql::database -> postgresql::server::database
  • \n
  • postgresql::database_grant -> postgresql::server::database_grant
  • \n
  • postgresql::db -> postgresql::server::db
  • \n
  • postgresql::grant -> postgresql::server::grant
  • \n
  • postgresql::pg_hba_rule -> postgresql::server::pg_hba_rule
  • \n
  • postgresql::plperl -> postgresql::server::plperl
  • \n
  • postgresql::contrib -> postgresql::server::contrib
  • \n
  • postgresql::role -> postgresql::server::role
  • \n
  • postgresql::table_grant -> postgresql::server::table_grant
  • \n
  • postgresql::tablespace -> postgresql::server::tablespace
  • \n
\n\n

New postgresql::server::config_entry resource for managing configuration

\n\n

Previously we used the file_line resource to modify postgresql.conf. This new revision now adds a new resource named postgresql::server::config_entry for managing this file. For example:

\n\n
postgresql::server::config_entry { 'check_function_bodies':\n  value => 'off',\n}\n
\n\n

If you were using file_line for this purpose, you should change to this new methodology.

\n\n

postgresql_puppet_extras.conf has been removed

\n\n

Now that we have a methodology for managing postgresql.conf, and due to concerns over the file management methodology using an exec { 'touch ...': } as a way to create an empty file the existing postgresql_puppet_extras.conf file is no longer managed by this module.

\n\n

If you wish to recreate this methodology yourself, use this pattern:

\n\n
class { 'postgresql::server': }\n\n$extras = "/tmp/include.conf"\n\nfile { $extras:\n  content => 'max_connections = 123',\n  notify  => Class['postgresql::server::service'],\n}->\npostgresql::server::config_entry { 'include':\n  value   => $extras,\n}\n
\n\n

All uses of the parameter charset changed to encoding

\n\n

Since PostgreSQL uses the terminology encoding not charset the parameter has been made consisent across all classes and resources.

\n\n

The postgresql base class is no longer how you set globals

\n\n

The old global override pattern was less then optimal so it has been fixed, however we decided to demark this properly by specifying these overrides in the class postgresql::globals. Consult the documentation for this class now to see what options are available.

\n\n

Also, some parameter elements have been moved between this and the postgresql::server class where it made sense.

\n\n

config_hash parameter collapsed for the postgresql::server class

\n\n

Because the config_hash was really passing data through to what was in effect an internal class (postgresql::config). And since we don't want this kind of internal exposure the parameters were collapsed up into the postgresql::server class directly.

\n\n

Lots of changes to 'private' or 'undocumented' classes

\n\n

If you were using these before, these have changed names. You should only use what is documented in this README.md, and if you don't have what you need you should raise a patch to add that feature to a public API. All internal classes now have a comment at the top indicating them as private to make sure the message is clear that they are not supported as Public API.

\n\n

pg_hba_conf_defaults parameter included to turn off default pg_hba rules

\n\n

The defaults should be good enough for most cases (if not raise a bug) but if you simply need an escape hatch, this setting will turn off the defaults. If you want to do this, it may affect the rest of the module so make sure you replace the rules with something that continues operation.

\n\n

postgresql::database_user has now been removed

\n\n

Use postgresql::server::role instead.

\n\n

postgresql::psql resource has now been removed

\n\n

Use postgresql_psql instead. In the future we may recreate this as a wrapper to add extra capability, but it will not match the old behaviour.

\n\n

postgresql_default_version fact has now been removed

\n\n

It didn't make sense to have this logic in a fact any more, the logic has been moved into postgresql::params.

\n\n

ripienaar/concat is no longer used, instead we use puppetlabs/concat

\n\n

The older concat module is now deprecated and moved into the puppetlabs/concat namespace. Functionality is more or less identical, but you may need to intervene during the installing of this package - as both use the same concat namespace.

\n\n

Reference

\n\n

The postgresql module comes with many options for configuring the server. While you are unlikely to use all of the below settings, they allow you a decent amount of control over your security settings.

\n\n

Classes:

\n\n\n\n

Resources:

\n\n\n\n

Functions:

\n\n\n\n

Class: postgresql::globals

\n\n

Note: most server specific defaults should be overriden in the postgresql::server class. This class should only be used if you are using a non-standard OS or if you are changing elements such as version or manage_package_repo that can only be changed here.

\n\n

This class allows you to configure the main settings for this module in a global way, to be used by the other classes and defined resources. On its own it does nothing.

\n\n

For example, if you wanted to overwrite the default locale and encoding for all classes you could use the following combination:

\n\n
class { 'postgresql::globals':\n  encoding => 'UTF8',\n  locale   => 'en_NG',\n}->\nclass { 'postgresql::server':\n}\n
\n\n

That would make the encoding and locale the default for all classes and defined resources in this module.

\n\n

If you want to use the upstream PostgreSQL packaging, and be specific about the version you wish to download, you could use something like this:

\n\n
class { 'postgresql::globals':\n  manage_package_repo => true,\n  version             => '9.2',\n}->\nclass { 'postgresql::server': }\n
\n\n

client_package_name

\n\n

This setting can be used to override the default postgresql client package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

server_package_name

\n\n

This setting can be used to override the default postgresql server package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

contrib_package_name

\n\n

This setting can be used to override the default postgresql contrib package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

devel_package_name

\n\n

This setting can be used to override the default postgresql devel package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

java_package_name

\n\n

This setting can be used to override the default postgresql java package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

plperl_package_name

\n\n

This setting can be used to override the default postgresql PL/perl package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

python_package_name

\n\n

This setting can be used to override the default postgresql Python package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_status

\n\n

This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

default_database

\n\n

This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres".

\n\n

initdb_path

\n\n

Path to the initdb command.

\n\n

createdb_path

\n\n

Path to the createdb command.

\n\n

psql_path

\n\n

Path to the psql command.

\n\n

pg_hba_conf_path

\n\n

Path to your pg\\_hba.conf file.

\n\n

postgresql_conf_path

\n\n

Path to your postgresql.conf file.

\n\n

pg_hba_conf_defaults

\n\n

If false, disables the defaults supplied with the module for pg\\_hba.conf. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic psql operations for example.

\n\n

datadir

\n\n

This setting can be used to override the default postgresql data directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

confdir

\n\n

This setting can be used to override the default postgresql configuration directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

bindir

\n\n

This setting can be used to override the default postgresql binaries directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

user

\n\n

This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'.

\n\n

group

\n\n

This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'.

\n\n

version

\n\n

The version of PostgreSQL to install/manage. This is a simple way of providing a specific version such as '9.2' or '8.4' for example.

\n\n

Defaults to your operating system default.

\n\n

needs_initdb

\n\n

This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro.

\n\n

encoding

\n\n

This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default.

\n\n

locale

\n\n

This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to undef which is effectively C.

\n\n

firewall_supported

\n\n

This allows you to override the automated detection to see if your OS supports the firewall module.

\n\n

manage_package_repo

\n\n

If true this will setup the official PostgreSQL repositories on your host. Defaults to false.

\n\n

Class: postgresql::server

\n\n

The following list are options that you can set in the config_hash parameter of postgresql::server.

\n\n

ensure

\n\n

This value default to present. When set to absent it will remove all packages, configuration and data so use this with extreme caution.

\n\n

version

\n\n

This will set the version of the PostgreSQL software to install. Defaults to your operating systems default.

\n\n

postgres_password

\n\n

This value defaults to undef, meaning the super user account in the postgres database is a user called postgres and this account does not have a password. If you provide this setting, the module will set the password for the postgres user to your specified value.

\n\n

package_name

\n\n

The name of the package to use for installing the server software. Defaults to the default for your OS distro.

\n\n

package_ensure

\n\n

Value to pass through to the package resource when creating the server instance. Defaults to undef.

\n\n

plperl_package_name

\n\n

This sets the default package name for the PL/Perl extension. Defaults to utilising the operating system default.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_status

\n\n

This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

default_database

\n\n

This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres".

\n\n

listen_addresses

\n\n

This value defaults to localhost, meaning the postgres server will only accept connections from localhost. If you'd like to be able to connect to postgres from remote machines, you can override this setting. A value of * will tell postgres to accept connections from any remote machine. Alternately, you can specify a comma-separated list of hostnames or IP addresses. (For more info, have a look at the postgresql.conf file from your system's postgres package).

\n\n

ip_mask_deny_postgres_user

\n\n

This value defaults to 0.0.0.0/0. Sometimes it can be useful to block the superuser account from remote connections if you are allowing other database users to connect remotely. Set this to an IP and mask for which you want to deny connections by the postgres superuser account. So, e.g., the default value of 0.0.0.0/0 will match any remote IP and deny access, so the postgres user won't be able to connect remotely at all. Conversely, a value of 0.0.0.0/32 would not match any remote IP, and thus the deny rule will not be applied and the postgres user will be allowed to connect.

\n\n

ip_mask_allow_all_users

\n\n

This value defaults to 127.0.0.1/32. By default, Postgres does not allow any database user accounts to connect via TCP from remote machines. If you'd like to allow them to, you can override this setting. You might set it to 0.0.0.0/0 to allow database users to connect from any remote machine, or 192.168.0.0/16 to allow connections from any machine on your local 192.168 subnet.

\n\n

ipv4acls

\n\n

List of strings for access control for connection method, users, databases, IPv4 addresses; see postgresql documentation about pg_hba.conf for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page).

\n\n

ipv6acls

\n\n

List of strings for access control for connection method, users, databases, IPv6 addresses; see postgresql documentation about pg_hba.conf for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page).

\n\n

inidb_path

\n\n

Path to the initdb command.

\n\n

createdb_path

\n\n

Path to the createdb command.

\n\n

psql_path

\n\n

Path to the psql command.

\n\n

pg_hba_conf_path

\n\n

Path to your pg\\_hba.conf file.

\n\n

postgresql_conf_path

\n\n

Path to your postgresql.conf file.

\n\n

pg_hba_conf_defaults

\n\n

If false, disables the defaults supplied with the module for pg\\_hba.conf. This is useful if you di\nsagree with the defaults and wish to override them yourself. Be sure that your changes of course alig\nn with the rest of the module, as some access is required to perform basic psql operations for exam\nple.

\n\n

user

\n\n

This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'.

\n\n

group

\n\n

This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'.

\n\n

needs_initdb

\n\n

This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro.

\n\n

encoding

\n\n

This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default.

\n\n

locale

\n\n

This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to undef which is effectively C.

\n\n

manage_firewall

\n\n

This value defaults to false. Many distros ship with a fairly restrictive firewall configuration which will block the port that postgres tries to listen on. If you'd like for the puppet module to open this port for you (using the puppetlabs-firewall module), change this value to true. Check the documentation for puppetlabs/firewall to ensure the rest of the global setup is applied, to ensure things like persistence and global rules are set correctly.

\n\n

manage_pg_hba_conf

\n\n

This value defaults to true. Whether or not manage the pg_hba.conf. If set to true, puppet will overwrite this file. If set to false, puppet will not modify the file.

\n\n

Class: postgresql::client

\n\n

This class installs postgresql client software. Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):

\n\n

package_name

\n\n

The name of the postgresql client package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql client package resource.

\n\n

Class: postgresql::server::contrib

\n\n

Installs the postgresql contrib package.

\n\n

package_name

\n\n

The name of the postgresql client package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql contrib package resource.

\n\n

Class: postgresql::lib::devel

\n\n

Installs the packages containing the development libraries for PostgreSQL.

\n\n

package_ensure

\n\n

Override for the ensure parameter during package installation. Defaults to present.

\n\n

package_name

\n\n

Overrides the default package name for the distribution you are installing to. Defaults to postgresql-devel or postgresql<version>-devel depending on your distro.

\n\n

Class: postgresql::lib::java

\n\n

This class installs postgresql bindings for Java (JDBC). Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):

\n\n

package_name

\n\n

The name of the postgresql java package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql java package resource.

\n\n

Class: postgresql::lib::python

\n\n

This class installs the postgresql Python libraries. For customer requirements you can customise the following parameters:

\n\n

package_name

\n\n

The name of the postgresql python package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql python package resource.

\n\n

Class: postgresql::server::plperl

\n\n

This class installs the PL/Perl procedural language for postgresql.

\n\n

package_name

\n\n

The name of the postgresql PL/Perl package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql PL/Perl package resource.

\n\n

Resource: postgresql::server::config_entry

\n\n

This resource can be used to modify your postgresql.conf configuration file.

\n\n

Each resource maps to a line inside your postgresql.conf file, for example:

\n\n
postgresql::server::config_entry { 'check_function_bodies':\n  value => 'off',\n}\n
\n\n

namevar

\n\n

Name of the setting to change.

\n\n

ensure

\n\n

Set to absent to remove an entry.

\n\n

value

\n\n

Value for the setting.

\n\n

Resource: postgresql::server::db

\n\n

This is a convenience resource that creates a database, user and assigns necessary permissions in one go.

\n\n

For example, to create a database called test1 with a corresponding user of the same name, you can use:

\n\n
postgresql::server::db { 'test1':\n  user     => 'test1',\n  password => 'test1',\n}\n
\n\n

namevar

\n\n

The namevar for the resource designates the name of the database.

\n\n

user

\n\n

User to create and assign access to the database upon creation. Mandatory.

\n\n

password

\n\n

Password for the created user. Mandatory.

\n\n

encoding

\n\n

Override the character set during creation of the database. Defaults to the default defined during installation.

\n\n

locale

\n\n

Override the locale during creation of the database. Defaults to the default defined during installation.

\n\n

grant

\n\n

Grant permissions during creation. Defaults to ALL.

\n\n

tablespace

\n\n

The name of the tablespace to allocate this database to. If not specifies, it defaults to the PostgreSQL default.

\n\n

istemplate

\n\n

Define database as a template. Defaults to false.

\n\n

Resource: postgresql::server::database

\n\n

This defined type can be used to create a database with no users and no permissions, which is a rare use case.

\n\n

namevar

\n\n

The name of the database to create.

\n\n

dbname

\n\n

The name of the database, defaults to the namevar.

\n\n

owner

\n\n

Name of the database user who should be set as the owner of the database. Defaults to the $user variable set in postgresql::server or postgresql::globals.

\n\n

tablespace

\n\n

Tablespace for where to create this database. Defaults to the defaults defined during PostgreSQL installation.

\n\n

encoding

\n\n

Override the character set during creation of the database. Defaults to the default defined during installation.

\n\n

locale

\n\n

Override the locale during creation of the database. Defaults to the default defined during installation.

\n\n

istemplate

\n\n

Define database as a template. Defaults to false.

\n\n

Resource: postgresql::server::database_grant

\n\n

This defined type manages grant based access privileges for users, wrapping the postgresql::server::database_grant for database specific permissions. Consult the PostgreSQL documentation for grant for more information.

\n\n

namevar

\n\n

Used to uniquely identify this resource, but functionality not used during grant.

\n\n

privilege

\n\n

Can be one of SELECT, TEMPORARY, TEMP, CONNECT. ALL is used as a synonym for CREATE. If you need to add multiple privileges, a space delimited string can be used.

\n\n

db

\n\n

Database to grant access to.

\n\n

role

\n\n

Role or user whom you are granting access for.

\n\n

psql_db

\n\n

Database to execute the grant against. This should not ordinarily be changed from the default, which is postgres.

\n\n

psql_user

\n\n

OS user for running psql. Defaults to the default user for the module, usually postgres.

\n\n

Resource: postgresql::server::pg_hba_rule

\n\n

This defined type allows you to create an access rule for pg_hba.conf. For more details see the PostgreSQL documentation.

\n\n

For example:

\n\n
postgresql::server::pg_hba_rule { 'allow application network to access app database':\n  description => "Open up postgresql for access from 200.1.2.0/24",\n  type => 'host',\n  database => 'app',\n  user => 'app',\n  address => '200.1.2.0/24',\n  auth_method => 'md5',\n}\n
\n\n

This would create a ruleset in pg_hba.conf similar to:

\n\n
# Rule Name: allow application network to access app database\n# Description: Open up postgresql for access from 200.1.2.0/24\n# Order: 150\nhost  app  app  200.1.2.0/24  md5\n
\n\n

namevar

\n\n

A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced pg_hba.conf so the originating resource can be identified.

\n\n

description

\n\n

A longer description for this rule if required. Defaults to none. This description is placed in the comments above the rule in pg_hba.conf.

\n\n

type

\n\n

The type of rule, this is usually one of: local, host, hostssl or hostnossl.

\n\n

database

\n\n

A comma separated list of databases that this rule matches.

\n\n

user

\n\n

A comma separated list of database users that this rule matches.

\n\n

address

\n\n

If the type is not 'local' you can provide a CIDR based address here for rule matching.

\n\n

auth_method

\n\n

The auth_method is described further in the pg_hba.conf documentation, but it provides the method that is used for authentication for the connection that this rule matches.

\n\n

auth_option

\n\n

For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for further details.

\n\n

order

\n\n

An order for placing the rule in pg_hba.conf. Defaults to 150.

\n\n

target

\n\n

This provides the target for the rule, and is generally an internal only property. Use with caution.

\n\n

Resource: postgresql::server::role

\n\n

This resource creates a role or user in PostgreSQL.

\n\n

namevar

\n\n

The role name to create.

\n\n

password_hash

\n\n

The hash to use during password creation. If the password is not already pre-encrypted in a format that PostgreSQL supports, use the postgresql_password function to provide an MD5 hash here, for example:

\n\n
postgresql::role { "myusername":\n  password_hash => postgresql_password('myusername', 'mypassword'),\n}\n
\n\n

createdb

\n\n

Whether to grant the ability to create new databases with this role. Defaults to false.

\n\n

createrole

\n\n

Whether to grant the ability to create new roles with this role. Defaults to false.

\n\n

login

\n\n

Whether to grant login capability for the new role. Defaults to false.

\n\n

superuser

\n\n

Whether to grant super user capability for the new role. Defaults to false.

\n\n

replication

\n\n

If true provides replication capabilities for this role. Defaults to false.

\n\n

connection_limit

\n\n

Specifies how many concurrent connections the role can make. Defaults to -1 meaning no limit.

\n\n

username

\n\n

The username of the role to create, defaults to namevar.

\n\n

Resource: postgresql::server::table_grant

\n\n

This defined type manages grant based access privileges for users. Consult the PostgreSQL documentation for grant for more information.

\n\n

namevar

\n\n

Used to uniquely identify this resource, but functionality not used during grant.

\n\n

privilege

\n\n

Can be one of SELECT, INSERT, UPDATE, REFERENCES. ALL is used as a synonym for CREATE. If you need to add multiple privileges, a space delimited string can be used.

\n\n

table

\n\n

Table to grant access on.

\n\n

db

\n\n

Database of table.

\n\n

role

\n\n

Role or user whom you are granting access for.

\n\n

psql_db

\n\n

Database to execute the grant against. This should not ordinarily be changed from the default, which is postgres.

\n\n

psql_user

\n\n

OS user for running psql. Defaults to the default user for the module, usually postgres.

\n\n

Resource: postgresql::server::tablespace

\n\n

This defined type can be used to create a tablespace. For example:

\n\n
postgresql::tablespace { 'tablespace1':\n  location => '/srv/space1',\n}\n
\n\n

It will create the location if necessary, assigning it the same permissions as your\nPostgreSQL server.

\n\n

namevar

\n\n

The tablespace name to create.

\n\n

location

\n\n

The path to locate this tablespace.

\n\n

owner

\n\n

The default owner of the tablespace.

\n\n

spcname

\n\n

Name of the tablespace. Defaults to namevar.

\n\n

Resource: postgresql::validate_db_connection

\n\n

This resource can be utilised inside composite manifests to validate that a client has a valid connection with a remote PostgreSQL database. It can be ran from any node where the PostgreSQL client software is installed to validate connectivity before commencing other dependent tasks in your Puppet manifests, so it is often used when chained to other tasks such as: starting an application server, performing a database migration.

\n\n

Example usage:

\n\n
postgresql::validate_db_connection { 'validate my postgres connection':\n  database_host           => 'my.postgres.host',\n  database_username       => 'mydbuser',\n  database_password       => 'mydbpassword',\n  database_name           => 'mydbname',\n}->\nexec { 'rake db:migrate':\n  cwd => '/opt/myrubyapp',\n}\n
\n\n

namevar

\n\n

Uniquely identify this resource, but functionally does nothing.

\n\n

database_host

\n\n

The hostname of the database you wish to test. Defaults to 'undef' which generally uses the designated local unix socket.

\n\n

database_port

\n\n

Port to use when connecting. Default to 'undef' which generally defaults to 5432 depending on your PostgreSQL packaging.

\n\n

database_name

\n\n

The name of the database you wish to test. Defaults to 'postgres'.

\n\n

database_username

\n\n

Username to connect with. Defaults to 'undef', which when using a unix socket and ident auth will be the user you are running as. If the host is remote you must provide a username.

\n\n

database_password

\n\n

Password to connect with. Can be left blank, but that is not recommended.

\n\n

run_as

\n\n

The user to run the psql command with for authenticiation. This is important when trying to connect to a database locally using Unix sockets and ident authentication. It is not needed for remote testing.

\n\n

sleep

\n\n

Upon failure, sets the number of seconds to sleep for before trying again.

\n\n

tries

\n\n

Upon failure, sets the number of attempts before giving up and failing the resource.

\n\n

create_db_first

\n\n

This will ensure the database is created before running the test. This only really works if your test is local. Defaults to true.

\n\n

Function: postgresql_password

\n\n

If you need to generate a postgres encrypted password, use postgresql_password. You can call it from your production manifests if you don't mind them containing the clear text versions of your passwords, or you can call it from the command line and then copy and paste the encrypted password into your manifest:

\n\n
$ puppet apply --execute 'notify { "test": message => postgresql_password("username", "password") }'\n
\n\n

Function: postgresql_acls_to_resources_hash(acl_array, id, order_offset)

\n\n

This internal function converts a list of pg_hba.conf based acls (passed in as an array of strings) to a format compatible with the postgresql::pg_hba_rule resource.

\n\n

This function should only be used internally by the module.

\n\n

Limitations

\n\n

Works with versions of PostgreSQL from 8.1 through 9.2.

\n\n

Current it is only actively tested with the following operating systems:

\n\n
    \n
  • Debian 6.x and 7.x
  • \n
  • Centos 5.x and 6.x
  • \n
  • Ubuntu 10.04 and 12.04
  • \n
\n\n

Although patches are welcome for making it work with other OS distros, it is considered best effort.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Tests

\n\n

There are two types of tests distributed with the module. Unit tests with rspec-puppet and system tests using rspec-system.

\n\n

For unit testing, make sure you have:

\n\n
    \n
  • rake
  • \n
  • bundler
  • \n
\n\n

Install the necessary gems:

\n\n
bundle install --path=vendor\n
\n\n

And then run the unit tests:

\n\n
bundle exec rake spec\n
\n\n

The unit tests are ran in Travis-CI as well, if you want to see the results of your own tests regsiter the service hook through Travis-CI via the accounts section for your Github clone of this project.

\n\n

If you want to run the system tests, make sure you also have:

\n\n
    \n
  • vagrant > 1.2.x
  • \n
  • Virtualbox > 4.2.10
  • \n
\n\n

Then run the tests using:

\n\n
bundle exec rake spec:system\n
\n\n

To run the tests on different operating systems, see the sets available in .nodeset.yml and run the specific set with the following syntax:

\n\n
RSPEC_SET=debian-607-x64 bundle exec rake spec:system\n
\n\n

Transfer Notice

\n\n

This Puppet module was originally authored by Inkling Systems. The maintainer preferred that Puppet Labs take ownership of the module for future improvement and maintenance as Puppet Labs is using it in the PuppetDB module. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Inkling.

\n\n

Previously: https://github.com/inkling/puppet-postgresql

\n\n

Contributors

\n\n
    \n
  • Andrew Moon
  • \n
  • Kenn Knowles (@kennknowles)
  • \n
  • Adrien Thebo
  • \n
  • Albert Koch
  • \n
  • Andreas Ntaflos
  • \n
  • Bret Comnes
  • \n
  • Brett Porter
  • \n
  • Chris Price
  • \n
  • dharwood
  • \n
  • Etienne Pelletier
  • \n
  • Florin Broasca
  • \n
  • Henrik
  • \n
  • Hunter Haugen
  • \n
  • Jari Bakken
  • \n
  • Jordi Boggiano
  • \n
  • Ken Barber
  • \n
  • nzakaria
  • \n
  • Richard Arends
  • \n
  • Spenser Gilliland
  • \n
  • stormcrow
  • \n
  • William Van Hevelingen
  • \n
\n
", "changelog": "
2013-11-05 - Version 3.2.0\n\nSummary:\n\nAdd's support for Ubuntu 13.10 (and 14.04) as well as x, y, z.\n\nFeatures:\n- Add versions for Ubuntu 13.10 and 14.04.\n- Use default_database in validate_db_connection instead of a hardcoded\n'postgres'\n- Add globals/params layering for default_database.\n- Allow specification of default database name.\n\nBugs:\n- Fixes to the README.\n\n\n2013-10-25 - Version 3.1.0\n\nSummary:\n\nThis is a minor feature and bug fix release.\n\nFirstly, the postgresql_psql type now includes a new parameter `search_path` which is equivalent to using `set search_path` which allows you to change the default schema search path.\n\nThe default version of Fedora 17 has now been added, so that Fedora 17 users can enjoy the module.\n\nAnd finally we've extended the capabilities of the defined type postgresql::validate_db_connection so that now it can handle retrying and sleeping between retries. This feature has been monopolized to fix a bug we were seeing with startup race conditions, but it can also be used by remote systems to 'wait' for PostgreSQL to start before their Puppet run continues.\n\nFeatures:\n- Defined $default_version for Fedora 17 (Bret Comnes)\n- add search_path attribute to postgresql_psql resource (Jeremy Kitchen)\n- (GH-198) Add wait and retry capability to validate_db_connection (Ken Barber)\n\nBugs:\n- enabling defined postgres user password without resetting on every puppet run (jonoterc)\n- periods are valid in configuration variables also (Jeremy Kitchen)\n- Add zero length string to join() function (Jarl Stefansson)\n- add require of install to reload class (cdenneen)\n- (GH-198) Fix race condition on postgresql startup (Ken Barber)\n- Remove concat::setup for include in preparation for the next concat release (Ken Barber)\n\n\n2013-10-14 - Version 3.0.0\n\nFinal release of 3.0, enjoy!\n\n2013-10-14 - Version 3.0.0-rc3\n\nSummary:\n\nAdd a parameter to unmanage pg_hba.conf to fix a regression from 2.5, as well\nas allowing owner to be passed into x.\n\nFeatures:\n- `manage_pg_hba_conf` parameter added to control pg_hba.conf management.\n- `owner` parameter added to server::db.\n\n2013-10-09 - Version 3.0.0-rc2\n\nSummary:\n\nA few bugfixes have been found since -rc1.\n\nFixes:\n- Special case for $datadir on Amazon\n- Fix documentation about username/password for the postgresql_hash function\n\n2013-10-01 - Version 3.0.0-rc1\n\nSummary:\n\nVersion 3 was a major rewrite to fix some internal dependency issues, and to\nmake the new Public API more clear. As a consequence a lot of things have\nchanged for version 3 and older revisions that we will try to outline here.\n\n(NOTE:  The format of this CHANGELOG differs to normal in an attempt to\nexplain the scope of changes)\n\n* Server specific objects now moved under `postgresql::server::` namespace:\n\nTo restructure server specific elements under the `postgresql::server::`\nnamespaces the following objects were renamed as such:\n\n`postgresql::database`       -> `postgresql::server::database`\n`postgresql::database_grant` -> `postgresql::server::database_grant`\n`postgresql::db`             -> `postgresql::server::db`\n`postgresql::grant`          -> `postgresql::server::grant`\n`postgresql::pg_hba_rule`    -> `postgresql::server::pg_hba_rule`\n`postgresql::plperl`         -> `postgresql::server::plperl`\n`postgresql::contrib`        -> `postgresql::server::contrib`\n`postgresql::role`           -> `postgresql::server::role`\n`postgresql::table_grant`    -> `postgresql::server::table_grant`\n`postgresql::tablespace`     -> `postgresql::server::tablespace`\n\n* New `postgresql::server::config_entry` resource for managing configuration:\n\nPreviously we used the `file_line` resource to modify `postgresql.conf`. This\nnew revision now adds a new resource named `postgresql::server::config_entry`\nfor managing this file. For example:\n\n```puppet\n    postgresql::server::config_entry { 'check_function_bodies':\n      value => 'off',\n    }\n```\n\nIf you were using `file_line` for this purpose, you should change to this new\nmethodology.\n\n* `postgresql_puppet_extras.conf` has been removed:\n\nNow that we have a methodology for managing `postgresql.conf`, and due to\nconcerns over the file management methodology using an `exec { 'touch ...': }`\nas a way to create an empty file the existing postgresql\\_puppet\\_extras.conf\nfile is no longer managed by this module.\n\nIf you wish to recreate this methodology yourself, use this pattern:\n\n```puppet\n    class { 'postgresql::server': }\n\n    $extras = "/tmp/include.conf"\n\n    file { $extras:\n      content => 'max_connections = 123',\n      notify  => Class['postgresql::server::service'],\n    }->\n    postgresql::server::config_entry { 'include':\n      value   => $extras,\n    }\n```\n\n* All uses of the parameter `charset` changed to `encoding`:\n\nSince PostgreSQL uses the terminology `encoding` not `charset` the parameter\nhas been made consisent across all classes and resources.\n\n* The `postgresql` base class is no longer how you set globals:\n\nThe old global override pattern was less then optimal so it has been fixed,\nhowever we decided to demark this properly by specifying these overrides in\nthe class `postgresql::global`. Consult the documentation for this class now\nto see what options are available.\n\nAlso, some parameter elements have been moved between this and the\n`postgresql::server` class where it made sense.\n\n* `config_hash` parameter collapsed for the `postgresql::server` class:\n\nBecause the `config_hash` was really passing data through to what was in\neffect an internal class (`postgresql::config`). And since we don't want this\nkind of internal exposure the parameters were collapsed up into the\n`postgresql::server` class directly.\n\n* Lots of changes to 'private' or 'undocumented' classes:\n\nIf you were using these before, these have changed names. You should only use\nwhat is documented in this README.md, and if you don't have what you need you\nshould raise a patch to add that feature to a public API. All internal classes\nnow have a comment at the top indicating them as private to make sure the\nmessage is clear that they are not supported as Public API.\n\n* `pg_hba_conf_defaults` parameter included to turn off default pg\\_hba rules:\n\nThe defaults should be good enough for most cases (if not raise a bug) but if\nyou simply need an escape hatch, this setting will turn off the defaults. If\nyou want to do this, it may affect the rest of the module so make sure you\nreplace the rules with something that continues operation.\n\n* `postgresql::database_user` has now been removed:\n\nUse `postgresql::server::role` instead.\n\n* `postgresql::psql` resource has now been removed:\n\nUse `postgresql_psql` instead. In the future we may recreate this as a wrapper\nto add extra capability, but it will not match the old behaviour.\n\n* `postgresql_default_version` fact has now been removed:\n\nIt didn't make sense to have this logic in a fact any more, the logic has been\nmoved into `postgresql::params`.\n\n* `ripienaar/concat` is no longer used, instead we use `puppetlabs/concat`:\n\nThe older concat module is now deprecated and moved into the\n`puppetlabs/concat` namespace. Functionality is more or less identical, but\nyou may need to intervene during the installing of this package - as both use\nthe same `concat` namespace.\n\n2013-09-09 Release 2.5.0\n=======================\n\nSummary\n-------\n\nThe focus of this release is primarily to capture the fixes done to the\ntypes and providers to make sure refreshonly works properly and to set\nthe stage for the large scale refactoring work of 3.0.0.\n\nFeatures\n--------\n\nBugfixes \n--------\n- Use boolean for refreshonly.\n- Fix postgresql::plperl documentation.\n- Add two missing parameters to config::beforeservice\n- Style fixes\n\n\n2013-08-01 Release 2.4.1\n========================\n\nSummary\n-------\n\nThis minor bugfix release solves an idempotency issue when using plain text\npasswords for the password_hash parameter for the postgresql::role defined\ntype. Without this, users would continually see resource changes everytime\nyour run Puppet.\n\nBugfixes\n---------\n- Alter role call not idempotent with cleartext passwords (Ken Barber)\n\n2013-07-19 Release 2.4.0\n========================\n\nSummary\n-------\nThis updates adds the ability to change permissions on tables, create template\ndatabases from normal databases, manage PL-Perl's postgres package, and\ndisable the management of `pg_hba.conf`.\n\nFeatures\n--------\n- Add `postgresql::table_grant` defined resource\n- Add `postgresql::plperl` class\n- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class\n- Add `istemplate` parameter to the `postgresql::database` define\n\nBugfixes\n--------\n- Update `postgresql::role` class to be able to update roles when modified\ninstead of only on creation.\n- Update tests\n- Fix documentation of `postgresql::database_grant`\n\n2.3.0\n=====\n\nThis feature release includes the following changes:\n\n* Add a new parameter `owner` to the `database` type.  This can be used to\n  grant ownership of a new database to a specific user.  (Bruno Harbulot)\n* Add support for operating systems other than Debian/RedHat, as long as the\n  user supplies custom values for all of the required paths, package names, etc.\n  (Chris Price)\n* Improved integration testing (Ken Barber)\n\n2.2.1\n=====\n\nThis release fixes a bug whereby one of our shell commands (psql) were not ran from a globally accessible directory. This was causing permission denied errors when the command attempted to change user without changing directory.\n\nUsers of previous versions might have seen this error:\n\n    Error: Error executing SQL; psql returned 256: 'could not change directory to "/root"\n\nThis patch should correct that.\n\n#### Detail Changes\n\n* Set /tmp as default CWD for postgresql_psql\n\n2.2.0\n=====\n\nThis feature release introduces a number of new features and bug fixes.\n\nFirst of all it includes a new class named `postgresql::python` which provides you with a convenient way of install the python Postgresql client libraries.\n\n    class { 'postgresql::python':\n    }\n\nYou are now able to use `postgresql::database_user` without having to specify a password_hash, useful for different authentication mechanisms that do not need passwords (ie. cert, local etc.).\n\nWe've also provided a lot more advanced custom parameters now for greater control of your Postgresql installation. Consult the class documentation for PuppetDB in the README.\n\nThis release in particular has largely been contributed by the community members below, a big thanks to one and all.\n\n#### Detailed Changes\n\n* Add support for psycopg installation (Flaper Fesp and Dan Prince)\n* Added default PostgreSQL version for Ubuntu 13.04 (Kamil Szymanski)\n* Add ability to create users without a password (Bruno Harbulot)\n* Three Puppet 2.6 fixes (Dominic Cleal)\n* Add explicit call to concat::setup when creating concat file (Dominic Cleal)\n* Fix readme typo (Jordi Boggiano)\n* Update postgres_default_version for Ubuntu (Kamil Szymanski)\n* Allow to set connection for noew role (Kamil Szymanski)\n* Fix pg_hba_rule for postgres local access (Kamil Szymanski)\n* Fix versions for travis-ci (Ken Barber)\n* Add replication support (Jordi Boggiano)\n* Cleaned up and added unit tests (Ken Barber)\n* Generalization to provide more flexability in postgresql configuration (Karel Brezina)\n* Create dependent directory for sudoers so tests work on Centos 5 (Ken Barber)\n* Allow SQL commands to be run against a specific DB (Carlos Villela)\n* Drop trailing comma to support Puppet 2.6 (Michael Arnold)\n\n2.1.1\n=====\n\nThis release provides a bug fix for RHEL 5 and Centos 5 systems, or specifically systems using PostgreSQL 8.1 or older. On those systems one would have received the error:\n\n    Error: Could not start Service[postgresqld]: Execution of ‘/sbin/service postgresql start’ returned 1:\n\nAnd the postgresql log entry:\n\n    FATAL: unrecognized configuration parameter "include"\n\nThis bug is due to a new feature we had added in 2.1.0, whereby the `include` directive in `postgresql.conf` was not compatible. As a work-around we have added checks in our code to make sure systems running PostgreSQL 8.1 or older do not have this directive added.\n\n#### Detailed Changes\n\n2013-01-21 - Ken Barber <ken@bob.sh>\n* Only install `include` directive and included file on PostgreSQL >= 8.2\n* Add system tests for Centos 5\n\n2.1.0\n=====\n\nThis release is primarily a feature release, introducing some new helpful constructs to the module.\n\nFor starters, we've added the line `include 'postgresql_conf_extras.conf'` by default so extra parameters not managed by the module can be added by other tooling or by Puppet itself. This provides a useful escape-hatch for managing settings that are not currently managed by the module today.\n\nWe've added a new defined resource for managing your tablespace, so you can now create new tablespaces using the syntax:\n\n    postgresql::tablespace { 'dbspace':\n      location => '/srv/dbspace',\n    }\n\nWe've added a locale parameter to the `postgresql` class, to provide a default. Also the parameter has been added to the `postgresql::database` and `postgresql::db` defined resources for changing the locale per database:\n\n    postgresql::db { 'mydatabase':\n      user     => 'myuser',\n      password => 'mypassword',\n      encoding => 'UTF8',\n      locale   => 'en_NG',\n    }\n\nThere is a new class for installing the necessary packages to provide the PostgreSQL JDBC client jars:\n\n    class { 'postgresql::java': }\n\nAnd we have a brand new defined resource for managing fine-grained rule sets within your pg_hba.conf access lists:\n\n    postgresql::pg_hba { 'Open up postgresql for access from 200.1.2.0/24':\n      type => 'host',\n      database => 'app',\n      user => 'app',\n      address => '200.1.2.0/24',\n      auth_method => 'md5',\n    }\n\nFinally, we've also added Travis-CI support and unit tests to help us iterate faster with tests to reduce regression. The current URL for these tests is here: https://travis-ci.org/puppetlabs/puppet-postgresql. Instructions on how to run the unit tests available are provided in the README for the module.\n\nA big thanks to all those listed below who made this feature release possible :-).\n\n#### Detailed Changes\n\n2013-01-18 - Simão Fontes <simaofontes@gmail.com> & Flaper Fesp <flaper87@gmail.com>\n* Remove trailing commas from params.pp property definition for Puppet 2.6.0 compatibility\n\n2013-01-18 - Lauren Rother <lauren.rother@puppetlabs.com>\n* Updated README.md to conform with best practices template\n\n2013-01-09 - Adrien Thebo <git@somethingsinistral.net>\n* Update postgresql_default_version to 9.1 for Debian 7.0\n\n2013-01-28 - Karel Brezina <karel.brezina@gmail.com>\n* Add support for tablespaces\n\n2013-01-16 - Chris Price <chris@puppetlabs.com> & Karel Brezina <karel.brezina@gmail.com>\n* Provide support for an 'include' config file 'postgresql_conf_extras.conf' that users can modify manually or outside of the module.\n\n2013-01-31 - jv <jeff@jeffvier.com>\n* Fix typo in README.pp for postgresql::db example\n\n2013-02-03 - Ken Barber <ken@bob.sh>\n* Add unit tests and travis-ci support\n\n2013-02-02 - Ken Barber <ken@bob.sh>\n* Add locale parameter support to the 'postgresql' class\n\n2013-01-21 - Michael Arnold <github@razorsedge.org>\n* Add a class for install the packages containing the PostgreSQL JDBC jar\n\n2013-02-06 - fhrbek <filip.hbrek@gmail.com>\n* Coding style fixes to reduce warnings in puppet-lint and Geppetto\n\n2013-02-10 - Ken Barber <ken@bob.sh>\n* Provide new defined resource for managing pg_hba.conf\n\n2013-02-11 - Ken Barber <ken@bob.sh>\n* Fix bug with reload of Postgresql on Redhat/Centos\n\n2013-02-15 - Erik Dalén <dalen@spotify.com>\n* Fix more style issues to reduce warnings in puppet-lint and Geppetto\n\n2013-02-15 - Erik Dalén <dalen@spotify.com>\n* Fix case whereby we were modifying a hash after creation\n\n2.0.1\n=====\n\nMinor bugfix release.\n\n2013-01-16 - Chris Price <chris@puppetlabs.com>\n * Fix revoke command in database.pp to support postgres 8.1 (43ded42)\n\n2013-01-15 - Jordi Boggiano <j.boggiano@seld.be>\n * Add support for ubuntu 12.10 status (3504405)\n\n2.0.0\n=====\n\nMany thanks to the following people who contributed patches to this\nrelease:\n\n* Adrien Thebo\n* Albert Koch\n* Andreas Ntaflos\n* Brett Porter\n* Chris Price\n* dharwood\n* Etienne Pelletier\n* Florin Broasca\n* Henrik\n* Hunter Haugen\n* Jari Bakken\n* Jordi Boggiano\n* Ken Barber\n* nzakaria\n* Richard Arends\n* Spenser Gilliland\n* stormcrow\n* William Van Hevelingen\n\nNotable features:\n\n   * Add support for versions of postgres other than the system default version\n     (which varies depending on OS distro).  This includes optional support for\n     automatically managing the package repo for the "official" postgres yum/apt\n     repos.  (Major thanks to Etienne Pelletier <epelletier@maestrodev.com> and\n     Ken Barber <ken@bob.sh> for their tireless efforts and patience on this\n     feature set!)  For example usage see `tests/official-postgresql-repos.pp`.\n\n   * Add some support for Debian Wheezy and Ubuntu Quantal\n\n   * Add new `postgres_psql` type with a Ruby provider, to replace the old\n     exec-based `psql` type.  This gives us much more flexibility around\n     executing SQL statements and controlling their logging / reports output.\n\n   * Major refactor of the "spec" tests--which are actually more like\n     acceptance tests.  We now support testing against multiple OS distros\n     via vagrant, and the framework is in place to allow us to very easily add\n     more distros.  Currently testing against Cent6 and Ubuntu 10.04.\n\n   * Fixed a bug that was preventing multiple databases from being owned by the\n     same user\n     (9adcd182f820101f5e4891b9f2ff6278dfad495c - Etienne Pelletier <epelletier@maestrodev.com>)\n\n   * Add support for ACLs for finer-grained control of user/interface access\n     (b8389d19ad78b4fb66024897097b4ed7db241930 - dharwood <harwoodd@cat.pdx.edu>)\n\n   * Many other bug fixes and improvements!\n\n\n1.0.0\n=====\n2012-09-17 - Version 0.3.0 released\n\n2012-09-14 - Chris Price <chris@puppetlabs.com>\n * Add a type for validating a postgres connection (ce4a049)\n\n2012-08-25 - Jari Bakken <jari.bakken@gmail.com>\n * Remove trailing commas. (e6af5e5)\n\n2012-08-16 - Version 0.2.0 released\n
", "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2013 Puppet Labs\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-11-05 13:22:50 -0800", "updated_at": "2013-11-05 13:22:50 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-postgresql-3.2.0", "version": "3.2.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.1.0", "version": "3.1.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0-rc2", "version": "3.0.0-rc2" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0-rc1", "version": "3.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.5.0", "version": "2.5.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.4.1", "version": "2.4.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.4.0", "version": "2.4.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.3.0", "version": "2.3.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.2.1", "version": "2.2.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.2.0", "version": "2.2.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.1.1", "version": "2.1.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-postgresql", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-ntp", "name": "ntp", "downloads": 63676, "created_at": "2011-06-16 23:31:17 -0700", "updated_at": "2014-01-06 14:40:58 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-ntp-3.0.1", "module": { "uri": "/v3/modules/puppetlabs-ntp", "name": "ntp", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.0.1", "metadata": { "name": "puppetlabs-ntp", "version": "3.0.1", "summary": "NTP Module", "author": "Puppet Labs", "description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 0.1.6" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "909729694bab62c1e36001512b68a8fd", ".nodeset.yml": "8d1b7762d4125ce53379966a1daf355c", ".travis.yml": "193ec2b14cc9644c88f4249422580da2", "CHANGELOG.md": "f480232791b05bbe9041ad08155ef8e0", "CONTRIBUTING.md": "2ef1d6f4417dde9af6c7f46f5c8a864b", "Gemfile": "2261b2606c6eba618ce07800eebb3d00", "Gemfile.lock": "c29fc13e97b6b56301bf208854e3258b", "LICENSE": "f0b6fdc310531526f257378d7bad0044", "Modulefile": "4e03453a8ee0f4cc61ae3558536fa2ed", "README.markdown": "4be793ae578227e267a6391dcc5a10d9", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/config.pp": "8d9afb6e4327277c96c5617ad687043a", "manifests/init.pp": "ae9da639adaea106a2b581256ee14626", "manifests/install.pp": "ac33c5733f4321a9af7a4735265c1986", "manifests/params.pp": "c45f8e67ac00ddd773618f20b9db73e9", "manifests/service.pp": "350238b50e9cb896d270a2c76a64334f", "spec/acceptance/basic_spec.rb": "1da5abd2e5db6ecb2244a1434965cecd", "spec/acceptance/class_spec.rb": "e29605c62985d081f77b32b3ec34c522", "spec/acceptance/nodesets/centos-64-x64.yml": "0e4558adc2f95b661535f866ee14d7af", "spec/acceptance/nodesets/default.yml": "0e4558adc2f95b661535f866ee14d7af", "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "2e3662e93d5f23128147f28b9017fd99", "spec/acceptance/ntp_config_spec.rb": "f0e57d313f1587adc6669fe3ddc03258", "spec/acceptance/ntp_install_spec.rb": "5381832b14caf9bd21b7ddd41318446a", "spec/acceptance/ntp_parameters_spec.rb": "c65e8f41119df1599c59530afa4f13be", "spec/acceptance/ntp_service_spec.rb": "368fb33ff6663657349a5d5f519727f9", "spec/acceptance/preferred_servers_spec.rb": "33c423e397534a43db4cc9366ff76c1c", "spec/acceptance/restrict_spec.rb": "83173f6fd4ecbccb652aee071e4ee674", "spec/classes/ntp_spec.rb": "f8ac7807b2beafc5fdbad42e0c04326e", "spec/fixtures/modules/my_ntp/templates/ntp.conf.erb": "566e373728e9b13eda516115ff0a9fb0", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_acceptance.rb": "b5175e829a99c4a02178dcfccc2ba3b3", "spec/unit/puppet/provider/README.markdown": "e52668944ee6af2fb5d5b9e798342645", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94", "templates/ntp.conf.erb": "178afa2b9fa1f25851cb4d7eb7a957a9", "tests/init.pp": "d398e7687ec1d893ef23d1b7d2afc094" }, "source": "git://github.com/puppetlabs/puppetlabs-ntp", "project_page": "http://github.com/puppetlabs/puppetlabs-ntp", "license": "Apache Version 2.0" }, "tags": [ "ntp", "time", "archlinux", "gentoo", "aix", "debian", "ubuntu", "rhel", "centos", "ntpd", "ntpserver" ], "file_uri": "/v3/files/puppetlabs-ntp-3.0.1.tar.gz", "file_size": 17618, "file_md5": "c8ddf9b8b9790ee049de123ef91cdcad", "downloads": 2548, "readme": "

ntp

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with ntp\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

The NTP module installs, configures, and manages the ntp service.

\n\n

Module Description

\n\n

The NTP module handles running NTP across a range of operating systems and\ndistributions. Where possible we use the upstream ntp templates so that the\nresults closely match what you'd get if you modified the package default conf\nfiles.

\n\n

Setup

\n\n

What ntp affects

\n\n
    \n
  • ntp package.
  • \n
  • ntp configuration file.
  • \n
  • ntp service.
  • \n
\n\n

Beginning with ntp

\n\n

include '::ntp' is enough to get you up and running. If you wish to pass in\nparameters like which servers to use then you can use:

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

Usage

\n\n

All interaction with the ntp module can do be done through the main ntp class.\nThis means you can simply toggle the options in the ntp class to get at the\nfull functionality.

\n\n

I just want NTP, what's the minimum I need?

\n\n
include '::ntp'\n
\n\n

I just want to tweak the servers, nothing else.

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

I'd like to make sure I restrict who can connect as well.

\n\n
class { '::ntp':\n  servers  => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict => ['127.0.0.1'],\n}\n
\n\n

I'd like to opt out of having the service controlled, we use another tool for that.

\n\n
class { '::ntp':\n  servers        => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict       => ['127.0.0.1'],\n  manage_service => false,\n}\n
\n\n

Looks great! But I'd like a different template, we need to do something unique here.

\n\n
class { '::ntp':\n  servers         => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict        => ['127.0.0.1'],\n  manage_service  => false,\n  config_template => 'different/module/custom.template.erb',\n}\n
\n\n

Reference

\n\n

Classes

\n\n
    \n
  • ntp: Main class, includes all the rest.
  • \n
  • ntp::install: Handles the packages.
  • \n
  • ntp::config: Handles the configuration file.
  • \n
  • ntp::service: Handles the service.
  • \n
\n\n

Parameters

\n\n

The following parameters are available in the ntp module

\n\n

autoupdate

\n\n

Deprecated: This parameter previously determined if the ntp module should be\nautomatically updated to the latest version available. Replaced by package_\nensure.

\n\n

config

\n\n

This sets the file to write ntp configuration into.

\n\n

config_template

\n\n

This determines which template puppet should use for the ntp configuration.

\n\n

driftfile

\n\n

This sets the location of the driftfile for ntp.

\n\n

keys_controlkey

\n\n

Which of the keys is used as the control key.

\n\n

keys_enable

\n\n

Should the ntp keys functionality be enabled.

\n\n

keys_file

\n\n

Location of the keys file.

\n\n

keys_requestkey

\n\n

Which of the keys is used as the request key.

\n\n

package_ensure

\n\n

This can be set to 'present' or 'latest' or a specific version to choose the\nntp package to be installed.

\n\n

package_name

\n\n

This determines the name of the package to install.

\n\n

panic

\n\n

This determines if ntp should 'panic' in the event of a very large clock skew.\nWe set this to false if you're on a virtual machine by default as they don't\ndo a great job with keeping time.

\n\n

preferred_servers

\n\n

List of ntp servers to prefer. Will append prefer for any server in this list\nthat also appears in the servers list.

\n\n

restrict

\n\n

This sets the restrict options in the ntp configuration. The lines are\npreappended with restrict so you just need to list the rest of the restriction.

\n\n

servers

\n\n

This selects the servers to use for ntp peers.

\n\n

service_enable

\n\n

This determines if the service should be enabled at boot.

\n\n

service_ensure

\n\n

This determines if the service should be running or not.

\n\n

service_manage

\n\n

This selects if puppet should manage the service in the first place.

\n\n

service_name

\n\n

This selects the name of the ntp service for puppet to manage.

\n\n

udlc

\n\n

Enables configs for undisciplined local clock regardless of\nstatus as a virtual machine.

\n\n

Limitations

\n\n

This module has been built on and tested against Puppet 2.7 and higher.

\n\n

The module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
  • Gentoo
  • \n
  • Arch Linux
  • \n
  • FreeBSD
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": "

2013-12-17 Release 3.0.1

\n\n

Summary:

\n\n

Work around a packaging bug with symlinks, no other functional changes.

\n\n

2013-12-13 Release 3.0.0

\n\n

Summary:

\n\n

Final release of 3.0, enjoy!

\n\n

2013-10-14 - Version 3.0.0-rc1

\n\n

Summary:

\n\n

This release changes the behavior of restrict and adds AIX osfamily support.

\n\n

Backwards-incompatible Changes:

\n\n

restrict no longer requires you to pass in parameters as:

\n\n

restrict => [ 'restrict x', 'restrict y' ]

\n\n

but just as:

\n\n

restrict => [ 'x', 'y' ]

\n\n

As the template now prefixes each line with restrict.

\n\n

Features:

\n\n
    \n
  • Change the behavior of restrict so you no longer need the restrict\nkeyword.
  • \n
  • Add udlc parameter to enable undisciplined local clock regardless of the\nmachines status as a virtual machine.
  • \n
  • Add AIX support.
  • \n
\n\n

Fixes:

\n\n
    \n
  • Use class{} instead of including and then anchoring. (style)
  • \n
  • Extend Gentoo coverage to Facter 1.7.
  • \n
\n\n

2013-09-05 - Version 2.0.1

\n\n

Summary:

\n\n

Correct the LICENSE file.

\n\n

Bugfixes:

\n\n
    \n
  • Add in the appropriate year and name in LICENSE.
  • \n
\n\n

2013-07-31 - Version 2.0.0

\n\n

Summary:

\n\n

The 2.0 release focuses on merging all the distro specific\ntemplates into a single reusable template across all platforms.

\n\n

To aid in that goal we now allow you to change the driftfile,\nntp keys, and perferred_servers.

\n\n

Backwards-incompatible changes:

\n\n

As all the distro specific templates have been removed and a\nunified one created you may be missing functionality you\npreviously relied on. Please test carefully before rolling\nout globally.

\n\n

Configuration directives that might possibly be affected:

\n\n
    \n
  • filegen
  • \n
  • fudge (for virtual machines)
  • \n
  • keys
  • \n
  • logfile
  • \n
  • restrict
  • \n
  • restrictkey
  • \n
  • statistics
  • \n
  • trustedkey
  • \n
\n\n

Features:

\n\n
    \n
  • All templates merged into a single template.
  • \n
  • NTP Keys support added.
  • \n
  • Add preferred servers support.
  • \n
  • Parameters in ntp class:\n\n
      \n
    • driftfile: path for the ntp driftfile.
    • \n
    • keys_enable: Enable NTP keys feature.
    • \n
    • keys_file: Path for the NTP keys file.
    • \n
    • keys_trusted: Which keys to trust.
    • \n
    • keys_controlkey: Which key to use for the control key.
    • \n
    • keys_requestkey: Which key to use for the request key.
    • \n
    • preferred_servers: Array of servers to prefer.
    • \n
    • restrict: Array of restriction options to apply.
    • \n
  • \n
\n\n

2013-07-15 - Version 1.0.1\nBugfixes:

\n\n
    \n
  • Fix deprecated warning in autoupdate parameter.
  • \n
  • Correctly quote is_virtual fact.
  • \n
\n\n

2013-07-08 - Version 1.0.0\nFeatures:

\n\n
    \n
  • Completely refactored to split across several classes.
  • \n
  • rspec-puppet tests rewritten to cover more options.
  • \n
  • rspec-system tests added.
  • \n
  • ArchLinux handled via osfamily instead of special casing.
  • \n
  • parameters in ntp class:\n\n
      \n
    • autoupdate: deprecated in favor of directly setting package_ensure.
    • \n
    • panic: set to false if you wish to allow large clock skews.
    • \n
  • \n
\n\n

2011-11-10 Dan Bode dan@puppetlabs.com - 0.0.4\nAdd Amazon Linux as a supported platform\nAdd unit tests\n2011-06-16 Jeff McCune jeff@puppetlabs.com - 0.0.3\nInitial release under puppetlabs

\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [2013] [Puppet Labs]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-12-17 09:05:18 -0800", "updated_at": "2013-12-17 09:05:18 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-ntp-3.0.1", "version": "3.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-3.0.0-rc1", "version": "3.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.0-rc1", "version": "2.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.0-rc1", "version": "1.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-ntp-0.0.3", "version": "0.0.3" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-ntp", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-vcsrepo", "name": "vcsrepo", "downloads": 43547, "created_at": "2010-05-20 22:48:21 -0700", "updated_at": "2014-01-06 14:40:29 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-vcsrepo-0.2.0", "module": { "uri": "/v3/modules/puppetlabs-vcsrepo", "name": "vcsrepo", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.0", "metadata": { "name": "puppetlabs/vcsrepo", "version": "0.2.0", "source": "UNKNOWN", "author": "puppetlabs", "license": "Apache License, Version 2.0", "summary": "Manage repositories from various version control systems", "description": "Manage repositories from various version control systems", "project_page": "UNKNOWN", "dependencies": [ ], "types": [ { "name": "vcsrepo", "doc": "A local version control repository", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `bare`, `absent`, `latest`." }, { "name": "revision", "doc": "The revision of the repository Values can match `/^\\S+$/`." } ], "parameters": [ { "name": "path", "doc": "Absolute path to repository" }, { "name": "source", "doc": "The source URI for the repository" }, { "name": "fstype", "doc": "Filesystem type Requires features filesystem_types." }, { "name": "owner", "doc": "The user/uid that owns the repository files" }, { "name": "group", "doc": "The group/gid that owns the repository files" }, { "name": "user", "doc": "The user to run for repository operations" }, { "name": "excludes", "doc": "Files to be excluded from the repository" }, { "name": "force", "doc": "Force repository creation, destroying any files on the path in the process. Valid values are `true`, `false`." }, { "name": "compression", "doc": "Compression level Requires features gzip_compression." }, { "name": "basic_auth_username", "doc": "HTTP Basic Auth username Requires features basic_auth." }, { "name": "basic_auth_password", "doc": "HTTP Basic Auth password Requires features basic_auth." }, { "name": "identity", "doc": "SSH identity file Requires features ssh_identity." }, { "name": "module", "doc": "The repository module to manage Requires features modules." }, { "name": "remote", "doc": "The remote repository to track Requires features multiple_remotes." }, { "name": "configuration", "doc": "The configuration directory to use Requires features configuration." }, { "name": "cvs_rsh", "doc": "The value to be used for the CVS_RSH environment variable. Requires features cvs_rsh." } ], "providers": [ { "name": "bzr", "doc": "Supports Bazaar repositories\n\nRequired binaries: `bzr`. Supported features: `reference_tracking`." }, { "name": "cvs", "doc": "Supports CVS repositories/workspaces\n\nRequired binaries: `cvs`. Supported features: `cvs_rsh`, `gzip_compression`, `modules`, `reference_tracking`." }, { "name": "dummy", "doc": "Dummy default provider\n\nDefault for `vcsrepo` == `dummy`." }, { "name": "git", "doc": "Supports Git repositories\n\nRequired binaries: `git`, `su`. Supported features: `bare_repositories`, `multiple_remotes`, `reference_tracking`, `ssh_identity`, `user`." }, { "name": "hg", "doc": "Supports Mercurial repositories\n\nRequired binaries: `hg`, `su`. Supported features: `reference_tracking`, `ssh_identity`, `user`." }, { "name": "svn", "doc": "Supports Subversion repositories\n\nRequired binaries: `svn`, `svnadmin`, `svnlook`. Supported features: `basic_auth`, `configuration`, `filesystem_types`, `reference_tracking`." } ] } ], "checksums": { "CHANGELOG": "c41bec2dddc2a3de4c10b56e4d348492", "Gemfile": "a25ee68d266f452c3cf19537736e778d", "Gemfile.lock": "aac999a29c92e12f0af120c97bda73f7", "LICENSE": "b8d96fef1f55096f9d39326408122136", "Modulefile": "e69308b7a49f10b2695057c33eeba5f6", "README.BZR.markdown": "97f638d169a1c39d461c3f2c0e2ec32f", "README.CVS.markdown": "7bc2fd4def5d18451dc8d5fc86d2910c", "README.GIT.markdown": "9adc244b55c7441076541dfc7fdd1a68", "README.HG.markdown": "438ebb7b5262edea0a5b69856dfc9415", "README.SVN.markdown": "4f8de2b336022700aa557a59c7770e57", "README.markdown": "aa36edae60f06e5cb0fef00c3d5b6618", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "examples/bzr/branch.pp": "05c66419324a576b9b28df876673580d", "examples/bzr/init_repo.pp": "fadd2321866ffb0aacff698d2dc1f0ca", "examples/cvs/local.pp": "7fbde03a5c71edf168267ae42d0bbcbc", "examples/cvs/remote.pp": "491f18f752752bec6133a88de242c44d", "examples/git/bare_init.pp": "7cf56abffdf99f379153166f18f961f8", "examples/git/clone.pp": "0e3181990c095efee1498ccfca5897fb", "examples/git/working_copy_init.pp": "99d92d9957e78a0c03f9cbed989c79ca", "examples/hg/clone.pp": "c92bbd704a4c2da55fff5f45955ce6d1", "examples/hg/init_repo.pp": "bf5fa0ab48a2f5a1ccb63768d961413d", "examples/svn/checkout.pp": "9ef7a8fbd3a763fa3894efa864047023", "examples/svn/server.pp": "94b26f6e50d5e411b33b1ded1bc2138a", "lib/puppet/provider/vcsrepo/bzr.rb": "52f4d40153e0a3bc54be1b7dfa18b5f1", "lib/puppet/provider/vcsrepo/cvs.rb": "1ce8d98a2ffad4bf0c575af014270c8b", "lib/puppet/provider/vcsrepo/dummy.rb": "2f8159468d6ecc8087debde858a80dd6", "lib/puppet/provider/vcsrepo/git.rb": "7c453bfe9abe5367902f090b554c51e2", "lib/puppet/provider/vcsrepo/hg.rb": "01887f986db627ffc1a8ff7a52328ddb", "lib/puppet/provider/vcsrepo/svn.rb": "03b14667e002db9452c597e1b21718dd", "lib/puppet/provider/vcsrepo.rb": "dbd72590771291f1db23a41ac048ed9d", "lib/puppet/type/vcsrepo.rb": "bf01ae48b0d2ae542bc8c0f65da93c64", "spec/fixtures/bzr_version_info.txt": "5edb13429faf2f0b9964b4326ef49a65", "spec/fixtures/git_branch_a.txt": "2371229e7c1706c5ab8f90f0cd57230f", "spec/fixtures/git_branch_feature_bar.txt": "70903a4dc56f7300fbaa54c295b52c4f", "spec/fixtures/git_branch_none.txt": "acaa61de6a7f0f5ca39b763799dcb9a6", "spec/fixtures/hg_parents.txt": "efc28a1bd3f1ce7fb4481f76feed3f6e", "spec/fixtures/hg_tags.txt": "8383048b15adb3d58a92ea0c8b887537", "spec/fixtures/svn_info.txt": "978db25720a098e5de48388fe600c062", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "ce4d39194e1b8486de8ec25f639f6762", "spec/support/filesystem_helpers.rb": "eb2a8eb3769865004c84e971ccb1396c", "spec/support/fixture_helpers.rb": "61781d99ea201e9da6d23c64a25cc285", "spec/unit/puppet/provider/vcsrepo/bzr_spec.rb": "320b5be01c84f3424ac99729e42b4562", "spec/unit/puppet/provider/vcsrepo/cvs_spec.rb": "24f760cb53be365ca185cd196c03743a", "spec/unit/puppet/provider/vcsrepo/git_spec.rb": "2159d3a06a2a764dcf8e3da141390734", "spec/unit/puppet/provider/vcsrepo/hg_spec.rb": "b6eabd1167753f1a6a87eeef897bc1c5", "spec/unit/puppet/provider/vcsrepo/svn_spec.rb": "957328714f6df1e90b663514615f460e", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94" } }, "tags": [ "vcs", "repo", "svn", "subversion", "git", "hg", "bzr", "CVS" ], "file_uri": "/v3/files/puppetlabs-vcsrepo-0.2.0.tar.gz", "file_size": 19438, "file_md5": "b254b09335ffd1ce073965499350e2d2", "downloads": 9136, "readme": "

vcsrepo

\n\n

\"Build

\n\n

Purpose

\n\n

This provides a single type, vcsrepo.

\n\n

This type can be used to describe:

\n\n
    \n
  • A working copy checked out from a (remote or local) source, at an\narbitrary revision
  • \n
  • A "blank" working copy not associated with a source (when it makes\nsense for the VCS being used)
  • \n
  • A "blank" central repository (when the distinction makes sense for the VCS\nbeing used)
  • \n
\n\n

Supported Version Control Systems

\n\n

This module supports a wide range of VCS types, each represented by a\nseparate provider.

\n\n

For information on how to use this module with a specific VCS, see\nREADME.<VCS>.markdown.

\n\n

License

\n\n

See LICENSE.

\n
", "changelog": "
2013-11-13 - Version 0.2.0\n\nSummary:\n\nThis release mainly focuses on a number of bugfixes, which should\nsignificantly improve the reliability of Git and SVN.  Thanks to\nour many contributors for all of these fixes!\n\nFeatures:\n- Git:\n - Add autorequire for Package['git']\n- HG:\n - Allow user and identity properties.\n- Bzr:\n - "ensure => latest" support.\n- SVN:\n - Added configuration parameter.\n - Add support for main svn repositories.\n- CVS:\n - Allow for setting the CVS_RSH environment variable.\n\nFixes:\n- Handle Puppet::Util[::Execution].withenv for 2.x and 3.x properly.\n- Change path_empty? to not do full directory listing.\n- Overhaul spec tests to work with rspec2.\n- Git:\n - Improve Git SSH usage documentation.\n - Add ssh session timeouts to prevent network issues from blocking runs.\n - Fix git provider checkout of a remote ref on an existing repo.\n - Allow unlimited submodules (thanks to --recursive).\n - Use git checkout --force instead of short -f everywhere.\n - Update git provider to handle checking out into an existing (empty) dir.\n- SVN:\n - Handle force property. for svn.\n - Adds support for changing upstream repo url.\n - Check that the URL of the WC matches the URL from the manifest.\n - Changed from using "update" to "switch".\n - Handle revision update without source switch.\n - Fix svn provider to look for '^Revision:' instead of '^Last Changed Rev:'.\n- CVS:\n - Documented the "module" attribute.\n
", "license": "
Copyright (C) 2010-2012 Puppet Labs Inc.\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nThis program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software\nFoundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n
", "created_at": "2013-11-13 10:21:58 -0800", "updated_at": "2013-11-13 10:21:58 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-vcsrepo-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.5", "version": "0.0.5" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-vcsrepo", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-git", "name": "git", "downloads": 36223, "created_at": "2011-06-03 20:40:03 -0700", "updated_at": "2014-01-06 14:41:32 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-git-0.0.3", "module": { "uri": "/v3/modules/puppetlabs-git", "name": "git", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.3", "metadata": { "name": "puppetlabs-git", "version": "0.0.3", "source": "git://github.com/puppetlabs/puppetlabs-git.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "module for installing git", "description": "module for installing git", "project_page": "https://github.com/puppetlabs/puppetlabs-git/", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "f2e3e57948da2dcab3bdbe782efd6b11", "LICENSE": "0e5ccf641e613489e66aa98271dbe798", "Modulefile": "f971ce8e90cb5cdf63722c92e0497110", "README.md": "8f241391b0165fe286588154a5321aee", "manifests/gitosis.pp": "6b1bbd3a43baa63c63f5d03dcb9fbe95", "manifests/init.pp": "520e2a141b314dd9b859a0f2d31a338e", "tests/gitosis.pp": "4a9f134fbd08096dac65aafa9fbc0742", "tests/init.pp": "bbf47fdd0ad67c6fa1d47d39fdd6a94b" } }, "tags": [ ], "file_uri": "/v3/files/puppetlabs-git-0.0.3.tar.gz", "file_size": 5931, "file_md5": "64e8403025a9d4fb8270cb53b37a6959", "downloads": 31939, "readme": "

git

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the [Modulename] module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with [Modulename]\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Limitations - OS compatibility, etc.
  10. \n
  11. Development - Guide for contributing to the module
  12. \n
\n\n

Overview

\n\n

Simple module that can install git or gitosis

\n\n

Module Description

\n\n

This module installs the git revision control system on a target node. It does not manage a git server or any associated services; it simply ensures a bare minimum set of features (e.g. just a package) to use git.

\n\n

Setup

\n\n

What git affects

\n\n
    \n
  • Package['git']
  • \n
\n\n

The specifics managed by the module may vary depending on the platform.

\n\n

Usage

\n\n

Simply include the git class.

\n\n
include git\n
\n\n

Limitations

\n\n

This module is known to work with the following operating system families:

\n\n
    \n
  • RedHat 5, 6
  • \n
  • Debian 6.0.7 or newer
  • \n
  • Ubuntu 12.04 or newer
  • \n
\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": null, "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-09-10 08:41:17 -0700", "updated_at": "2013-09-10 08:41:17 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-git-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-git-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-git-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-git/", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-puppetdb", "name": "puppetdb", "downloads": 32658, "created_at": "2012-09-19 16:49:18 -0700", "updated_at": "2014-01-06 14:20:12 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-puppetdb-3.0.0", "module": { "uri": "/v3/modules/puppetlabs-puppetdb", "name": "puppetdb", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.0.0", "metadata": { "types": [ { "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "puppetdb_server", "doc": "The DNS name or IP address of the server where puppetdb should be running." }, { "name": "puppetdb_port", "doc": "The port that the puppetdb server should be listening on." }, { "name": "use_ssl", "doc": "Whether the connection will be attemped using https" }, { "name": "timeout", "doc": "The max number of seconds that the validator should wait before giving up and deciding that puppetdb is not running; defaults to 15 seconds." } ], "providers": [ { "name": "puppet_https", "doc": "A provider for the resource type `puppetdb_conn_validator`,\n which validates the puppetdb connection by attempting an https\n connection to the puppetdb server. Uses the puppet SSL certificate\n setup from the local puppet environment to authenticate." } ], "name": "puppetdb_conn_validator", "doc": "Verify that a connection can be successfully established between a node\n and the puppetdb server. Its primary use is as a precondition to\n prevent configuration changes from being applied if the puppetdb\n server cannot be reached, but it could potentially be used for other\n purposes such as monitoring.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ] } ], "description": "PuppetDB resource types", "summary": "PuppetDB resource types", "source": "git://github.com/puppetlabs/puppetlabs-puppetdb.git", "checksums": { "manifests/main/report_processor.pp": "0bcf515ce1547166fb2aaeeea03d2108", "manifests/init.pp": "cdd9f0d32115802878d06abf920bd9ed", "manifests/database/postgresql.pp": "d7944858425f6cacb54ae8a46423bbd0", "lib/puppet/type/puppetdb_conn_validator.rb": "aa4846110f363047a8988f261378ec0e", "files/routes.yaml": "779d47e8d0c320b10f8c31cd9838fca1", "manifests/server/jetty_ini.pp": "4207efbf3ce27c57921368ebe46f3701", "manifests/params.pp": "abbcec237f977061315f58fb3b4cc763", "NOTICE": "dd0cc848426aa3648e668269e7a04252", "manifests/main/routes.pp": "b3c370dd0e1e18e8db0b30be8aa10056", "lib/puppet/util/puppetdb_validator.rb": "87dfd3cde4a06f898d88b9fda35c7dce", "CHANGELOG": "8d3b060589d25d936d06d61b891302da", "manifests/server/database_ini.pp": "bf8f6a936cdea3ec4c56bf3aefd8a8fa", "manifests/main/puppetdb_conf.pp": "a757975b360c74103cfea1417004b61a", "manifests/server/firewall.pp": "c09a3c3b65e47353d1fcc98514faaead", "manifests/server.pp": "ddccf98a84a0f4a889375cf7a7963867", "Modulefile": "d420eeddd4072b84f5dd08880b606136", "manifests/server/validate_db.pp": "163c5a161b79839c1827cf3ba1f06d2c", "manifests/main/storeconfigs.pp": "7bb67d0559564a44bfb6740f967a3bc2", "manifests/main/config.pp": "6b4509b30fa1d66a6c37799844907f70", "lib/puppet/provider/puppetdb_conn_validator/puppet_https.rb": "17c55730cd42c64fe959f12a87a96085", "lib/puppet/parser/functions/puppetdb_create_subsetting_resource_hash.rb": "61b6f5ebc352e9bff5a914a43a14dc22", "README.md": "0b168fe59aa1f041c44eb7755bc22112", "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57" }, "dependencies": [ { "version_requirement": "1.x", "name": "puppetlabs/inifile" }, { "version_requirement": ">= 3.1.0 <4.0.0", "name": "puppetlabs/postgresql" }, { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.0", "name": "puppetlabs/stdlib" } ], "author": "Puppet Labs", "project_page": "https://github.com/puppetlabs/puppetlabs-puppetdb", "version": "3.0.0", "name": "puppetlabs-puppetdb", "license": "ASL 2.0" }, "tags": [ "puppet", "puppetdb", "storeconfig" ], "file_uri": "/v3/files/puppetlabs-puppetdb-3.0.0.tar.gz", "file_size": 24498, "file_md5": "a65924f70c75ee6d48be49b9f1ee5e03", "downloads": 6887, "readme": "

puppetdb

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the PuppetDB module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with PuppetDB module
  6. \n
  7. Upgrading - Guide for upgrading from older revisions of this module
  8. \n
  9. Usage - The classes and parameters available for configuration
  10. \n
  11. Implementation - An under-the-hood peek at what the module is doing
  12. \n
  13. Limitations - OS compatibility, etc.
  14. \n
  15. Development - Guide for contributing to the module
  16. \n
  17. Release Notes - Notes on the most recent updates to the module
  18. \n
\n\n

Overview

\n\n

By guiding puppetdb setup and configuration with a primary Puppet server, the PuppetDB module provides fast, streamlined access to data on puppetized infrastructure.

\n\n

Module Description

\n\n

The PuppetDB module provides a quick way to get started using PuppetDB, an open source inventory resource service that manages storage and retrieval of platform-generated data. The module will install PostgreSQL and PuppetDB if you don't have them, as well as set up the connection to primary Puppet server. The module will also provide a dashboard you can use to view the current state of your system.

\n\n

For more information about PuppetDB please see the official PuppetDB documentation.

\n\n

Setup

\n\n

What PuppetDB affects:

\n\n
    \n
  • package/service/configuration files for PuppetDB
  • \n
  • package/service/configuration files for PostgreSQL (optional, but set as default)
  • \n
  • primary Puppet server's runtime (via plugins)
  • \n
  • primary Puppet server's configuration\n\n
      \n
    • note: Using the puppetdb::config class will cause your routes.yaml file to be overwritten entirely (see Usage below for options and more information )
    • \n
  • \n
  • system firewall (optional)
  • \n
  • listened-to ports
  • \n
\n\n

Introductory Questions

\n\n

To begin using PuppetDB, you’ll have to make a few decisions:

\n\n
    \n
  • Which database back-end should I use?\n\n
      \n
    • PostgreSQL (default) or our embedded database
    • \n
    • Embedded database
    • \n
    • note: We suggest using the embedded database only for experimental environments rather than production, as it does not scale well and can cause difficulty in migrating to PostgreSQL.
    • \n
  • \n
  • Should I run the database on the same node that I run PuppetDB on?
  • \n
  • Should I run PuppetDB on the same node that I run my primary Puppet server on?
  • \n
\n\n

The answers to those questions will be largely dependent on your answers to questions about your Puppet environment:

\n\n
    \n
  • How many nodes are you managing?
  • \n
  • What kind of hardware are you running on?
  • \n
  • Is your current load approaching the limits of your hardware?
  • \n
\n\n

Depending on your answers to all of the questions above, you will likely fall under one of these set-up options:

\n\n
    \n
  1. Single Node (Testing and Development)
  2. \n
  3. Multiple Node (Recommended)
  4. \n
\n\n

Single Node Setup

\n\n

This approach assumes you will use our default database (PostgreSQL) and run everything (PostgreSQL, PuppetDB, primary Puppet server) all on the same node. This setup will be great for a testing or experimental environment. In this case, your manifest will look like:

\n\n
node primary Puppet server {\n  # Configure puppetdb and its underlying database\n  class { 'puppetdb': }\n  # Configure the primary Puppet server to use puppetdb\n  class { 'puppetdb::config': }\n}\n
\n\n

You can provide some parameters for these classes if you’d like more control, but that is literally all that it will take to get you up and running with the default configuration.

\n\n

Multiple Node Setup

\n\n

This approach is for those who prefer not to install PuppetDB on the same node as the primary Puppet server. Your environment will be easier to scale if you are able to dedicate hardware to the individual system components. You may even choose to run the puppetdb server on a different node from the PostgreSQL database that it uses to store its data. So let’s have a look at what a manifest for that scenario might look like:

\n\n

This is an example of a very basic 3-node setup for PuppetDB.

\n\n

This node is our primary Puppet server:

\n\n
node puppet {\n  # Here we configure the primary Puppet server to use PuppetDB,\n  # and tell it that the hostname is ‘puppetdb’\n  class { 'puppetdb::config':\n    puppetdb_server => 'puppetdb',\n  }\n}\n
\n\n

This node is our postgres server:

\n\n
node puppetdb-postgres {\n  # Here we install and configure postgres and the puppetdb\n  # database instance, and tell postgres that it should\n  # listen for connections to the hostname ‘puppetdb-postgres’\n  class { 'puppetdb::database::postgresql':\n    listen_addresses => 'puppetdb-postgres',\n  }\n}\n
\n\n

This node is our main puppetdb server:

\n\n
node puppetdb {\n  # Here we install and configure PuppetDB, and tell it where to\n  # find the postgres database.\n  class { 'puppetdb::server':\n    database_host => 'puppetdb-postgres',\n  }\n}\n
\n\n

This should be all it takes to get a 3-node, distributed installation of PuppetDB up and running. Note that, if you prefer, you could easily move two of these classes to a single node and end up with a 2-node setup instead.

\n\n

Beginning with PuppetDB

\n\n

Whether you choose a single node development setup or a multi-node setup, a basic setup of PuppetDB will cause: PostgreSQL to install on the node if it’s not already there; PuppetDB postgres database instance and user account to be created; the postgres connection to be validated and, if successful, PuppetDB to be installed and configured; PuppetDB connection to be validated and, if successful, the primary Puppet server config files to be modified to use PuppetDB; and the primary Puppet server to be restarted so that it will pick up the config changes.

\n\n

If your logging level is set to INFO or finer, you should start seeing PuppetDB-related log messages appear in both your primary Puppet server log and your puppetdb log as subsequent agent runs occur.

\n\n

If you’d prefer to use PuppetDB’s embedded database rather than PostgreSQL, have a look at the database parameter on the puppetdb class:

\n\n
class { 'puppetdb':\n  database => 'embedded',\n}\n
\n\n

The embedded database can be useful for testing and very small production environments, but it is not recommended for production environments since it consumes a great deal of memory as your number of nodes increase.

\n\n

Cross-node Dependencies

\n\n

It is worth noting that there are some cross-node dependencies, which means that the first time you add the module's configurations to your manifests, you may see a few failed puppet runs on the affected nodes.

\n\n

PuppetDB handles cross-node dependencies by taking a sort of “eventual consistency†approach. There’s nothing that the module can do to control the order in which your nodes check in, but the module can check to verify that the services it depends on are up and running before it makes configuration changes--so that’s what it does.

\n\n

When your primary Puppet server node checks in, it will validate the connectivity to the puppetdb server before it applies its changes to the primary Puppet server config files. If it can’t connect to puppetdb, then the puppet run will fail and the previous config files will be left intact. This prevents your primary Puppet server from getting into a broken state where all incoming puppet runs fail because the primary Puppet server is configured to use a puppetdb server that doesn’t exist yet. The same strategy is used to handle the dependency between the puppetdb server and the postgres server.

\n\n

Hence the failed puppet runs. These failures should be limited to 1 failed run on the puppetdb node, and up to 2 failed runs on the primary Puppet server node. After that, all of the dependencies should be satisfied and your puppet runs should start to succeed again.

\n\n

You can also manually trigger puppet runs on the nodes in the correct order (Postgres, PuppetDB, primary Puppet server), which will avoid any failed runs.

\n\n

Upgrading

\n\n

Upgrading from 2.x to version 3.x

\n\n

For this release a major dependency has changed. The module pupppetlabs/postgresql must now be version 3.x. Upgrading the module should upgrade the puppetlabs/postgresql module for you, but if another module has a fixed dependency that module will have to be fixed before you can continue.

\n\n

Some other changes include:

\n\n
    \n
  • The parameter manage_redhat_firewall for the class puppetdb has now been removed completely in favor of open_postgres_port and open_ssl_listen_port.
  • \n
  • The parameter manage_redhat_firewall for the class puppetdb::database::postgresql, has now been renamed to manage_firewall.
  • \n
  • The parameter manage_redhat_firewall for the class puppetdb::server has now been removed completely in favor of open_listen_port and open_ssl_listen_port.
  • \n
  • The internal class: puppetdb::database::postgresql_db has been removed. If you were using this, it is now defunct.
  • \n
  • The class puppetdb::server::firewall has been marked as private, do not use it directly.
  • \n
  • The class puppetdb::server::jetty_ini and puppetdb::server::database_ini have been marked as private, do not use it directly.
  • \n
\n\n

Upgrading from 1.x to version 2.x

\n\n

A major dependency has been changed, so now when you upgrade to 2.0 the dependency cprice404/inifile has been replaced with puppetlabs/inifile. This may interfer with other modules as they may depend on the old cprice404/inifile instead, so upgrading should be done with caution. Check that your other modules use the newer puppetlabs/inifile module as interoperation with the old cprice404/inifile module will no longer be supported by this module.

\n\n

Depending on how you install your modules, changing the dependency may require manual intervention. Double check your modules contains the newer puppetlabs/inifile after installing this latest module.

\n\n

Otherwise, all existing parameters from 1.x should still work correctly.

\n\n

Usage

\n\n

PuppetDB supports a large number of configuration options for both configuring the puppetdb service and connecting that service to the primary Puppet server.

\n\n

puppetdb

\n\n

The puppetdb class is intended as a high-level abstraction (sort of an 'all-in-one' class) to help simplify the process of getting your puppetdb server up and running. It wraps the slightly-lower-level classes puppetdb::server and puppetdb::database::*, and it'll get you up and running with everything you need (including database setup and management) on the server side. For maximum configurability, you may choose not to use this class. You may prefer to use the puppetdb::server class directly, or manage your puppetdb setup on your own.

\n\n

You must declare the class to use it:

\n\n
class { 'puppetdb': }\n
\n\n

Parameters within puppetdb:

\n\n

listen_address

\n\n

The address that the web server should bind to for HTTP requests (defaults to localhost.'0.0.0.0' = all).

\n\n

listen_port

\n\n

The port on which the puppetdb web server should accept HTTP requests (defaults to '8080').

\n\n

open_listen_port

\n\n

If true, open the http_listen_port on the firewall (defaults to false).

\n\n

ssl_listen_address

\n\n

The address that the web server should bind to for HTTPS requests (defaults to $::clientcert). Set to '0.0.0.0' to listen on all addresses.

\n\n

ssl_listen_port

\n\n

The port on which the puppetdb web server should accept HTTPS requests (defaults to '8081').

\n\n

disable_ssl

\n\n

If true, the puppetdb web server will only serve HTTP and not HTTPS requests (defaults to false).

\n\n

open_ssl_listen_port

\n\n

If true, open the ssl_listen_port on the firewall (defaults to true).

\n\n

database

\n\n

Which database backend to use; legal values are postgres (default) or embedded. The embedded db can be used for very small installations or for testing, but is not recommended for use in production environments. For more info, see the puppetdb docs.

\n\n

database_port

\n\n

The port that the database server listens on (defaults to 5432; ignored for embedded db).

\n\n

database_username

\n\n

The name of the database user to connect as (defaults to puppetdb; ignored for embedded db).

\n\n

database_password

\n\n

The password for the database user (defaults to puppetdb; ignored for embedded db).

\n\n

database_name

\n\n

The name of the database instance to connect to (defaults to puppetdb; ignored for embedded db).

\n\n

database_ssl

\n\n

If true, puppetdb will use SSL to connect to the postgres database (defaults to false; ignored for embedded db).\nSetting up proper trust- and keystores has to be managed outside of the puppetdb module.

\n\n

node_ttl

\n\n

The length of time a node can go without receiving any new data before it's automatically deactivated. (defaults to '0', which disables auto-deactivation). This option is supported in PuppetDB >= 1.1.0.

\n\n

node_purge_ttl

\n\n

The length of time a node can be deactivated before it's deleted from the database. (defaults to '0', which disables purging). This option is supported in PuppetDB >= 1.2.0.

\n\n

report_ttl

\n\n

The length of time reports should be stored before being deleted. (defaults to '7d', which is a 7-day period). This option is supported in PuppetDB >= 1.1.0.

\n\n

gc_interval

\n\n

This controls how often, in minutes, to compact the database. The compaction process reclaims space and deletes unnecessary rows. If not supplied, the default is every 60 minutes. This option is supported in PuppetDB >= 0.9.

\n\n

log_slow_statements

\n\n

This sets the number of seconds before an SQL query is considered "slow." Slow SQL queries are logged as warnings, to assist in debugging and tuning. Note PuppetDB does not interrupt slow queries; it simply reports them after they complete.

\n\n

The default value is 10 seconds. A value of 0 will disable logging of slow queries. This option is supported in PuppetDB >= 1.1.

\n\n

conn_max_age

\n\n

The maximum time (in minutes), for a pooled connection to remain unused before it is closed off.

\n\n

If not supplied, we default to 60 minutes. This option is supported in PuppetDB >= 1.1.

\n\n

conn_keep_alive

\n\n

This sets the time (in minutes), for a connection to remain idle before sending a test query to the DB. This is useful to prevent a DB from timing out connections on its end.

\n\n

If not supplied, we default to 45 minutes. This option is supported in PuppetDB >= 1.1.

\n\n

conn_lifetime

\n\n

The maximum time (in minutes) a pooled connection should remain open. Any connections older than this setting will be closed off. Connections currently in use will not be affected until they are returned to the pool.

\n\n

If not supplied, we won't terminate connections based on their age alone. This option is supported in PuppetDB >= 1.4.

\n\n

puppetdb_package

\n\n

The puppetdb package name in the package manager.

\n\n

puppetdb_version

\n\n

The version of the puppetdb package that should be installed. You may specify an explicit version number, 'present', or 'latest' (defaults to 'present').

\n\n

puppetdb_service

\n\n

The name of the puppetdb service.

\n\n

puppetdb_service_status

\n\n

Sets whether the service should be running or stopped. When set to stopped the service doesn't start on boot either. Valid values are 'true', 'running', 'false', and 'stopped'.

\n\n

confdir

\n\n

The puppetdb configuration directory (defaults to /etc/puppetdb/conf.d).

\n\n

java_args

\n\n

Java VM options used for overriding default Java VM options specified in PuppetDB package (defaults to {}). See PuppetDB Configuration to get more details about the current defaults.

\n\n

Example: to set -Xmx512m -Xms256m options use { '-Xmx' => '512m', '-Xms' => '256m' }

\n\n

puppetdb:server

\n\n

The puppetdb::server class manages the puppetdb server independently of the underlying database that it depends on. It will manage the puppetdb package, service, config files, etc., but will still allow you to manage the database (e.g. postgresql) however you see fit.

\n\n
class { 'puppetdb::server':\n  database_host => 'puppetdb-postgres',\n}\n
\n\n

Parameters within puppetdb::server:

\n\n

Uses the same parameters as puppetdb, with one addition:

\n\n

database_host

\n\n

The hostname or IP address of the database server (defaults to localhost; ignored for embedded db).

\n\n

puppetdb::config

\n\n

The puppetdb::config class directs your primary Puppet server to use PuppetDB, which means that this class should be used on your primary Puppet server node. It’ll verify that it can successfully communicate with your puppetdb server, and then configure your primary Puppet server to use PuppetDB.

\n\n

Using this class involves allowing the module to manipulate your puppet configuration files; in particular: puppet.conf and routes.yaml. The puppet.conf changes are supplemental and should not affect any of your existing settings, but the routes.yaml file will be overwritten entirely. If you have an existing routes.yaml file, you will want to take care to use the manage_routes parameter of this class to prevent the module from managing that file, and you’ll need to manage it yourself.

\n\n
class { 'puppetdb::config':\n  puppetdb_server => 'my.host.name',\n  puppetdb_port   => 8081,\n}\n
\n\n

Parameters within puppetdb::config:

\n\n

puppetdb_server

\n\n

The dns name or ip of the puppetdb server (defaults to the certname of the current node).

\n\n

puppetdb_port

\n\n

The port that the puppetdb server is running on (defaults to 8081).

\n\n

puppetdb_soft_write_failure

\n\n

Boolean to fail in a soft-manner if PuppetDB is not accessable for command submission (defaults to false).

\n\n

manage_routes

\n\n

If true, the module will overwrite the primary Puppet server's routes file to configure it to use PuppetDB (defaults to true).

\n\n

manage_storeconfigs

\n\n

If true, the module will manage the primary Puppet server's storeconfig settings (defaults to true).

\n\n

manage_report_processor

\n\n

If true, the module will manage the 'reports' field in the puppet.conf file to enable or disable the puppetdb report processor. Defaults to 'false'.

\n\n

manage_config

\n\n

If true, the module will store values from puppetdb_server and puppetdb_port parameters in the puppetdb configuration file.\nIf false, an existing puppetdb configuration file will be used to retrieve server and port values.

\n\n

strict_validation

\n\n

If true, the module will fail if puppetdb is not reachable, otherwise it will preconfigure puppetdb without checking.

\n\n

enable_reports

\n\n

Ignored unless manage_report_processor is true, in which case this setting will determine whether or not the puppetdb report processor is enabled (true) or disabled (false) in the puppet.conf file.

\n\n

puppet_confdir

\n\n

Puppet's config directory (defaults to /etc/puppet).

\n\n

puppet_conf

\n\n

Puppet's config file (defaults to /etc/puppet/puppet.conf).

\n\n

puppetdb_version

\n\n

The version of the puppetdb package that should be installed. You may specify an explicit version number, 'present', or 'latest' (defaults to 'present').

\n\n

terminus_package

\n\n

Name of the package to use that represents the PuppetDB terminus code.

\n\n

puppet_service_name

\n\n

Name of the service that represents Puppet. You can change this to apache2 or httpd depending on your operating system, if you plan on having Puppet run using Apache/Passenger for example.

\n\n

puppetdb_startup_timeout

\n\n

The maximum amount of time that the module should wait for PuppetDB to start up. This is most important during the initial install of PuppetDB (defaults to 15 seconds).

\n\n

restart_puppet

\n\n

If true, the module will restart the primary Puppet server when PuppetDB configuration files are changed by the module. The default is 'true'. If set to 'false', you must restart the service manually in order to pick up changes to the config files (other than puppet.conf).

\n\n

puppetdb::database::postgresql

\n\n

The puppetdb::database::postgresql class manages a postgresql server for use by PuppetDB. It can manage the postgresql packages and service, as well as creating and managing the puppetdb database and database user accounts.

\n\n
class { 'puppetdb::database::postgresql':\n  listen_addresses => 'my.postgres.host.name',\n}\n
\n\n

listen_addresses

\n\n

The listen_address is a comma-separated list of hostnames or IP addresses on which the postgres server should listen for incoming connections. This defaults to localhost. This parameter maps directly to postgresql's listen_addresses config option; use a * to allow connections on any accessible address.

\n\n

manage_firewall

\n\n

If set to true this will enable open the local firewall for PostgreSQL protocol access. Defaults to false.

\n\n

database_name

\n\n

Sets the name of the database. Defaults to puppetdb.

\n\n

database_username

\n\n

Creates a user for access the database. Defaults to puppetdb.

\n\n

database_password

\n\n

Sets the password for the database user above. Defaults to puppetdb.

\n\n

Implementation

\n\n

Resource overview

\n\n

In addition to the classes and variables mentioned above, PuppetDB includes:

\n\n

puppetdb::routes

\n\n

Configures the primary Puppet server to use PuppetDB as the facts terminus. WARNING: the current implementation simply overwrites your routes.yaml file; if you have an existing routes.yaml file that you are using for other purposes, you should not use this.

\n\n
class { 'puppetdb::routes':\n  puppet_confdir => '/etc/puppet'\n}\n
\n\n

puppetdb::storeconfigs

\n\n

Configures the primary Puppet server to enable storeconfigs and to use PuppetDB as the storeconfigs backend.

\n\n
class { 'puppetdb::storeconfigs':\n  puppet_conf => '/etc/puppet/puppet.conf'\n}\n
\n\n

puppetdb::server::validate_db

\n\n

Validates that a successful database connection can be established between the node on which this resource is run and the specified puppetdb database instance (host/port/user/password/database name).

\n\n
puppetdb::server::validate_db { 'validate my puppetdb database connection':\n  database_host     => 'my.postgres.host',\n  database_username => 'mydbuser',\n  database_password => 'mydbpassword',\n  database_name     => 'mydbname',\n}\n
\n\n

Custom Types

\n\n

puppetdb_conn_validator

\n\n

Verifies that a connection can be successfully established between a node and the puppetdb server. Its primary use is as a precondition to prevent configuration changes from being applied if the puppetdb server cannot be reached, but it could potentially be used for other purposes such as monitoring.

\n\n

Limitations

\n\n

Currently, PuppetDB is compatible with:

\n\n
Puppet Version: 2.7+\n
\n\n

Platforms:

\n\n
    \n
  • RHEL6
  • \n
  • Debian6
  • \n
  • Ubuntu 10.04
  • \n
  • Archlinux
  • \n
\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": "
## puppetlabs-puppetdb changelog\n\nRelease notes for the puppetlabs-puppetdb module.\n\n------------------------------------------\n\n#### 3.0.0 - 2013/10/27\n\nThis major release changes the main dependency for the postgresql module from\nversion 2.5.x to 3.x. Since the postgresql module is not backwards compatible,\nthis release is also not backwards compatible. As a consequence we have taken\nsome steps to deprecate some of the older functionality:\n\n* The parameter manage_redhat_firewall for the class puppetdb has now been removed completely in favor of open_postgres_port and open_ssl_listen_port.\n* The parameter manage_redhat_firewall for the class puppetdb::database::postgresql, has now been renamed to manage_firewall.\n* The parameter manage_redhat_firewall for the class puppetdb::server has now been removed completely in favor of open_listen_port and open_ssl_listen_port.\n* The internal class: puppetdb::database::postgresql_db has been removed. If you were using this, it is now defunct.\n* The class puppetdb::server::firewall has been marked as private, do not use it directly.\n* The class puppetdb::server::jetty_ini and puppetdb::server::database_ini have been marked as private, do not use it directly.\n\nAll of this is documented in the upgrade portion of the README.\n\nAdditionally some features have been included in this release as well:\n\n* soft_write_failure can now be enabled in your puppetdb.conf with this\n  module to handle failing silently when your PuppetDB is not available\n  during writes.\n* There is a new switch to enable SSL connectivity to PostgreSQL. While this\n  functionality is only in its infancy this is a good start.\n\nDetailed Changes:\n\n* FM-103: Add metadata.json to all modules. (Ashley Penney)\n* Add soft_write_failure to puppetdb.conf (Garrett Honeycutt)\n* Add switch to configure database SSL connection (Stefan Dietrich)\n* (GH-91) Update to use rspec-system-puppet 2.x (Ken Barber)\n* (GH-93) Switch to using puppetlabs-postgresql 3.x (Ken Barber)\n* Fix copyright and project notice (Ken Barber)\n* Adjust memory for PuppetDB tests to avoid OOM killer (Ken Barber)\n* Ensure ntpdate executes early during testing (Ken Barber)\n\n------------------------------------------\n\n#### 2.0.0 - 2013/10/04\n\nThis major release changes the main dependency for the inifile module from\nthe deprecated `cprice404/inifile` to `puppetlabs/inifile` to remove\ndeprecation warnings and to move onto the latest and greatest implementation\nof that code.\n\nIts a major release, because it may affect other dependencies since modules\ncannot have overlapping second part dependencies (that is inifile cannot be from\ntwo different locations).\n\nIt also adds the parameter `puppetdb_service_status` to the class `puppetdb` to\nallow users to specify whether the module manages the puppetdb service for you.\n\nThe `database_password` parameter is now optional, and initial Arch Linux\nsupport has been added.\n\nDetailed Changes:\n\n* (GH-73) Switch to puppetlabs/inifile from cprice/inifile (Ken Barber)\n* Make database_password an optional parameter (Nick Lewis)\n* add archlinux support (Niels Abspoel)\n* Added puppetdb service control (Akos Hencz)\n\n------------------------------------------\n\n#### 1.6.0 - 2013/08/07\n\nThis minor feature release provides extra parameters for new configuration\nitems available in PuppetDB 1.4, and also provides some older parameters\nthat were missed previously:\n\n* gc_interval\n* log_slow_statements\n* conn_max_age\n* conn_keep_alive\n* conn_lifetime\n\nConsult the README.md file, or the PuppetDB documentation for more details.\n\n------------------------------------------\n\n#### 1.5.0 - 2013/07/18\n\nThis minor feature release provides the following new functionality:\n\n* The module is now capable of managing PuppetDB on SUSE systems\n  for which PuppetDB packages are available\n* The ruby code for validating the PuppetDB connection now\n  supports validating on a non-SSL HTTP port.\n\n------------------------------------------\n\n#### 1.4.0 - 2013/05/13\n\nThis feature release provides support for managing the puppetdb report\nprocessor on your primary Puppet server.\n\nTo enable the report processor, you can do something like this:\n\n    class { 'puppetdb::config':\n        manage_report_processor => true,\n        enable_reports => true\n    }\n\nThis will add the 'puppetdb' report processor to the list of `reports`\ninside your primary Puppet server's `puppet.conf` file.\n\n------------------------------------------\n\n#### 1.3.0 - 2013/05/13\n\nThis feature release provides us with a few new features for the PuppetDB\nmodule.\n\nYou can now disable SSL when using the `puppetdb` class by using the new\nparameter `disable_ssl`:\n\n    class { 'puppetdb':\n      disable_ssl => true,\n    }\n\nThis will remove the SSL settings from your `jetty.ini` configuration file\ndisabling any SSL communication. This is useful when you want to offload SSL\nto another web server, such as Apache or Nginx.\n\nWe have now added an option `java_args` for passing in Java options to\nPuppetDB. The format is a hash that is passed in when declaring the use of the\n`puppetdb` class:\n\n    class { 'puppetdb':\n      java_args => {\n        '-Xmx' => '512m',\n        '-Xms' => '256m',\n      }\n    }\n\nAlso, the default `report-ttl` was set to `14d` in PuppetDB to align it with an\nupcoming PE release, so we've also reflected that default here now.\n\nAnd finally we've fixed the issue whereby the options `report_ttl`, `node_ttl`,\n`node_purge_ttl` and `gc_interval` were not making the correct changes. On top\nof that you can now set these values to zero in the module, and the correct\ntime modifier (`s`, `m`, `h` etc.) will automatically get applied for you.\n\nBehind the scenes we've also added system and unit testing, which was\npreviously non-existent. This should help us reduce regression going forward.\n\nThanks to all the contributing developers in the list below that made this\nrelease possible :-).\n\n#### Changes\n\n* Allows for 0 _ttl's without time signifier and enables tests (Garrett Honeycutt)\n* Add option to disable SSL in Jetty, including tests and documentation (Christian Berg)\n* Cleaned up ghoneycutt's code a tad (Ken Barber)\n* the new settings report_ttl, node_ttl and node_purge_ttl were added but they are not working, this fixes it (fsalum)\n* Also fix gc_interval (Ken Barber)\n* Support for remote puppetdb (Filip Hrbek)\n* Added support for Java VM options (Karel Brezina)\n* Add initial rspec-system tests and scaffolding (Ken Barber)\n\n------------------------------------------\n\n#### 1.2.1 - 2013/04/08\n\nThis is a minor bugfix that solves the PuppetDB startup exception:\n\n    java.lang.AssertionError: Assert failed: (string? s)\n\nThis was due to the default `node-ttl` and `node-purge-ttl` settings not having a time suffix by default. These settings required 's', 'm', 'd' etc. to be suffixed, even if they are zero.\n\n#### Changes\n\n* (Ken Barber) Add 's' suffix to period settings to avoid exceptions in PuppetDB\n\n------------------------------------------\n\n#### 1.2.0 - 2013/04/05\n\nThis release is primarily about providing full configuration file support in the module for PuppetDB 1.2.0. (The alignment of version is a coincidence I assure you :-).\n\nThis feature release adds the following new configuration parameters to the main `puppetdb` class:\n\n* node_ttl\n* node_purge_ttl (available in >=1.2.0)\n* report_ttl\n\nConsult the README for futher details about these new configurable items.\n\n##### Changes\n\n* (Nick Lewis) Add params and ini settings for node/purge/report ttls and document them\n\n------------------------------------------\n\n1.1.5\n=====\n\n2013-02-13 - Karel Brezina\n * Fix database creation so database_username, database_password and\n   database_name are correctly passed during database creation.\n\n2013-01-29 - Lauren Rother\n * Change README to conform to new style and various other README improvements\n\n2013-01-17 - Chris Price\n * Improve documentation in init.pp\n\n------------------------------------------\n\n1.1.4\n=====\n\nThis is a bugfix release, mostly around fixing backward-compatibility for the\ndeprecated `manage_redhat_firewall` parameter.  It wasn't actually entirely\nbackwards-compatible in the 1.1.3 release.\n\n2013-01-17 - Chris Price <chris@puppetlabs.com>\n * Fix backward compatibility of `manage_redhat_firewall` parameter (de20b44)\n\n2013-01-16 - Chris Price <chris@puppetlabs.com>\n * Fix deprecation warnings around manage_redhat_firewall (448f8bc)\n\n------------------------------------------\n\n1.1.3\n=====\n\nThis is mostly a maintenance release, to update the module dependencies to newer\nversions in preparation for some new features.  This release does include some nice\nadditions around the ability to set the listen address for the HTTP port on Jetty\nand manage the firewall for that port.  Thanks very much to Drew Blessing for those\nsubmissions!\n\n2013-01-15 - Chris Price <chris@puppetlabs.com>\n * Update Modulefile for 1.1.3 release (updates dependencies\n   on postgres and inifile modules to the latest versions) (76bfd9e)\n\n2012-12-19 - Garrett Honeycutt <garrett@puppetlabs.com>\n * (#18228) updates README for style (fd2e990)\n\n2012-11-29 - Drew Blessing <Drew.Blessing@Buckle.com>\n * 17594 - Fixes suggested by cprice-puppet (0cf9632)\n\n2012-11-14 - Drew Blessing <Drew.Blessing@Buckle.com>\n * Adjust examples in tests to include new port params (0afc276)\n\n2012-11-13 - Drew Blessing <Drew.Blessing@Buckle.com>\n * 17594 - PuppetDB - Add ability to set standard host listen address and open firewall\n\n------------------------------------------\n\n1.1.2\n=====\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.2)\n * 1.1.2 release\n\n2012-10-26 - Chris Price <chris@puppetlabs.com>\n * Add some more missing `inherit`s for `puppetdb::params` (a72cc7c)\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.2)\n * 1.1.1 release\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.1)\n * Add missing `inherit` for `puppetdb::params` (ea9b379)\n\n2012-10-24 - Chris Price <chris@puppetlabs.com>\n * 1.1.0 release\n\n2012-10-24 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update postgres dependency to puppetlabs/postgresql (bea79b4)\n\n2012-10-17 - Reid Vandewiele <reid@puppetlabs.com> (1.1.0)\n * Fix embedded db setup in Puppet Enterprise (bf0ab45)\n\n2012-10-17 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update manifests/main/config.pp (b119a30)\n\n2012-10-16 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Make puppetdb startup timeout configurable (783b595)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add condition to detect PE installations and provide different parameters (63f1c52)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add example manifest code for pe primary Puppet server (a598edc)\n\n2012-10-01 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update comments and docs w/rt PE params (b5df5d9)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Adding pe_puppetdb tests class (850e039)\n\n2012-09-28 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add parameters to enable usage of enterprise versions of PuppetDB (df6f7cc)\n\n2012-09-23 - Chris Price <chris@puppetlabs.com>\n * 1.0.3 release\n\n2012-09-23 - Chris Price <chris@puppetlabs.com>\n * Add a parameter for restarting primary Puppet server (179b337)\n\n2012-09-21 - Chris Price <chris@puppetlabs.com>\n * 1.0.2 release\n\n2012-09-21 - Chris Price <chris@puppetlabs.com>\n * Pass 'manage_redhat_firewall' param through to postgres (f21740b)\n\n2012-09-20 - Chris Price <chris@puppetlabs.com>\n * 1.0.1 release\n\n2012-09-20 - Garrett Honeycutt <garrett@puppetlabs.com>\n * complies with style guide (1aab5d9)\n\n2012-09-19 - Chris Price <chris@puppetlabs.com>\n * Fix invalid subname in database.ini (be683b7)\n\n2011-09-18 Chris Price <chris@puppetlabs.com> - 1.0.0\n* Initial 1.0.0 release\n
", "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-10-29 13:14:09 -0700", "updated_at": "2013-10-29 13:14:09 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-puppetdb-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.6.0", "version": "1.6.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.5.0", "version": "1.5.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.4.0", "version": "1.4.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.2.1", "version": "1.2.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.5", "version": "1.1.5" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.4", "version": "1.1.4" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.3", "version": "1.1.3" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.2", "version": "1.1.2" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.1", "version": "1.1.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.3", "version": "1.0.3" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.2", "version": "1.0.2" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-puppetdb.git", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-ruby", "name": "ruby", "downloads": 29188, "created_at": "2010-05-20 22:45:54 -0700", "updated_at": "2014-01-06 14:24:16 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-ruby-0.1.0", "module": { "uri": "/v3/modules/puppetlabs-ruby", "name": "ruby", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.0", "metadata": { "name": "puppetlabs-ruby", "version": "0.1.0", "summary": "Puppet Labs Ruby Module", "source": "https://github.com/puppetlabs/puppetlabs-ruby", "project_page": "https://github.com/puppetlabs/puppetlabs-ruby", "author": "Puppet Labs", "license": "Apache License 2.0", "operatingsystem_support": [ "RedHat", "OpenSUSE", "SLES", "SLED", "Debian", "Ubuntu" ], "puppet_version": [ 2.7, 3.0, 3.1, 3.2, 3.3 ], "description": "Ruby Module for Puppet", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "2eb56073328fd920b96b388d95c73473", "Gemfile": "19e0d6f8d04c49bdf6b633a2758c9204", "Gemfile.lock": "f4391024d9564fc7b9475743007aeae3", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "eaed4b7018419f7385c58567216a5cbd", "README.md": "fa51ccf53fb061ea8119e23cf717d663", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/facter/gemhome.rb": "a9eeb4dda783c97f89c37541af28afb7", "manifests/dev.pp": "ee5276a5772eee8c68204c4463842f03", "manifests/init.pp": "cea631d674f6ee5ca36752cc7d35ae2d", "manifests/params.pp": "b89d96c85b942d8f4d4447d597519c2b", "spec/classes/ruby_spec.rb": "ffcf18046ac223aad3f1bdc09422caf6", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "tests/dev.pp": "4d74853324ca33cc13995f7819948f83", "tests/init.pp": "c3c821d5d8b70fcc6ecbd0b15ed53109", "tests/params.pp": "624af9411bd668264baef475bcc9e54b" } }, "tags": [ "ruby" ], "file_uri": "/v3/files/puppetlabs-ruby-0.1.0.tar.gz", "file_size": 4888, "file_md5": "9bc92c6474e6fddb4e7a0ff747fb3b7d", "downloads": 6724, "readme": "

Ruby Module

\n\n

This module manages Ruby and Rubygems on Debian and Redhat based systems.

\n\n

Parameters

\n\n
    \n
  • version: (default installed) -\nSet the version of Ruby to install

  • \n
  • gems_version: (default installed) -\nSet the version of Rubygems to be installed

  • \n
  • rubygems_update: (default true) -\nIf set to true, the module will ensure that the rubygems package is installed\nbut will use rubygems-update (same as gem update --system but versionable) to\nupdate Rubygems to the version defined in $gems_version. If set to false then\nthe rubygems package resource will be versioned from $gems_version

  • \n
  • ruby_package: (default ruby) -\nSet the package name for ruby

  • \n
  • rubygems_package: (default rubygems) -\nSet the package name for rubygems

  • \n
\n\n

Usage

\n\n

For a standard install using the latest Rubygems provided by rubygems-update on\nCentOS or Redhat use:

\n\n
class { 'ruby':\n  gems_version  => 'latest'\n}\n
\n\n

On Redhat this is equivilant to

\n\n
$ yum install ruby rubygems\n$ gem update --system\n
\n\n

To install a specific version of ruby and rubygems but not use\nrubygems-update use:

\n\n
class { 'ruby':\n  version         => '1.8.7',\n  gems_version    => '1.8.24',\n  rubygems_update => false\n}\n
\n\n

On Redhat this is equivilant to

\n\n
$ yum install ruby-1.8.7 rubygems-1.8.24\n
\n\n

If you need to use different packages for either ruby or rubygems you\ncan. This could be for different versions or custom packages. For\ninstance the following installs ruby 1.9 on Ubuntu 12.04.

\n\n
class { 'ruby':\n  ruby_package     => 'ruby1.9.1-full',\n  rubygems_package => 'rubygems1.9.1',\n  gems_version     => 'latest',\n}\n
\n
", "changelog": "
2013-10-08 - Version 0.1.0\n\nSummary:\n\nRelease an updated version of this. Highlights include OpenSUSE and general\nspring cleaning done by our wonderful community members!\n\nFeatures:\n- OpenSUSE support\n- Allow `rubygems_package` override.\n- Add gemhome fact.\n- Add ri package.\n\nFixes:\n- Lint fixes.\n- Remove virtual irb package.\n- Update dev packages for Ubuntu/Debian\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-10-08 13:01:22 -0700", "updated_at": "2013-10-08 13:01:22 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-ruby-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-ruby-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-ruby-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-ruby", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-nodejs", "name": "nodejs", "downloads": 28365, "created_at": "2012-05-01 06:38:03 -0700", "updated_at": "2014-01-06 14:19:50 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-nodejs-0.4.0", "module": { "uri": "/v3/modules/puppetlabs-nodejs", "name": "nodejs", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.0", "metadata": { "name": "puppetlabs-nodejs", "version": "0.4.0", "source": "git://github.com/puppetlabs/puppetlabs-nodejs", "author": "Puppet Labs", "license": "Apache 2.0", "summary": "Nodejs & NPM Puppet Module", "description": "Nodejs & NPM Puppet Module.", "project_page": "https://github.com/puppetlabs/puppetlabs-nodejs", "dependencies": [ { "name": "puppetlabs/apt", "version_requirement": ">= 0.0.3" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.0.0" } ], "types": [ ], "checksums": { "CHANGELOG": "7955a904dbe650f532e271ec8566a9e9", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "f6d07e6b82e6c5f0d10b0d8017d86e4a", "README.md": "db4e5ffa9aaa9e6d7d2594c2475e7e47", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/puppet/provider/package/npm.rb": "14e5a15858244609b0d71469d586a5ba", "manifests/init.pp": "697f5262ce210efa6fc3b8fb1c998553", "manifests/npm.pp": "0f3119aa5166655b62b5b9ffaa386182", "manifests/params.pp": "7a41985705a36dfdc4346239747a5ae7", "spec/classes/nodejs_spec.rb": "9599dc4af20bad5c793e125572fc60e8", "spec/fixtures/unit/puppet/provider/pakages/npm/npm_global": "b978830ded964a9000c961528dfd6ef1", "spec/puppetlabs_spec/files.rb": "5f7d2da815b3545f1e3347fac84a36c8", "spec/puppetlabs_spec/fixtures.rb": "795629c4bcad28bf3bb91ff6e5ce97b1", "spec/puppetlabs_spec/matchers.rb": "8e77dc7317de7fc2ff289fb716623b6c", "spec/puppetlabs_spec_helper.rb": "b8e2c657fb91ba7129e679d133169986", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/unit/puppet/provider/pakages/npm_spec.rb": "3c3eebfb16c72d6015416b32fd328338", "tests/init.pp": "575b1a56d1cbce7c4fb2142b4fabc36a", "tests/npm.pp": "eecedf53999fd2f11b25bd34a543c5d6" } }, "tags": [ "debian", "nodejs", "ubuntu", "npm" ], "file_uri": "/v3/files/puppetlabs-nodejs-0.4.0.tar.gz", "file_size": 10243, "file_md5": "4f23875723b6fc070e516b2132367efc", "downloads": 9765, "readme": "

puppet-nodejs module

\n\n

Overview

\n\n

Install nodejs package and npm package provider for Debian, Ubuntu, Fedora, and RedHat.

\n\n

Usage

\n\n

class nodejs

\n\n

Installs nodejs and npm per nodejs documentation.

\n\n
    \n
  • dev_package: whether to install optional dev packages. dev packages not available on all platforms, default: false.
  • \n
\n\n

Example:

\n\n
include nodejs\n
\n\n

You may want to use apt::pin to pin package installation priority on sqeeze. See puppetlabs-apt for more information.

\n\n
apt::pin { 'sid': priority => 100 }\n
\n\n

npm package

\n\n

Two types of npm packages are supported.

\n\n
    \n
  • npm global packages are supported via ruby provider for puppet package type.
  • \n
  • npm local packages are supported via puppet define type nodejs::npm.
  • \n
\n\n

For more information regarding global vs. local installation see nodejs blog

\n\n

package

\n\n

npm package provider is an extension of puppet package type which supports versionable and upgradeable. The package provider only handles global installation:

\n\n

Example:

\n\n
package { 'express':\n  ensure   => latest,\n  provider => 'npm',\n}\n\npackage { 'mime':\n  ensure   => '1.2.4',\n  provider => 'npm',\n}\n
\n\n

nodejs::npm

\n\n

nodejs::npm is suitable for local installation of npm packages:

\n\n
nodejs::npm { '/opt/razor:express':\n  ensure  => present,\n  version => '2.5.9',\n}\n
\n\n

nodejs::npm title consists of filepath and package name seperate via ':', and support the following attributes:

\n\n
    \n
  • ensure: present, absent.
  • \n
  • version: package version (optional).
  • \n
  • source: package source (optional).
  • \n
  • install_opt: option flags invoked during installation such as --link (optional).
  • \n
  • remove_opt: option flags invoked during removal (optional).
  • \n
\n\n

Supported Platforms

\n\n

The module have been tested on the following operating systems. Testing and patches for other platforms are welcomed.

\n\n
    \n
  • Debian Wheezy.
  • \n
  • RedHat EL5.
  • \n
\n
", "changelog": null, "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-08-29 09:00:53 -0700", "updated_at": "2013-08-29 09:00:53 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-nodejs-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.1.0", "version": "0.1.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-nodejs", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-java", "name": "java", "downloads": 26816, "created_at": "2011-05-25 23:33:22 -0700", "updated_at": "2014-01-06 14:37:21 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-java-1.0.1", "module": { "uri": "/v3/modules/puppetlabs-java", "name": "java", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.1", "metadata": { "name": "puppetlabs-java", "version": "1.0.1", "source": "git://github.com/puppetlabs/puppetlabs-java", "author": "puppetlabs", "license": "Apache", "summary": "Manage the official Java runtime", "description": "Manage the official Java runtime", "project_page": "https://github.com/puppetlabs/puppetlabs-java", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 0.1.6" } ], "types": [ ], "checksums": { "CHANGELOG": "1aa60de915896b859621be4d46e0f5b7", "Gemfile": "f98e8d931aa0824e21bf184ef0379d01", "Gemfile.lock": "6368f283786fab8823ee646361eaa6ba", "LICENSE": "927881786db06d253bfed0ecf1b42b21", "Modulefile": "6b756d1301e0503d6c718ccffb1d2525", "README.markdown": "d5821001972761ee2b5091676bab6c7a", "Rakefile": "c6a91ef43608c5d4b22bc7e50a94d6a5", "manifests/config.pp": "c7fb36d4ebed20342fbb69369b4dbd0e", "manifests/init.pp": "500f2b08b4c672b650f30fe879d60fec", "manifests/params.pp": "25a266f6009595eab396721bc9b5b546", "spec/classes/java_spec.rb": "52be772dfe3eeb7a71c2223cec6f88ad", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "tests/init.pp": "91a343f9a46d8122c30df67c3d143508" } }, "tags": [ "java", "puppetlabs", "stdlib", "runtime", "jdk", "jre" ], "file_uri": "/v3/files/puppetlabs-java-1.0.1.tar.gz", "file_size": 5733, "file_md5": "62a7f17679f96460f4e81cfca458552a", "downloads": 15597, "readme": "

Java

\n\n

Manage the Java runtime for use with other application software.

\n\n

Currently this deploys the correct Java package on a variety of platforms.

\n
", "changelog": "
1.0.1 (2013-08-01)\n\nMatthaus Owens <matthaus@puppetlabs.com>\n* Update java packages for Fedora systems\n\n1.0.0 (2013-07-29)\n\nKrzysztof Suszyński <krzysztof.suszynski@coi.gov.pl>\n* Adding support for Oracle Enterprise Linux\n\nPeter Drake <pdrake@allplayers.com>\n* Add support for natty\n\nRobert Munteanu <rmuntean@adobe.com>\n* Add support for OpenSUSE\n\nMartin Jackson <martin@uncommonsense-uk.com>\n* Added support Amazon Linux using facter >= 1.7.x\n\nGareth Rushgrove <gareth@morethanseven.net>\nBrett Porter <brett@apache.org>\n* Fixes for older versions of CentOS\n* Improvements to module build and tests\n\nNathan R Valentine <nrvale0@gmail.com>\n* Add support for Ubuntu quantal and raring\n\nSharif Nassar <sharif@mediatemple.net>\n* Add support for Debian alternatives, and more than one JDK/JRE per platform.\n\n2013-04-04 Reid Vandewiele <reid@puppetlabs.com> - 0.3.0\n* Refactor, introduce params pattern\n\n2012-11-15 Scott Schneider <sschneider@puppetlabs.com> - 0.2.0\n* Add Solaris support\n\n2011-06-16 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add Debian based distro (Lucid) support\n\n2011-06-02 Jeff McCune <jeff@puppetlabs.com> - 0.1.4\n* Fix class composition ordering problems\n\n2011-05-28 Jeff McCune <jeff@puppetlabs.com> - 0.1.3\n* Remove stages\n\n2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2\n* Changes JRE/JDK selection class parameter to $distribution\n\n2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1\n* Re-did versioning to follow semantic versioning\n\n2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 1.0.1\n* Add validation of class parameters\n\n2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 1.0.0\n* Default to JDK version 6u25\n\n2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1\n* Initial release\n
", "license": "
Puppet Java Module - Puppet module for managing Java\n\nCopyright (C) 2011 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-08-01 15:29:02 -0700", "updated_at": "2013-08-01 15:29:02 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-java-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-java-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-java-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-java-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-java-0.1.6", "version": "0.1.6" }, { "uri": "/v3/releases/puppetlabs-java-0.1.5", "version": "0.1.5" }, { "uri": "/v3/releases/puppetlabs-java-0.1.4", "version": "0.1.4" }, { "uri": "/v3/releases/puppetlabs-java-0.1.3", "version": "0.1.3" }, { "uri": "/v3/releases/puppetlabs-java-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-java-0.1.1", "version": "0.1.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-java", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-mongodb", "name": "mongodb", "downloads": 23281, "created_at": "2012-05-03 00:45:07 -0700", "updated_at": "2014-01-06 13:45:06 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-mongodb-0.4.0", "module": { "uri": "/v3/modules/puppetlabs-mongodb", "name": "mongodb", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.0", "metadata": { "name": "puppetlabs-mongodb", "version": "0.4.0", "source": "git@github.com:puppetlabs/puppetlabs-mongodb.git", "author": "puppetlabs", "license": "Apache License Version 2.0", "summary": "mongodb puppet module", "description": "10gen mongodb puppet module", "project_page": "https://github.com/puppetlabs/puppetlabs-mongodb", "dependencies": [ { "name": "puppetlabs/apt", "version_requirement": ">= 1.0.0" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.0" } ], "types": [ ], "checksums": { "CHANGELOG": "5f66955b867f38eabe036af074810f40", "Gemfile": "9ed4e2f4cfc1722bf8983483cb7e40d3", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "50f5e144476dd1aedd9f049d0dc5b3d6", "README.md": "07fe7973016520c422d306156d8062d5", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/globals.pp": "600d8923fc55a6daaeb8832e558d479c", "manifests/init.pp": "53eea67456b249bb6259963e5256a7ce", "manifests/params.pp": "0c62018db94ecfcd82264a7ed92a5ba9", "manifests/repo/apt.pp": "3a6235c6e1b83b4ba41e52cbfdc6ba31", "manifests/repo/yum.pp": "0aa5725de002581554b2050e9a1e0656", "manifests/repo.pp": "23b342a75ec156eb9118b07a47086563", "manifests/server/config.pp": "78b62b9aa3759682c4a4f0bf70ef3fed", "manifests/server/install.pp": "95ba8e7a1227163d45427338407b25df", "manifests/server/service.pp": "c79706e48c0635ba72f47a7edef697d3", "manifests/server.pp": "671f2a0739b835cc31dda845fc3bfd97", "spec/classes/repo_spec.rb": "c0ffab073e47ec187d43e2d0ec9762e8", "spec/classes/server_config_spec.rb": "139e54f5646af132aa96da5e683397f8", "spec/classes/server_install_spec.rb": "1e19688c0e2a59c2dedb8116b94eae1a", "spec/classes/server_spec.rb": "e41eafd9f4d458d7730f21ee20849fe5", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "0e2c886ed3570f4491401a0ceccdf762", "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6", "spec/system/server_10gen_spec.rb": "e6eca5c8001740d20c4611debb99ca35", "spec/system/server_distro_spec.rb": "b051637d82059a884fd2056e0a876989", "templates/mongodb.conf.erb": "446e9521a48df24e787c47603bff9a10", "tests/globals.pp": "1b274b3a5fe7d2347f2f70f285dd7518", "tests/init.pp": "9a09da130383dc0c05eded5ef0744876", "tests/server.pp": "0b47cb9016186fda7c0dc3a66d03d667" } }, "tags": [ "mongodb" ], "file_uri": "/v3/files/puppetlabs-mongodb-0.4.0.tar.gz", "file_size": 14873, "file_md5": "ec56c205fb566e93a5845476d7cd2966", "downloads": 542, "readme": "

mongodb puppet module

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with mongodb
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

Installs MongoDB on RHEL/Ubuntu/Debian from OS repo, or alternatively from\n10gen repository installation documentation.

\n\n

Deprecation Warning

\n\n

This release is a major refactoring of the module which means that the API may\nhave changed in backwards incompatible ways. If your project depends on the old API, \nplease pin your dependencies to 0.3 version to ensure your environments don't break.

\n\n

The current module design is undergoing review for potential 1.0 release. We welcome\nany feedback with regard to the APIs and patterns used in this release.

\n\n

Module Description

\n\n

The MongoDB module manages mongod server installation and configuration of the mongod daemon. For the time being it supports only a single\nMongoDB server instance, without sharding and limited replica set \nfunctionality (you can define the replica set parameter in the config file, however\nrs.initiate() has to be done manually).

\n\n

Setup

\n\n

What MongoDB affects

\n\n
    \n
  • MongoDB package.
  • \n
  • MongoDB configuration files.
  • \n
  • MongoDB service.
  • \n
  • 10gen/mongodb apt/yum repository.
  • \n
\n\n

Beginning with MongoDB

\n\n

If you just want a server installation with the default options you can run\ninclude '::mongodb:server'. If you need to customize configuration\noptions you need to do the following:

\n\n
class {'::mongodb::server':\n  port    => 27018,\n  verbose => true,\n}\n
\n\n

Although most distro comes with a prepacked MongoDB server we recommend to\nuse the 10gen/MongoDB software repository, because most of the current OS\npackages are outdated and not appropriate for a production environment.\nTo install MongoDB from 10gen repository:

\n\n
class {'::mongodb::globals':\n  manage_package_repo => true,\n}->\nclass {'::mongodb::server': }\n
\n\n

Usage

\n\n

Most of the interaction for the server is done via mongodb::server. For\nmore options please have a look at monogbd::server.\nAlso in this version we introduced mongodb::globals, which is meant more\nfor future implementation, where you can configure the main settings for\nthis module in a global way, to be used by other classes and defined resources. \nOn its own it does nothing.

\n\n

Reference

\n\n

Classes

\n\n

Public classes

\n\n
    \n
  • mongodb::server: Installs and configure MongoDB
  • \n
  • mongodb::globals: Configure main settings on a global way
  • \n
\n\n

Private classes

\n\n
    \n
  • mongodb::repo: Manage 10gen/MongoDB software repository
  • \n
  • mongodb::repo::apt: Manage Debian/Ubuntu apt 10gen/MongoDB repository
  • \n
  • mongodb::repo::yum: Manage Redhat/CentOS apt 10gen/MongoDB repository
  • \n
  • mongodb::server::config: Configures MongoDB configuration files
  • \n
  • mongodb::server::install: Install MongoDB software packages
  • \n
  • mongodb::server::service: Manages service
  • \n
\n\n

Class: mongodb::globals

\n\n

Note: most server specific defaults should be overridden in the mongodb::server\nclass. This class should only be used if you are using a non-standard OS or\nif you are changing elements such as version or manage_package_repo that\ncan only be changed here.

\n\n

This class allows you to configure the main settings for this module in a\nglobal way, to be used by the other classes and defined resources. On its\nown it does nothing.

\n\n
server_package_name
\n\n

This setting can be used to override the default MongoDB server package\nname. If not specified, the module will use whatever package name is the\ndefault for your OS distro.

\n\n
service_name
\n\n

This setting can be used to override the default MongoDB service name. If not\nspecified, the module will use whatever service name is the default for your OS distro.

\n\n
service_provider
\n\n

This setting can be used to override the default MongoDB service provider. If\nnot specified, the module will use whatever service provider is the default for\nyour OS distro.

\n\n
service_status
\n\n

This setting can be used to override the default status check command for\nyour MongoDB service. If not specified, the module will use whatever service\nname is the default for your OS distro.

\n\n
user
\n\n

This setting can be used to override the default MongoDB user and owner of the\nservice and related files in the file system. If not specified, the module will\nuse the default for your OS distro.

\n\n
group
\n\n

This setting can be used to override the default MongoDB user group to be used\nfor related files in the file system. If not specified, the module will use\nthe default for your OS distro.

\n\n
bind_ip
\n\n

This setting can be used to configure MonogDB process to bind to and listen\nfor connections from applications on this address. If not specified, the\nmodule will use the default for your OS distro.\nNote: This value should be passed an an array.

\n\n
version
\n\n

The version of MonogDB to install/manage. This is a simple way of providing\na specific version such as '2.2' or '2.4' for example. If not specified,\nthe module will use the default for your OS distro.

\n\n

Class: mongodb::server

\n\n

Most of the parameters manipulates the mongod.conf file.

\n\n

For more details about configuration parameters consult the MongoDB Configuration File Options.

\n\n
ensure
\n\n

enable or disable the service

\n\n
config
\n\n

Path of the config file. If not specified, the module will use the default\nfor your OS distro.

\n\n
dbpath
\n\n

Set this value to designate a directory for the mongod instance to store\nit's data. If not specified, the module will use the default for your OS distro.

\n\n
pidfilepath
\n\n

Specify a file location to hold the PID or process ID of the mongod process.\nIf not specified, the module will use the default for your OS distro.

\n\n
logpath
\n\n

Specify the path to a file name for the log file that will hold all diagnostic\nlogging information. Unless specified, mongod will output all log information\nto the standard output.

\n\n
bind_ip
\n\n

Set this option to configure the mongod or mongos process to bind to and listen\nfor connections from applications on this address. If not specified, the module\nwill use the default for your OS distro. Example: bind_ip=['127.0.0.1', '192.168.0.3']\nNote: bind_ip accept array as a value.

\n\n
logappend
\n\n

Set to true to add new entries to the end of the logfile rather than overwriting\nthe content of the log when the process restarts. Default: True

\n\n
fork
\n\n

Set to true to enable database authentication for users connecting from remote\nhosts. If not specified, the module will use the default for your OS distro.

\n\n
port
\n\n

Specifies a TCP port for the server instance to listen for client connections. \nDefault: 27017

\n\n
journal
\n\n

Set to true to enable operation journaling to ensure write durability and\ndata consistency. Default: on 64-bit systems true and on 32-bit systems false

\n\n
nojournal
\n\n

Set nojournal = true to disable durability journaling. By default, mongod\nenables journaling in 64-bit versions after v2.0. \nDefault: on 64-bit systems false and on 32-bit systems true

\n\n

Note: You must use journal to enable journaling on 32-bit systems.

\n\n
smallfiles
\n\n

Set to true to modify MongoDB to use a smaller default data file size. \nSpecifically, smallfiles reduces the initial size for data files and\nlimits them to 512 megabytes. Default: false

\n\n
cpu
\n\n

Set to true to force mongod to report every four seconds CPU utilization\nand the amount of time that the processor waits for I/O operations to\ncomplete (i.e. I/O wait.) Default: false

\n\n
auth
\n\n

Set to true to enable database authentication for users connecting from\nremote hosts. If no users exist, the localhost interface will continue\nto have access to the database until you create the first user. \nDefault: false

\n\n
noauth
\n\n

Disable authentication. Currently the default. Exists for future compatibility\n and clarity.

\n\n
verbose
\n\n

Increases the amount of internal reporting returned on standard output or in\nthe log file generated by logpath. Default: false

\n\n
verbositylevel
\n\n

MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv.\nDefault: None

\n\n
objcheck
\n\n

Forces the mongod to validate all requests from clients upon receipt to ensure\nthat clients never insert invalid documents into the database. \nDefault: on v2.4 default to true and on earlier version to false

\n\n
quota
\n\n

Set to true to enable a maximum limit for the number data files each database\ncan have. The default quota is 8 data files, when quota is true. Default: false

\n\n
quotafiles
\n\n

Modify limit on the number of data files per database. This option requires the\nquota setting. Default: 8

\n\n
diaglog
\n\n

Creates a very verbose diagnostic log for troubleshooting and recording various\nerrors. Valid values: 0, 1, 2, 3 and 7. \nFor more information please refer to MongoDB Configuration File Options.

\n\n
directoryperdb
\n\n

Set to true to modify the storage pattern of the data directory to store each\ndatabase’s files in a distinct folder. Default: false

\n\n
profile
\n\n

Modify this value to changes the level of database profiling, which inserts\ninformation about operation performance into output of mongod or the\nlog file if specified by logpath.

\n\n
maxconns
\n\n

Specifies a value to set the maximum number of simultaneous connections\nthat MongoDB will accept. Default: depends on system (i.e. ulimit and file descriptor)\nlimits. Unless set, MongoDB will not limit its own connections.

\n\n
oplog_size
\n\n

Specifies a maximum size in megabytes for the replication operation log \n(e.g. oplog.) mongod creates an oplog based on the maximum amount of space\navailable. For 64-bit systems, the oplog is typically 5% of available disk space.

\n\n
nohints
\n\n

Ignore query hints. Default: None

\n\n
nohttpinterface
\n\n

Set to true to disable the HTTP interface. This command will override the rest\nand disable the HTTP interface if you specify both. Default: false

\n\n
noscripting
\n\n

Set noscripting = true to disable the scripting engine. Default: false

\n\n
notablescan
\n\n

Set notablescan = true to forbid operations that require a table scan. Default: false

\n\n
noprealloc
\n\n

Set noprealloc = true to disable the preallocation of data files. This will shorten\nthe start up time in some cases, but can cause significant performance penalties\nduring normal operations. Default: false

\n\n
nssize
\n\n

Use this setting to control the default size for all newly created namespace f\niles (i.e .ns). Default: 16

\n\n
mms_token
\n\n

MMS token for mms monitoring. Default: None

\n\n
mms_name
\n\n

MMS identifier for mms monitoring. Default: None

\n\n
mms_interval
\n\n

MMS interval for mms monitoring. Default: None

\n\n
replset
\n\n

Use this setting to configure replication with replica sets. Specify a replica\nset name as an argument to this set. All hosts must have the same set name.

\n\n
rest
\n\n

Set to true to enable a simple REST interface. Default: false

\n\n
slowms
\n\n

Sets the threshold for mongod to consider a query “slow†for the database profiler. \nDefault: 100 ms

\n\n
keyfile
\n\n

Specify the path to a key file to store authentication information. This option \nis only useful for the connection between replica set members. Default: None

\n\n
primary Puppet server
\n\n

Set to true to configure the current instance to act as primary Puppet server instance in a\nreplication configuration. Default: False Note: deprecated – use replica sets

\n\n
replica
\n\n

Set to true to configure the current instance to act as replica instance in a\nreplication configuration. Default: false\nNote: deprecated – use replica sets

\n\n
only
\n\n

Used with the replica option, only specifies only a single database to\nreplicate. Default: <> \nNote: deprecated – use replica sets

\n\n
source
\n\n

Used with the replica setting to specify the primary Puppet server instance from which\nthis replica instance will replicate. Default: <> \nNote: deprecated – use replica sets

\n\n

Limitation

\n\n

This module has been tested on:

\n\n
    \n
  • Debian 7.* (Wheezy)
  • \n
  • Debian 6.* (squeeze)
  • \n
  • Ubuntu 12.04.2 (precise)
  • \n
  • Ubuntu 10.04.4 LTS (lucid)
  • \n
  • RHEL 5/6
  • \n
  • CentOS 5/6
  • \n
\n\n

For a for list of tested OS please have a look at the .nodeset.xml definition.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Testing

\n\n

There are two types of tests distributed with this module. Unit tests with\nrspec-puppet and system tests using rspec-system.

\n\n

unit tests should be run under Bundler with the gem versions as specified\nin the Gemfile. To install the necessary gems:

\n\n
bundle install --path=vendor\n
\n\n

Test setup and teardown is handled with rake tasks, so the\nsupported way of running tests is with

\n\n
bundle exec rake spec\n
\n\n

For system test you will also need to install vagrant > 1.3.x and virtualbox > 4.2.10.\nTo run the system tests

\n\n
bundle exec rake spec:system\n
\n\n

To run the tests on different operating systems, see the sets available in .nodeset.xml\nand run the specific set with the following syntax:

\n\n
RSPEC_SET=ubuntu-server-12042-x64 bundle exec rake spec:system\n
\n\n

Authors

\n\n

We would like to thank everyone who has contributed issues and pull requests to this modules.\nA complete list of contributors can be found on the \nGitHub Contributor Graph\nfor the puppetlabs-mongodb module.

\n
", "changelog": "
2013-10-31 - Version 0.3.0\n\nSummary:\n\nAdds a number of parameters and fixes some platform\nspecific bugs in module deployment.\n\n2013-09-25 - Version 0.2.0\n\nSummary:\n\nThis release fixes a duplicate parameter.\n\nFixes:\n- Fix a duplicated parameter.\n\n2012-07-13 Puppet Labs <info@puppetlabs.com> - 0.1.0\n* Add support for RHEL/CentOS\n* Change default mongodb install location to OS repo\n\n2012-05-29 Puppet Labs <info@puppetlabs.com> - 0.0.2\n* Fix Modulefile typo.\n* Remove repo pin.\n* Update spec tests and add travis support.\n\n2012-05-03 Puppet Labs <info@puppetlabs.com> - 0.0.1\n* Initial Release.\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-18 11:21:51 -0800", "updated_at": "2013-12-18 11:21:51 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-mongodb-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.3.0-rc1", "version": "0.3.0-rc1" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-mongodb", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-gcc", "name": "gcc", "downloads": 20711, "created_at": "2010-05-21 02:51:17 -0700", "updated_at": "2014-01-06 14:33:03 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-gcc-0.1.0", "module": { "uri": "/v3/modules/puppetlabs-gcc", "name": "gcc", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.0", "metadata": { "name": "puppetlabs-gcc", "version": "0.1.0", "source": "git://github.com/puppetlabs/puppetlabs-gcc.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "module for installing gcc build utils", "description": "module for installing gcc build utils", "project_page": "https://github.com/puppetlabs/puppetlabs-gcc/", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "24b6844c228e6cf2372aed6df1ed5378", "LICENSE": "0e5ccf641e613489e66aa98271dbe798", "Modulefile": "1b2c4449248962cf099d2dd8841fd9bc", "manifests/init.pp": "a9f1f5821033784692ca044e5a06d278", "manifests/params.pp": "952548e3463e7785d4773d180989b339", "tests/init.pp": "d97b158981e1e2b710a0dec5ce8d40d0", "tests/params.pp": "34196cd17ebe3b0665a909625dc384f7" } }, "tags": [ "gcc", "compiler" ], "file_uri": "/v3/files/puppetlabs-gcc-0.1.0.tar.gz", "file_size": 5289, "file_md5": "007ca27c611105aca369189f02099043", "downloads": 10530, "readme": null, "changelog": "
2013-08-14 - Release 0.1.0\n\nFeatures:\n- Support osfamily  instead of using `$operatingsystem`. Note that\nAmazon Linux is RedHat osfamily on facter version 1.7\n\n2011-06-03 - Dan Bode <dan@puppetlabs.com> - 0.0.3\n* committed source to git\n* added tests\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-08-14 11:24:26 -0700", "updated_at": "2013-08-14 11:24:26 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-gcc-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-gcc-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-gcc-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-gcc-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-gcc", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-rabbitmq", "name": "rabbitmq", "downloads": 19860, "created_at": "2011-03-24 18:13:10 -0700", "updated_at": "2014-01-06 14:37:14 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-rabbitmq-3.1.0", "module": { "uri": "/v3/modules/puppetlabs-rabbitmq", "name": "rabbitmq", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.1.0", "metadata": { "name": "puppetlabs-rabbitmq", "version": "3.1.0", "source": "git://github.com/puppetlabs/puppetlabs-rabbitmq.git", "author": "puppetlabs", "license": "Apache", "summary": "RabbitMQ Puppet Module", "description": "This module manages RabbitMQ. Tested on Debian/Ubuntu", "project_page": "http://github.com/puppetlabs/puppetlabs-rabbitmq", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.0.0" }, { "name": "puppetlabs/apt", "version_requirement": ">= 1.0.0" }, { "name": "garethr/erlang", "version_requirement": ">= 0.1.0" } ], "types": [ { "name": "rabbitmq_exchange", "doc": "Native type for managing rabbitmq exchanges", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "Name of exchange Values can match `/^\\S*@\\S+$/`." }, { "name": "type", "doc": "Exchange type to be set *on creation* Values can match `/^\\S+$/`." }, { "name": "user", "doc": "The user to use to connect to rabbitmq Values can match `/^\\S+$/`." }, { "name": "password", "doc": "The password to use to connect to rabbitmq Values can match `/\\S+/`." } ], "providers": [ { "name": "rabbitmqadmin", "doc": "Required binaries: `/usr/local/bin/rabbitmqadmin`. Default for `feature` == `posix`." } ] }, { "name": "rabbitmq_plugin", "doc": "manages rabbitmq plugins", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": " Values can match `/^\\S+$/`." } ], "providers": [ { "name": "rabbitmqplugins", "doc": "Required binaries: `rabbitmq-plugins`. Default for `feature` == `posix`." } ] }, { "name": "rabbitmq_user", "doc": "Native type for managing rabbitmq users", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `absent`." }, { "name": "admin", "doc": "rather or not user should be an admin Values can match `/true|false/`." } ], "parameters": [ { "name": "name", "doc": "Name of user Values can match `/^\\S+$/`." }, { "name": "password", "doc": "User password to be set *on creation*" } ], "providers": [ { "name": "rabbitmqctl", "doc": "Required binaries: `rabbitmqctl`. Default for `feature` == `posix`." } ] }, { "name": "rabbitmq_user_permissions", "doc": "Type for managing rabbitmq user permissions", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `absent`." }, { "name": "configure_permission", "doc": "regexp representing configuration permissions" }, { "name": "read_permission", "doc": "regexp representing read permissions" }, { "name": "write_permission", "doc": "regexp representing write permissions" } ], "parameters": [ { "name": "name", "doc": "combination of user@vhost to grant privileges to Values can match `/^\\S+@\\S+$/`." } ], "providers": [ { "name": "rabbitmqctl", "doc": "Required binaries: `rabbitmqctl`. Default for `feature` == `posix`." } ] }, { "name": "rabbitmq_vhost", "doc": "manages rabbitmq vhosts", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": " Values can match `/^\\S+$/`." } ], "providers": [ { "name": "rabbitmqctl", "doc": "Required binaries: `rabbitmqctl`." } ] } ], "checksums": { "CHANGELOG": "42c94bfe4d6aed9da5435da027c3745a", "Gemfile": "d84cde6589d6c4003f15744d1eb0a2f0", "Gemfile.lock": "3ad7d8e4446297c7880e2a90ffed8682", "LICENSE": "6089b6bd1f0d807edb8bdfd76da0b038", "Modulefile": "b09ff557da7bc54600a2788985424072", "README.md": "694527603bdce63bc39be5a49f3fa908", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "TODO": "53cf21155ec1e83e3e167f711fd3ff9f", "bin/autospec": "d4fde3f4a9f1e5fd339228026654cb70", "bin/coderay": "1acc1424646002cd65fef8ee4b01d507", "bin/facter": "54901e1d789da4ff3303d45a6d66fc03", "bin/hiera": "60a41938163cc8af0b56456abcbdfcd3", "bin/htmldiff": "8d551a540666732a11d6caa9aa3a0e68", "bin/kwalify": "6b8d065f2c721e0d49eb5cb4488616d3", "bin/ldiff": "3104dda81ce6a8c0bf122df6ac851365", "bin/nokogiri": "10ad425766e91e68d2476e21db3c4304", "bin/pry": "3146b5e91723f556138a84a89d8dcd0d", "bin/puppet": "5349ed70b05332a13b83ba8077dd0043", "bin/puppet-lint": "7f9089954f23d779e8ce05a4a53cf440", "bin/rake": "d09495e1a29ed0015941718d92deb28b", "bin/rbvmomish": "10ebc04a4ffda298854391fc5324d0fb", "bin/rspec": "00ed29f02ccbfaf09483109846c4a9c3", "bin/rspec-puppet-init": "6cd42b0ad1382d8a870c1f75caf67a50", "bin/serverspec-init": "d893a0194b16deae0f44ba44caf45da9", "files/README.markdown": "3d44458cc68d8513b51e3b56c604eec4", "files/plugins/amqp_client-2.3.1.ez": "543ec53b7208fdc2dc4eba3684868011", "files/plugins/rabbit_stomp-2.3.1.ez": "f552a986409a6d407a080b1aceb80d20", "hi": "e67294fca0a0fb94c4c44b480047cca1", "lib/facter/rabbitmq_erlang_cookie.rb": "00471b43e63da8baa558708d1b11806e", "lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb": "32f089691478f88792b8d607dd500355", "lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb": "c9674737c1c75d92f8c0b761e95a5e61", "lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb": "040638981bf40b4a04bd3dc63eb8c9c3", "lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb": "229316b69b9d54f96c3504714e183980", "lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb": "3180b9be5f9697e673a209ff15bdc2a0", "lib/puppet/type/rabbitmq_exchange.rb": "ca24ac41150170d0dde76fe2cb7fe1f4", "lib/puppet/type/rabbitmq_plugin.rb": "6a707d089d0e50a949ecf8fae114eab0", "lib/puppet/type/rabbitmq_user.rb": "8f47b112c85f762ac3efd50023808274", "lib/puppet/type/rabbitmq_user_permissions.rb": "2d12cd7d9c8bd2afd2e4a4b24a35b58b", "lib/puppet/type/rabbitmq_vhost.rb": "9bbd7676d2611d0559a3f328376f730b", "manifests/config.pp": "ad14e6c99aa786b6ea1c329868059ecb", "manifests/init.pp": "537a714721c7f4e17612c2671b4a823a", "manifests/install/rabbitmqadmin.pp": "b216bb563101f23f2830dfe17e690111", "manifests/install.pp": "05833b9502fab1dad5be32f5bf7bb742", "manifests/management.pp": "93c41d238f2734fa7c5944b8f32f6cc4", "manifests/params.pp": "d61c783a5e0cede7a1e6e4bb8bc9351a", "manifests/repo/apt.pp": "2b172398ad967a29f3a5de3a25d1d8a0", "manifests/repo/rhel.pp": "ad6c05b2bd865e556f4066b70bfa5841", "manifests/service.pp": "ec365148eec9e739ca06e24c972cd5de", "spec/README.markdown": "32a1fc0121c28aff554ef5d422b8b51e", "spec/classes/rabbitmq_spec.rb": "1a6c93163ff37993cef716c97a984c92", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "ffa3c5c0e362420d60afec53bac3cbff", "spec/system/basic_spec.rb": "a93bcf8e5a0506fa60bba007c6a37f11", "spec/system/class_spec.rb": "9ce463fe52e5c461702ef8639e6eb2f6", "spec/system/clustering_spec.rb": "5c88ca84094c7323420e3745b8b92abd", "spec/system/delete_guest_user_spec.rb": "91330345868e568d7a3a040507bbaeeb", "spec/system/rabbitmqadmin_spec.rb": "bc264d27067568b912f23e2c4d196b07", "spec/system/service_spec.rb": "7707a58223a3e4e7316abef0a4443c02", "spec/unit/facts/rabbitmq_erlang_cookie_spec.rb": "dd0ba3814d8d5ba01bd1900218d5e7b9", "spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb": "92aed5e904420ffce11376d7fc2f5839", "spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb": "07af653beb1e70cb6dc7338bba9be753", "spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb": "223b99e20c053bcee4c9599b738582e3", "spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb": "56695718b2f0a6f73d8bee330e424abf", "spec/unit/puppet/type/rabbitmq_exchange_spec.rb": "9a021092577dbbd5ece65e9fd8a55882", "spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb": "3df2a199740e68852a45d39a9fc06c9f", "spec/unit/puppet/type/rabbitmq_user_spec.rb": "19cfc044bffc4c67e27de52a10f4ce28", "spec/unit/puppet/type/rabbitmq_vhost_spec.rb": "162e29065eb5ce664842b66bcfa0ac34", "templates/README.markdown": "aada0a1952329e46b98695349dba6203", "templates/rabbit.pub.key.erb": "e454b517476b3eaee39f09c71036fa7c", "templates/rabbitmq-env.conf.erb": "174bf40d6f7fed0cf29604e858cc96c4", "templates/rabbitmq.config.erb": "e2677932c9fbeeff32a31887e80a3ade", "tests/full.pp": "fb1e9f59fe63846c60b402202152eeb0", "tests/permissions/add.pp": "b53b627a4d5521af8cdcfd83d99d3824", "tests/plugin.pp": "5fc1271d5684dd51fa94b67876179e63", "tests/repo/apt.pp": "4ea43b4f8dcaf474ec11d796efef66a3", "tests/server.pp": "56dba93d20d5b716b66df2e0f4f693d6", "tests/service.pp": "f06296b103daf449f9e7644fd9eee58b", "tests/site.pp": "653334bf690768a8af42cd13e8e53ef2", "tests/user/add.pp": "d9f051f1edc91114097b54f818729ea8", "tests/vhosts/add.pp": "f054d84ac87dc206f586d779fc312fa6" } }, "tags": [ "mcollective", "amqp", "stomp", "rabbitmq", "middleware", "message", "messaging", "queue", "debian", "ubuntu", "centos", "rhel" ], "file_uri": "/v3/files/puppetlabs-rabbitmq-3.1.0.tar.gz", "file_size": 236822, "file_md5": "ca9f8df39d13188da2f133576adefd11", "downloads": 5617, "readme": "

rabbitmq

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with rabbitmq\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

This module manages RabbitMQ (www.rabbitmq.com)

\n\n

Module Description

\n\n

The rabbitmq module sets up rabbitmq and has a number of providers to manage\neverything from vhosts to exchanges after setup.

\n\n

This module has been tested against 2.7.1 and is known to not support\nall features against earlier versions.

\n\n

Setup

\n\n

What rabbitmq affects

\n\n
    \n
  • rabbitmq repository files.
  • \n
  • rabbitmq package.
  • \n
  • rabbitmq configuration file.
  • \n
  • rabbitmq service.
  • \n
\n\n

Beginning with rabbitmq

\n\n
include '::rabbitmq'\n
\n\n

Usage

\n\n

All options and configuration can be done through interacting with the parameters\non the main rabbitmq class. These are documented below.

\n\n

rabbitmq class

\n\n

To begin with the rabbitmq class controls the installation of rabbitmq. In here\nyou can control many parameters relating to the package and service, such as\ndisabling puppet support of the service:

\n\n
class { '::rabbitmq':\n  service_manage    => false\n  port              => '5672',\n  delete_guest_user => true,\n}\n
\n\n

Environment Variables

\n\n

To use RabbitMQ Environment Variables, use the parameters environment_variables e.g.:

\n\n
class { 'rabbitmq':\n  port              => '5672',\n  environment_variables   => {\n    'RABBITMQ_NODENAME'     => 'node01',\n    'RABBITMQ_SERVICENAME'  => 'RabbitMQ'\n  }\n}\n
\n\n

Variables Configurable in rabbitmq.config

\n\n

To change RabbitMQ Config Variables in rabbitmq.config, use the parameters config_variables e.g.:

\n\n
class { 'rabbitmq':\n  port              => '5672',\n  config_variables   => {\n    'hipe_compile'  => true,\n    'frame_max'     => 131072,\n    'log_levels'    => "[{connection, info}]"\n  }\n}\n
\n\n

Clustering

\n\n

To use RabbitMQ clustering and H/A facilities, use the rabbitmq::server\nparameters config_cluster, cluster_nodes, and cluster_node_type, e.g.:

\n\n
class { 'rabbitmq':\n  config_cluster    => true, \n  cluster_nodes     => ['rabbit1', 'rabbit2'],\n  cluster_node_type => 'ram',\n}\n
\n\n

NOTE: You still need to use x-ha-policy: all in your client \napplications for any particular queue to take advantage of H/A.

\n\n

You should set the 'config_mirrored_queues' parameter if you plan\non using RabbitMQ Mirrored Queues within your cluster:

\n\n
class { 'rabbitmq':\n  config_cluster         => true,\n  config_mirrored_queues => true,\n  cluster_nodes          => ['rabbit1', 'rabbit2'],\n}\n
\n\n

Reference

\n\n

Classes

\n\n
    \n
  • rabbitmq: Main class for installation and service management.
  • \n
  • rabbitmq::config: Main class for rabbitmq configuration/management.
  • \n
  • rabbitmq::install: Handles package installation.
  • \n
  • rabbitmq::params: Different configuration data for different systems.
  • \n
  • rabbitmq::service: Handles the rabbitmq service.
  • \n
  • rabbitmq::repo::apt: Handles apt repo for Debian systems.
  • \n
  • rabbitmq::repo::rhel: Handles yum repo for Redhat systems.
  • \n
\n\n

Parameters

\n\n

admin_enable

\n\n

If enabled sets up the management interface/plugin for RabbitMQ.

\n\n

cluster_disk_nodes

\n\n

DEPRECATED AND REPLACED BY CLUSTER_NODES.

\n\n

cluster_node_type

\n\n

Choose between disk and ram nodes.

\n\n

cluster_nodes

\n\n

An array of nodes for clustering.

\n\n

config

\n\n

The file to use as the rabbitmq.config template.

\n\n

config_cluster

\n\n

Boolean to enable or disable clustering support.

\n\n

config_mirrored_queues

\n\n

Boolean to enable or disable mirrored queues.

\n\n

config_path

\n\n

The path to write the RabbitMQ configuration file to.

\n\n

config_stomp

\n\n

Boolean to enable or disable stomp.

\n\n

delete_guest_user

\n\n

Boolean to decide if we should delete the default guest user.

\n\n

env_config

\n\n

The template file to use for rabbitmq_env.config.

\n\n

env_config_path

\n\n

The path to write the rabbitmq_env.config file to.

\n\n

erlang_cookie

\n\n

The erlang cookie to use for clustering - must be the same between all nodes.

\n\n

erlang_enable

\n\n

If true then we include an erlang module.

\n\n

config_variables

\n\n

To set config variables in rabbitmq.config

\n\n

node_ip_address

\n\n

The value of RABBITMQ_NODE_IP_ADDRESS in rabbitmq_env.config

\n\n

environment_variables

\n\n

RabbitMQ Environment Variables in rabbitmq_env.config

\n\n

package_ensure

\n\n

Determines the ensure state of the package. Set to installed by default, but could\nbe changed to latest.

\n\n

package_name

\n\n

The name of the package to install.

\n\n

package_provider

\n\n

What provider to use to install the package.

\n\n

package_source

\n\n

Where should the package be installed from?

\n\n

plugin_dir

\n\n

Location of RabbitMQ plugins.

\n\n

port

\n\n

The RabbitMQ port.

\n\n

management_port

\n\n

The port for the RabbitMQ management interface.

\n\n

service_ensure

\n\n

The state of the service.

\n\n

service_manage

\n\n

Determines if the service is managed.

\n\n

service_name

\n\n

The name of the service to manage.

\n\n

stomp_port

\n\n

The port to use for Stomp.

\n\n

wipe_db_on_cookie_change

\n\n

Boolean to determine if we should DESTROY AND DELETE the RabbitMQ database.

\n\n

version

\n\n

Sets the version to install.

\n\n

Native Types

\n\n

rabbitmq_user

\n\n

query all current users: $ puppet resource rabbitmq_user

\n\n
rabbitmq_user { 'dan':\n  admin    => true,\n  password => 'bar',\n}\n
\n\n

rabbitmq_vhost

\n\n

query all current vhosts: $ puppet resource rabbitmq_vhost

\n\n
rabbitmq_vhost { 'myhost':\n  ensure => present,\n}\n
\n\n

rabbitmq_user_permissions

\n\n
rabbitmq_user_permissions { 'dan@myhost':\n  configure_permission => '.*',\n  read_permission      => '.*',\n  write_permission     => '.*',\n}\n
\n\n

rabbitmq_plugin

\n\n

query all currently enabled plugins $ puppet resource rabbitmq_plugin

\n\n
rabbitmq_plugin {'rabbitmq_stomp':\n  ensure => present,\n}\n
\n\n

Limitations

\n\n

This module has been built on and tested against Puppet 2.7 and higher.

\n\n

The module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Authors

\n\n\n
", "changelog": "
2013-09-14 - Version 3.1.0\n\nSummary:\n\nThis release focuses on a few small (but critical) bugfixes as well as extends\nthe amount of custom RabbitMQ configuration you can do with the module.\n\nFeatures:\n- You can now change RabbitMQ 'Config Variables' via the parameter `config_variables`.\n- You can now change RabbitMQ 'Environment Variables' via the parameter `environment_variables`.\n- ArchLinux support added.\n\nFixes:\n- Make use of the user/password parameters in rabbitmq_exchange{}\n- Correct the read/write parameter order on set_permissions/list_permissions as\n  they were reversed.\n- Make the module pull down 3.1.5 by default.\n\n* 2013-07-18 3.0.0\nSummary:\nThis release heavily refactors the RabbitMQ and changes functionality in\nseveral key ways.  Please pay attention to the new README.md file for\ndetails of how to interact with the class now.  Puppet 3 and RHEL are\nnow fully supported.  The default version of RabbitMQ has changed to\na 3.x release.\n\nBugfixes:\n- Improve travis testing options.\n- Stop reimporting the GPG key on every run on RHEL and Debian.\n- Fix documentation to make it clear you don't have to set provider => each time.\n- Reference the standard rabbitmq port in the documentation instead of a custom port.\n- Fixes to the README formatting.\n\nFeatures:\n- Refactor the module to fix RHEL support.  All interaction with the module\nis now done through the main rabbitmq class.\n- Add support for mirrored queues (Only on Debian family distributions currently)\n- Add rabbitmq_exchange provider (using rabbitmqadmin)\n- Add new `rabbitmq` class parameters:\n  - `manage_service`: Boolean to choose if Puppet should manage the service. (For pacemaker/HA setups)\n- Add SuSE support.\n\nIncompatible Changes:\n- Rabbitmq::server has been removed and is now rabbitmq::config.  You should\nnot use this class directly, only via the main rabbitmq class.\n\n* 2013-04-11 2.1.0\n- remove puppetversion from rabbitmq.config template\n- add cluster support\n- escape resource names in regexp\n\n* 2012-07-31 Jeff McCune <jeff@puppetlabs.com> 2.0.2\n- Re-release 2.0.1 with $EDITOR droppings cleaned up\n\n* 2012-05-03 2.0.0\n- added support for new-style admin users\n- added support for rabbitmq 2.7.1\n\n* 2011-06-14 Dan Bode <dan@Puppetlabs.com> 2.0.0rc1\n- Massive refactor:\n- added native types for user/vhost/user_permissions\n- added apt support for vendor packages\n- added smoke tests\n\n* 2011-04-08 Jeff McCune <jeff@puppetlabs.com> 1.0.4\n- Update module for RabbitMQ 2.4.1 and rabbitmq-plugin-stomp package.\n\n2011-03-24 1.0.3\n- Initial release to the forge.  Reviewed by Cody.  Whitespace is good.\n\n2011-03-22 1.0.2\n- Whitespace only fix again...  ack '\\t' is my friend...\n\n2011-03-22 1.0.1\n- Whitespace only fix.\n\n2011-03-22 1.0.0\n- Initial Release.  Manage the package, file and service.\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2013 Puppet Labs\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-10-15 11:13:42 -0700", "updated_at": "2013-10-15 11:13:42 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-rabbitmq-3.1.0", "version": "3.1.0" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-3.0.0-rc2", "version": "3.0.0-rc2" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-3.0.0-rc1", "version": "3.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-2.0.2", "version": "2.0.2" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-1.0.4", "version": "1.0.4" }, { "uri": "/v3/releases/puppetlabs-rabbitmq-1.0.3", "version": "1.0.3" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-rabbitmq", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-xinetd", "name": "xinetd", "downloads": 19042, "created_at": "2012-06-07 22:59:40 -0700", "updated_at": "2014-01-06 13:45:30 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-xinetd-1.2.0", "module": { "uri": "/v3/modules/puppetlabs-xinetd", "name": "xinetd", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.2.0", "metadata": { "name": "puppetlabs-xinetd", "version": "1.2.0", "source": "https://github.com/puppetlabs/puppetlabs-xinetd", "author": "Puppet Labs", "license": "Apache License 2.0", "summary": "Puppet Labs Xinetd Module", "description": "Puppet module to configure xinetd services", "project_page": "https://github.com/puppetlabs/puppetlabs-xinetd", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ ], "checksums": { "CHANGELOG": "5b9b4043ec6e89c17791822e716c8fea", "Gemfile": "75063ce32be0cee9d635bc8a1dfcbe27", "Gemfile.lock": "d08f5ba1e7865283624e1dad14b0d8ca", "LICENSE": "c213819d6586389247f91b04ccd00802", "Modulefile": "2446caa19e31e075a8ac410da5099a74", "README": "d7257388d0242a22d7a95a0af3005674", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/init.pp": "e63a6b40fbb7f1bdacf1f956cc1ad6fe", "manifests/params.pp": "d8c37920c22b27a47a4150ad60ad1adc", "manifests/service.pp": "2d84a98917504d91125130f0f69e9562", "spec/classes/xinetd_init_spec.rb": "db443eb5e3d8e3f177a2e11ee3e1c1e0", "spec/defines/xinetd_service_spec.rb": "49b9566836aa61d56f5622b45f1d56ab", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "templates/service.erb": "686185a0237be1037aa00949e85ed918", "templates/xinetd.conf.erb": "39a49b490f2bd5e0b133ce9a58a74b0b", "tests/init.pp": "c31f20acadb59d84cc56ebe12a138a03" } }, "tags": [ "xinetd", "centos", "rhel", "debian", "ubuntu" ], "file_uri": "/v3/files/puppetlabs-xinetd-1.2.0.tar.gz", "file_size": 5627, "file_md5": "6f6e156eb7f140061ccd81dd18fc09d1", "downloads": 6291, "readme": "
xinetd\n\nThis is the xinetd module.\n\n# Definition: xinetd::service\n#\n# sets up a xinetd service\n# all parameters match up with xinetd.conf(5) man page\n#\n# Parameters:\n#   $cps          - optional\n#   $flags        - optional\n#   $per_source   - optional\n#   $port         - required - determines the service port\n#   $server       - required - determines the program to execute for this service\n#   $server_args  - optional\n#   $disable      - optional - defaults to "no"\n#   $socket_type  - optional - defaults to "stream"\n#   $protocol     - optional - defaults to "tcp"\n#   $user         - optional - defaults to "root"\n#   $group        - optional - defaults to "root"\n#   $instances    - optional - defaults to "UNLIMITED"\n#   $wait         - optional - based on $protocol will default to "yes" for udp and "no" for tcp\n#   $service_type - optional - type setting in xinetd\n#\n# Actions:\n#   setups up a xinetd service by creating a file in /etc/xinetd.d/\n#\n# Requires:\n#   $server must be set\n#\n# Sample Usage:\n#   # setup tftp service\n#   xinetd::service {"tftp":\n#       port        => "69",\n#       server      => "/usr/sbin/in.tftpd",\n#       server_args => "-s $base",\n#       socket_type => "dgram",\n#       protocol    => "udp",\n#       cps         => "100 2",\n#       flags       => "IPv4",\n#       per_source  => "11",\n#   } # xinetd::service\n
", "changelog": "
2013-07-30 Release 1.2.0\nFeatures:\n- Add `confdir`, `conffile`, `package_name`, and `service_name` parameters to\n`Class['xinetd']`\n- Add support for FreeBSD and Suse.\n- Add `log_on_failure`, `service_name`, `groups`, `no_access`, `access_times`,\n`log_type`, `only_from`, and `xtype` parameters to `Xinetd::Service` define\n\nBugfixes:\n- Redesign for `xinetd::params` pattern\n- Add validation\n- Add unit testing\n\n* 2012-06-07 1.1.0\n- Add port and bind options to services\n- make services deletable\n\n1.0.1 - 20100812\n    * added documentation\n\n1.0.0 - 20100624\n    * initial release\n
", "license": "
Xinetd Puppet Module. Copyright (C) 2010 Garrett Honeycutt\n\nGarrett Honeycutt can be contacted at: contact@garretthoneycutt.com.\n\nThis program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License version 2 as published by the Free Software\nFoundation.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n
", "created_at": "2013-07-30 15:11:31 -0700", "updated_at": "2013-07-30 15:11:31 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-xinetd-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/puppetlabs-xinetd-1.1.0", "version": "1.1.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-xinetd", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-inifile", "name": "inifile", "downloads": 18255, "created_at": "2013-07-16 09:38:09 -0700", "updated_at": "2014-01-06 14:28:35 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-inifile-1.0.0", "module": { "uri": "/v3/modules/puppetlabs-inifile", "name": "inifile", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.0", "metadata": { "name": "puppetlabs-inifile", "version": "1.0.0", "source": "git://github.com/puppetlabs/puppetlabs-inifile.git", "author": "Puppetlabs", "license": "Apache", "summary": "Resource types for managing settings in INI files", "description": "Resource types for managing settings in INI files", "project_page": "https://github.com/puppetlabs/puppetlabs-inifile", "dependencies": [ ], "types": [ { "name": "ini_setting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the setting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] }, { "name": "ini_subsetting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the subsetting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "subsetting", "doc": "The name of the subsetting to be defined." }, { "name": "subsetting_separator", "doc": "The separator string between subsettings. Defaults to \" \"" }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] } ], "checksums": { "CHANGELOG": "1d2ab7d31e0fa7b96ff2e62a59890585", "Gemfile": "144b186b7315b993411af56fd3fe17ba", "Gemfile.lock": "805305e11bd3eb3ccf93779e06dec330", "LICENSE": "519b25a3992e0598a9855e4ccd7f66a1", "Modulefile": "db6005147c078f60dd4d33819941ffd0", "README.markdown": "a373118f66eed7b342fad96bc3885584", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/puppet/provider/ini_setting/ruby.rb": "19174eb75e2efa2f1e5935cd694ee87a", "lib/puppet/provider/ini_subsetting/ruby.rb": "99991c9d3ccf54c2aa1fcacf491d0cfc", "lib/puppet/type/ini_setting.rb": "afcd3f28b946b08db1b48fb189e6d8cf", "lib/puppet/type/ini_subsetting.rb": "b4e6a659f461bcd274dcdf1b1c39db65", "lib/puppet/util/external_iterator.rb": "69ad1eb930ca6d8d6b6faea343b4a22e", "lib/puppet/util/ini_file/section.rb": "77757399ed9b9ce352ddcc8b8f9273c4", "lib/puppet/util/ini_file.rb": "911c2fabc08bded5e364158eb49e97c4", "lib/puppet/util/setting_value.rb": "a9db550b94d66164b8643612dbf7cbb2", "spec/classes/inherit_test1_spec.rb": "56bbfd63e770b180abc3fd7e331de2fb", "spec/fixtures/modules/inherit_ini_setting/lib/puppet/provider/inherit_ini_setting/ini_setting.rb": "15949e27a64f4768a65fc01ca8d0c90d", "spec/fixtures/modules/inherit_ini_setting/lib/puppet/type/inherit_ini_setting.rb": "90f25ea0e389688a0df74f23a5ad18e7", "spec/fixtures/modules/inherit_test1/manifests/init.pp": "ece5099a0da66d65a05055d22485756c", "spec/spec_helper.rb": "3a33176450601775fcc0932340df9f74", "spec/unit/puppet/provider/ini_setting/inheritance_spec.rb": "bbe2fb9d6805ae8cae85271e48f646b3", "spec/unit/puppet/provider/ini_setting/ruby_spec.rb": "1c82228947d3d7bd32ee333068aff7f0", "spec/unit/puppet/provider/ini_subsetting/ruby_spec.rb": "b05cf15a5830feb249ad7177f7d966ca", "spec/unit/puppet/util/external_iterator_spec.rb": "35cc6e56e0064e496e9151dd778f751f", "spec/unit/puppet/util/ini_file_spec.rb": "9090ada5867eb0333f3c543a7fd11a53", "spec/unit/puppet/util/setting_value_spec.rb": "64db9b766063db958e73e713a3e584fa", "tests/ini_setting.pp": "9c8a9d2c453901cedb106cada253f1f6", "tests/ini_subsetting.pp": "71c82234fa8bb8cb442ff01436ce2cf3" } }, "tags": [ "inifile", "ini", "settings", "file", "subsettings" ], "file_uri": "/v3/files/puppetlabs-inifile-1.0.0.tar.gz", "file_size": 20568, "file_md5": "7cf55f8c280c1f4cb9abb5d40c8f0986", "downloads": 18255, "readme": "

\"Build

\n\n

INI-file module

\n\n

This module provides resource types for use in managing INI-style configuration\nfiles. The main resource type is ini_setting, which is used to manage an\nindividual setting in an INI file. Here's an example usage:

\n\n
ini_setting { "sample setting":\n  path    => '/tmp/foo.ini',\n  section => 'foo',\n  setting => 'foosetting',\n  value   => 'FOO!',\n  ensure  => present,\n}\n
\n\n

A supplementary resource type is ini_subsetting, which is used to manage\nsettings that consist of several arguments such as

\n\n
JAVA_ARGS="-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof "\n\nini_subsetting {'sample subsetting':\n  ensure  => present,\n  section => '',\n  key_val_separator => '=',\n  path => '/etc/default/pe-puppetdb',\n  setting => 'JAVA_ARGS',\n  subsetting => '-Xmx',\n  value   => '512m',\n}\n
\n\n

implementing child providers:

\n\n

The ini_setting class can be overridden by child providers in order to implement the management of ini settings for a specific configuration file.

\n\n

In order to implement this, you will need to specify your own Type (as shown below). This type needs to implement a namevar (name), and a property called value:

\n\n

example:

\n\n
#my_module/lib/puppet/type/glance_api_config.rb\nPuppet::Type.newtype(:glance_api_config) do\n  ensurable\n  newparam(:name, :namevar => true) do\n    desc 'Section/setting name to manage from glance-api.conf'\n    # namevar should be of the form section/setting\n    newvalues(/\\S+\\/\\S+/)\n  end\n  newproperty(:value) do\n    desc 'The value of the setting to be defined.'\n    munge do |v|\n      v.to_s.strip\n    end\n  end\nend\n
\n\n

This type also must have a provider that utilizes the ini_setting provider as its parent:

\n\n

example:

\n\n
# my_module/lib/puppet/provider/glance_api_config/ini_setting.rb\nPuppet::Type.type(:glance_api_config).provide(\n  :ini_setting,\n  # set ini_setting as the parent provider\n  :parent => Puppet::Type.type(:ini_setting).provider(:ruby)\n) do\n  # implement section as the first part of the namevar\n  def section\n    resource[:name].split('/', 2).first\n  end\n  def setting\n    # implement setting as the second part of the namevar\n    resource[:name].split('/', 2).last\n  end\n  # hard code the file path (this allows purging)\n  def self.file_path\n    '/etc/glance/glance-api.conf'\n  end\nend\n
\n\n

Now, the individual settings of the /etc/glance/glance-api.conf file can be managed as individual resources:

\n\n
glance_api_config { 'HEADER/important_config':\n  value => 'secret_value',\n}\n
\n\n

Provided that self.file_path has been implemented, you can purge with the following puppet syntax:

\n\n
resources { 'glance_api_config'\n  purge => true,\n}\n
\n\n

If the above code is added, then the resulting configured file will only contain lines implemented as Puppet resources

\n\n

A few noteworthy features:

\n\n
    \n
  • The module tries hard not to manipulate your file any more than it needs to.\nIn most cases, it should leave the original whitespace, comments, ordering,\netc. perfectly intact.
  • \n
  • Supports comments starting with either '#' or ';'.
  • \n
  • Will add missing sections if they don't exist.
  • \n
  • Supports a "global" section (settings that go at the beginning of the file,\nbefore any named sections) by specifying a section name of "".
  • \n
\n
", "changelog": "
2013-07-16 - Version 1.0.0\nFeatures:\n- Handle empty values.\n- Handle whitespace in settings names (aka: server role = something)\n- Add mechanism for allowing ini_setting subclasses to override the\nformation of the namevar during .instances, to allow for ini_setting\nderived types that manage flat ini-file-like files and still purge\nthem.\n\n2013-05-28 - Chris Price <chris@puppetlabs.com> - 0.10.3\n * Fix bug in subsetting handling for new settings (cbea5dc)\n\n2013-05-22 - Chris Price <chris@puppetlabs.com> - 0.10.2\n * Better handling of quotes for subsettings (1aa7e60)\n\n2013-05-21 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Change constants to class variables to avoid ruby warnings (6b19864)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 0.10.1\n * Style fixes (c4af8c3)\n\n2013-04-02 - Dan Bode <dan@puppetlabs.com> - 0.10.1\n * Add travisfile and Gemfile (c2052b3)\n\n2013-04-02 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Update README.markdown (ad38a08)\n\n2013-02-15 - Karel Brezina <karel.brezina@gmail.com> - 0.10.0\n * Added 'ini_subsetting' custom resource type (4351d8b)\n\n2013-03-11 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * guard against nil indentation values (5f71d7f)\n\n2013-01-07 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * Add purging support to ini file (2f22483)\n\n2013-02-05 - James Sweeny <james.sweeny@puppetlabs.com> - 0.10.0\n * Fix test to use correct key_val_parameter (b1aff63)\n\n2012-11-06 - Chris Price <chris@puppetlabs.com> - 0.10.0\n * Added license file w/Apache 2.0 license (5e1d203)\n\n2012-11-02 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Version 0.9.0 released\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add detection for commented versions of settings (a45ab65)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Refactor to clarify implementation of `save` (f0d443f)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add example for `ensure=absent` (e517148)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Better handling of whitespace lines at ends of sections (845fa70)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Respect indentation / spacing for existing sections and settings (c2c26de)\n\n2012-10-17 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Minor tweaks to handling of removing settings (cda30a6)\n\n2012-10-10 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Add support for removing lines (1106d70)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make value a property (cbc90d3)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make ruby provider a better parent. (1564c47)\n\n2012-09-29 - Reid Vandewiele <reid@puppetlabs.com> - 0.9.0\n * Allow values with spaces to be parsed and set (3829e20)\n\n2012-09-24 - Chris Price <chris@pupppetlabs.com> - 0.0.3\n * Version 0.0.3 released\n\n2012-09-20 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Add validation for key_val_separator (e527908)\n\n2012-09-19 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Allow overriding separator string between key/val pairs (8d1fdc5)\n\n2012-08-20 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Version 0.0.2 released\n\n2012-08-17 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Add support for "global" section at beginning of file (c57dab4)\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2012 Chris Price\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-07-17 05:26:51 -0700", "updated_at": "2013-07-17 05:26:51 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-inifile-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-inifile", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-tftp", "name": "tftp", "downloads": 15474, "created_at": "2012-05-01 23:38:04 -0700", "updated_at": "2014-01-06 13:45:32 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-tftp-0.2.1", "module": { "uri": "/v3/modules/puppetlabs-tftp", "name": "tftp", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.1", "metadata": { "dependencies": [ { "version_requirement": ">= 1.1.0", "name": "puppetlabs/xinetd" } ], "summary": "Puppet Labs TFTP Module", "version": "0.2.1", "description": "Manage tftp service and files for Debian/Ubuntu.", "author": "Puppet Labs", "source": "git://github.com/puppetlabs/puppetlabs-tftp", "license": "Apache 2.0", "types": [ ], "project_page": "https://github.com/puppetlabs/puppetlabs-tftp", "name": "puppetlabs-tftp", "checksums": { "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/puppetlabs_spec_helper.rb": "b8e2c657fb91ba7129e679d133169986", "manifests/params.pp": "da87a69afa771701872d56a6cc8c4963", "spec/puppetlabs_spec/files.rb": "5f7d2da815b3545f1e3347fac84a36c8", "CHANGELOG": "9fde5aeecaeda98d81f26a0b623cc425", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/classes/tftp_spec.rb": "d4a1fc79d14aec4ce5bbaac67f994615", "README.md": "af85366f9723d011bac99da45bfea586", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "spec/puppetlabs_spec/matchers.rb": "8e77dc7317de7fc2ff289fb716623b6c", "spec/puppetlabs_spec/fixtures.rb": "795629c4bcad28bf3bb91ff6e5ce97b1", "spec/defines/tftp_file_spec.rb": "5f52f9600ed8300e94da44fdf2a4d858", "tests/init.pp": "d6d93d3ff8a806917f27c99b8433fb95", "templates/tftpd-hpa.erb": "78808d309b535a4335ac8e569a9313ac", "manifests/file.pp": "b7ccecb2650226fb07bb26cc6660f520", "Modulefile": "07bf86113efa06a30e814cd5cbf239ca", "manifests/init.pp": "f1c9f4cfd5c1aec9474cf68904c8dbfa" } }, "tags": [ "debian", "ubuntu", "tftp", "centos", "rhel" ], "file_uri": "/v3/files/puppetlabs-tftp-0.2.1.tar.gz", "file_size": 8257, "file_md5": "a0a26ab3378ab171f48dd1560bf1e9de", "downloads": 14200, "readme": "

puppet tftp module

\n\n

Overview

\n\n

Install tftp-hpa package and configuration files

\n\n

This module will install TFTP as a xinetd service by default. It can be overridden to run as a standalone daemon by setting the inetd parameter to false.

\n\n

Usage

\n\n

class tftp

\n\n

Parameters:

\n\n
    \n
  • username: tftp daemon user, default tftp(debian) or nobody(redhat).
  • \n
  • directory: service directory, deafult see params class.
  • \n
  • address: bind address, default 0.0.0.0.
  • \n
  • port: bind port, default 69.
  • \n
  • options: service option, default --secure.
  • \n
  • inetd: run service via xinetd, default true.
  • \n
\n\n

Example:

\n\n
class tftp {\n  directory => '/opt/tftp',\n  address   => $::ipaddress,\n  options   => '--ipv6 --timeout 60',\n}\n
\n\n

tftp::file

\n\n

Parameters:

\n\n
    \n
  • ensure: file type, default file.
  • \n
  • owner: file owner, default tftp.
  • \n
  • group: file group. default tftp.
  • \n
  • mode: file mode, default 0644 (puppet will change to 0755 for directories).
  • \n
  • content: file content.
  • \n
  • source: file source, defaults to puppet:///module/${caller_module_name}/${name} for files without content.
  • \n
  • recurse: directory recurse, default false.
  • \n
  • purge: directory recurse and purge.
  • \n
  • replace: replace directory with file or symlink, default undef.
  • \n
  • recurselimit: directory recurse limit, default undef.
  • \n
\n\n

Example:

\n\n
tftp::file { 'pxelinux.0':\n  source => 'puppet:///modules/acme/pxelinux.0',\n}\n\ntftp::file { 'pxelinux.cfg':\n  ensure => directory,\n}\n\ntftp::file { 'pxelinux.cfg/default':\n  ensure => file,\n  source => 'puppet:///modules/acme/pxelinux.cfg/default',\n}\n
\n\n

The last example can be abbreviated to the following if it's in the acme module:

\n\n
tftp::file { 'pxelinux.cfg/default': }\n
\n\n

Example

\n\n
    \n
  1. tftp directories not in the OS package defaults should be managed as file resources.
  2. \n
  3. customization for the class tftp must be declared before using tftp::file resources.
  4. \n
\n\n

Example:

\n\n
file { '/opt/tftp':\n  ensure => directory,\n}\n\nclass { 'tftp':\n  directory => '/opt/tftp',\n  address   => $::ipaddress,\n}\n\ntftp::file { 'pxelinux.0':\n  source => 'puppet:///modules/acme/pxelinux.0',\n}\n
\n\n

The examples use a module acme and the tftp files should be placed in calling module path i.e. (/etc/puppet/modules/acme/files).

\n\n

Supported Platforms

\n\n

The module have been tested on the following operating systems. Testing and patches for other platforms are welcomed.

\n\n
    \n
  • Debian Wheezy
  • \n
  • Ubuntu Oneiric
  • \n
  • CentOS
  • \n
\n
", "changelog": "
0.2.1 2012-08-21 Puppet Labs <info@puppetlabs.com>\n\n* Fix permission issues related to xinetd\n\n0.2.0 2012-07-27 Puppet Labs <info@puppetlabs.com>\n\n* Add support for RHEL/CentOS\n* Use xinetd rather than inetd\n* Enable xinetd by default\n\n0.1.1 2012-06-25 Puppet Labs <info@puppetlabs.com>\n\n* Add recurse support for tftp::file.\n* Add source defaults for tftp::file.\n* Add travis ci and puppet spec_helper support.\n\n0.1.0 2012-05-1 Puppet Labs <info@puppetlabs.com>\n\n* Initial release of module.\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-21 21:02:20 -0700", "updated_at": "2012-08-21 21:02:20 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-tftp-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-tftp-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-tftp-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-tftp-0.1.0", "version": "0.1.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-tftp", "issues_url": "https://tickets.puppetlabs.com" } ] } puppet_forge-5.0.3/spec/fixtures/v3/bases/0000755000004100000410000000000014515571425020507 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/bases/puppet.headers0000644000004100000410000000062014515571425023357 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 285 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 12 Nov 2012 14:51:00 GMT X-Node: forgeapi02 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/bases/puppet.json0000644000004100000410000000006514515571425022720 0ustar www-datawww-data{ "uri": "/v3/bases/puppet", "username": "foo" } puppet_forge-5.0.3/spec/fixtures/v3/modules__query=apache.headers0000644000004100000410000000062314515571425025243 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 335315 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 06 Jan 2014 22:42:07 GMT X-Node: forgeapi04 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/modules.headers0000644000004100000410000000062314515571425022420 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:08 GMT Content-Type: application/json;charset=utf-8 Content-Length: 671286 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 06 Jan 2014 22:42:07 GMT X-Node: forgeapi03 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases__module=puppetlabs-apache.headers0000644000004100000410000000062314515571425027673 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 488359 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Thu, 05 Dec 2013 23:29:14 GMT X-Node: forgeapi04 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/modules/0000755000004100000410000000000014515571425021062 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/modules/puppetlabs-apache.json0000644000004100000410000027523414515571425025370 0ustar www-datawww-data{ "uri": "/v3/modules/puppetlabs-apache", "slug": "puppetlabs-apache", "name": "apache", "downloads": 81387, "created_at": "2010-05-20 22:43:19 -0700", "updated_at": "2014-01-06 14:42:07 -0800", "owner": { "uri": "/v3/users/puppetlabs", "slug": "puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "slug": "puppetlabs-apache-0.10.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.10.0", "metadata": { "name": "puppetlabs-apache", "version": "0.10.0", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`, `apache2ctl`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs\n\nRequired binaries: `apachectl`. Default for `osfamily` == `redhat`." } ] } ], "checksums": { "CHANGELOG.md": "2ed7b976e9c4542fd1626006cb44783b", "CONTRIBUTING.md": "5520c75162725951733fa7d88e57f31f", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "13733647826ec5cff955b593fd9a9c5c", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "560b5e9d2b04ddbc23f3803645bfbda5", "README.md": "c937c2d34a76185fe8cfc61d671c47ec", "README.passenger.md": "0316c4a152fd51867ece8ea403250fcb", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/confd/no_accf.pp": "c44b75749a3a56c0306433868d6b762c", "manifests/default_confd_files.pp": "7cbc2f15bfd34eb2f5160c671775c0f6", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/default_mods.pp": "ea267ac599fc3d76db6298c3710cee60", "manifests/dev.pp": "639ba24711be5d7cea0c792e05008c86", "manifests/init.pp": "ffc69874d88f7ac581138fbf47d04d04", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod/alias.pp": "3c144a2aa8231de61e68eced58dc9287", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/authnz_ldap.pp": "10c795251b2327614ef0b433591ed128", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "d218c11d4798453d6075f8f1553c94de", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "a166fc9b780abea2eec1ab723ce3a773", "manifests/mod/dav_svn.pp": "641911969d921123865e6566954c0edb", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "f19193d4f119224e19713e0c96a0de6d", "manifests/mod/event.pp": "e48aefd215dd61980f0b9c4d16ef094a", "manifests/mod/expires.pp": "a9b7537846258af84f12b8ce3510dfa8", "manifests/mod/fastcgi.pp": "fec8afea5424f25109a0b7ca912b16b1", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "7c32234950dc74354b06a2da15197179", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "0fa7835f270e511616927afe01a0526c", "manifests/mod/mime_magic.pp": "fe249dd7e1faa5ec5dd936877c64e856", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/nss.pp": "f7a7efaac854599aa7b872665eb5d93c", "manifests/mod/passenger.pp": "e6c48c22a69933b0975609f2bacf2b5d", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/peruser.pp": "3a2eaab65d7be2373740302eac33e5b1", "manifests/mod/php.pp": "a3725f487f58eb354c84a4fee704daa9", "manifests/mod/prefork.pp": "84b64cb7b46ab0c544dfecb476d65e3d", "manifests/mod/proxy.pp": "eb1e8895edee5e97edc789923fc128c8", "manifests/mod/proxy_ajp.pp": "f9b72f1339cc03f068fa684f38793120", "manifests/mod/proxy_balancer.pp": "5ab6987614f8a1afde3a8b701fbbe22a", "manifests/mod/proxy_html.pp": "1a96fd029a305eb88639bf5baf06abdd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/rpaf.pp": "1125f0c5296ca584fa71de474c95475f", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "c8ab5728fda7814dace9a8eebf13476c", "manifests/mod/status.pp": "d7366470082970ac62984581a0ea3fd7", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "b1809ac41b322b090be410d41e57157e", "manifests/mod/wsgi.pp": "a0073502c2267d7e72caaf9f4942ab7c", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/mod.pp": "2d4ab8907db92e50c5ed6e1357fed9fb", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/package.pp": "c32ba42fe3ab4acc49d2e28258108ba1", "manifests/params.pp": "221fa0dcbdd00066e074bc443c0d8fdb", "manifests/peruser/multiplexer.pp": "712017c1d1cee710cd7392a4c4821044", "manifests/peruser/processor.pp": "293fcb9d2e7ae98b36f544953e33074e", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "56e90e48165989a7df3360dc55b01360", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost/custom.pp": "58bd40d3d12d01549545b85667855d38", "manifests/vhost.pp": "41c68c9ef48c3ef9d1c4feb167d71dd2", "spec/classes/apache_spec.rb": "70ebba6cbb794fe0239b0e353796bae9", "spec/classes/dev_spec.rb": "051fcee20c1b04a7d52481c4a23682b3", "spec/classes/mod/auth_kerb_spec.rb": "229c730ac88b05c4ea4e64d395f26f27", "spec/classes/mod/authnz_ldap_spec.rb": "19cef4733927bc3548af8c75a66a8b11", "spec/classes/mod/dav_svn_spec.rb": "b41e721c0b5c7bac1295187f89d27ab7", "spec/classes/mod/dev_spec.rb": "81d37ad0a51e6cae22e79009e719d648", "spec/classes/mod/dir_spec.rb": "a8d473ce36e0aaec0f9f3463cd4bb549", "spec/classes/mod/event_spec.rb": "cce445ab0a7140bdb50897c6f692ec17", "spec/classes/mod/fastcgi_spec.rb": "ff35691208f95aee61150682728c2891", "spec/classes/mod/fcgid_spec.rb": "ca3ee773bdf9ac82e63edee4411d0281", "spec/classes/mod/info_spec.rb": "90f35932812cc86058b6ccfd48eba6e8", "spec/classes/mod/itk_spec.rb": "261aa7759e232f07d70b102f0e8ab828", "spec/classes/mod/mime_magic_spec.rb": "a3748b9bd66514b56aa29a377a233606", "spec/classes/mod/passenger_spec.rb": "ece983e4b228f99f670a5f98878f964b", "spec/classes/mod/perl_spec.rb": "123e73d8de752e83336bed265a354c08", "spec/classes/mod/peruser_spec.rb": "72d00a427208a3bc0dda5578d36e7b0e", "spec/classes/mod/php_spec.rb": "3907e0075049b0d3cdadb17445acae2d", "spec/classes/mod/prefork_spec.rb": "537882d6f314a17c3ead6f51a67b20b8", "spec/classes/mod/proxy_html_spec.rb": "3587873d56172c431f93a78845b7d24e", "spec/classes/mod/python_spec.rb": "9011cd2ac1d452daec091e5cf337dbe7", "spec/classes/mod/rpaf_spec.rb": "b419712d8e6acbe00f5c4034161e40af", "spec/classes/mod/ssl_spec.rb": "969111556de99092152735764194d267", "spec/classes/mod/status_spec.rb": "a1f70673810840e591ac25a1803c39d7", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "cf005d3606362360f7fcccce04e53be6", "spec/classes/mod/wsgi_spec.rb": "37ad1d623b1455e237a75405776d58d9", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "d522ae1652cc87a4b9c6e33034ee5774", "spec/defines/mod_spec.rb": "80d167b475191b63713087462e960a44", "spec/defines/vhost_spec.rb": "89905755a72b938e99f4a01ef64203e9", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "6f29d603a809ae6208243911c0b250e4", "spec/system/default_mods_spec.rb": "fff758602ee95ee67cad2abc71bc54fb", "spec/system/itk_spec.rb": "c645ac3b306da4d3733c33f662959e36", "spec/system/mod_php_spec.rb": "b823cdcfe4288359a3d2dfd70868691d", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "a6f1b3fb3024a0dce75e45a7c2d6cfd0", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "86e147833f1acebf2b08451f02919581", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0", "templates/httpd.conf.erb": "6e768a748deb4737a8faf82ea80196c1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "e65c27aafd88c825ab35b34dd04221ea", "templates/mod/authnz_ldap.conf.erb": "12c9a1482694ddad3143e5eef03fb531", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/event.conf.erb": "dc4223dfb2729e54d4a33cdec03bd518", "templates/mod/fastcgi.conf.erb": "8692d14c4462335c845eede011f6db2f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "8f953519790a5900369fb656054cae35", "templates/mod/mime_magic.conf.erb": "f910e66299cba6ead5f0444e522a0c76", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/nss.conf.erb": "9a9667d308f0783448ca2689b9fc2b93", "templates/mod/passenger.conf.erb": "68a350cf4cf037c2ae64f015cc7a61a3", "templates/mod/peruser.conf.erb": "ac1c2bf2a771ed366f688ec337d6da02", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "38668e1cb5a19d7708e9d26f99e21264", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "907dc25931c6bdb7ce4b61a81be788f8", "templates/mod/status.conf.erb": "afb05015a8337b232127199aa085a023", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "125949c9120aee15303ad755e105d852", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost/_aliases.erb": "e5e3ba8a9ce994334644bd19ad342d8b", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "eca2a0abc3a23d1e08b1132baeade372", "templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2", "templates/vhost/_fastcgi.erb": "e0a1702445e9be189dabe04b829acd7f", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "1f9cc42aaafb80a658294fc39cf61395", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "9c714277eaad73d05d073c1b6c62106a", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "e9fca0c12325af10797b80d827dfddee", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "templates/vhost.conf.erb": "5dc0337da18ff36184df07343982dc93", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mod_load_params.pp": "5981af4d625a906fce1cedeb3f70cb90", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "60e7939034d531dd6b95af35338bcbe7", "tests/vhost.pp": "164bec943d7d5eee1ad6d6c41fe7c28e", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.10.0.tar.gz", "file_size": 85004, "file_md5": "4036f35903264c9b6e3289455cfee225", "downloads": 6389, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
  • /etc/make.conf on FreeBSD
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods        => false,\n      default_confd_files => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with IP address different than '*'

\n\n
    apache::vhost { 'subdomain.example.com':\n      ip      => '127.0.0.1',\n      port    => '80',\n      docrout => '/var/www/subdomain',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n      directories         => { path => '/home/appuser/myphpapp',\n        'suphp'           => { user => 'myappuser', group => 'myappgroup' },\n      }\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

Starting 2.2.16, httpd supports FallbackResource which is a simple replace for common RewriteRules:

\n\n
    apache::vhost { 'wordpress.example.com':\n      port                => '80',\n      docroot             => '/var/www/wordpress',\n      fallbackresource    => '/index.php',\n    }\n
\n\n

Please note that the disabled argument to FallbackResource is only supported since 2.2.24.

\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_confd_files
\n\n

Generates default set of include-able apache configuration files under ${apache::confd_dir} directory. These configuration files correspond to what is usually installed with apache package on given platform.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian, /usr/local/etc/apache22/server.crt for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian, /usr/local/etc/apache22/server.key for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_name
\n\n

Name of apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted. Defaults to 'true'.

\n\n
service_ensure
\n\n

Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.

\n\n
purge_configs
\n\n

Removes all other apache configs and vhosts, which is automatically set to true. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise managed configuration. It is recommended that you move your configuration entirely to resources within this module.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat, /etc/apache2 on Debian and /usr/local on FreeBSD.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat and /etc/apache2 on Debian.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork or apache::mod::worker classes with parameters. All possible values are event, itk, peruser, prefork, worker (valid values depend on agent's OS), or the boolean false. Defaults to prefork on RedHat and FreeBSD and worker on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing $mpm_module one has to deinstall all packages that depend on currently installed apache.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
log_level
\n\n

Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are emerg, alert, crit, error, warn, notice, info or debug.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n
server_tokens
\n\n

Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'.

\n\n
server_signature
\n\n

Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'.

\n\n
trace_enable
\n\n

Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for 'TraceEnable'. Defaults to 'On'.

\n\n
manage_user
\n\n

Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.

\n\n
manage_group
\n\n

Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.

\n\n
package_ensure
\n\n

Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • dav_svn
  • \n
  • deflate
  • \n
  • dev
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • event
  • \n
  • fastcgi
  • \n
  • fcgid
  • \n
  • headers
  • \n
  • info
  • \n
  • itk
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic*
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • nss*
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • peruser
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_ajp
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • rewrite
  • \n
  • rpaf*
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status*
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • vhost_alias
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template. These are the defaults:

\n\n
    class { 'apache::mod::ssl':\n      ssl_compression => false,\n      ssl_options     => [ 'StdEnvVars' ],\n  }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n      wsgi_python_path   => '/path/to/virtenv/site-packages',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias or AliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [\n  { aliasmatch => '^/image/(.*)\\.jpg$', path => '/files/jpg.images/$1.jpg' }\n  { alias      => '/image',             path => '/ftp/pub/image' },\n],\n
\n\n

For Alias and AliasMatch to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block. The Alias and AliasMatch directives are created in the order specified in the aliases paramter. As described in the mod_alias documentation more specific Alias or AliasMatch directives should come before the more general ones to avoid shadowing.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. An optional provider defaults to directory. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

provider can be set to any of directory, files, or location. If the pathspec starts with a ~, httpd will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch, respectively.

\n\n
    apache::vhost { 'files.example.net':\n      docroot     => '/var/www/files',\n      directories => [\n        { path => '~ (\\.swp|\\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },\n      ],\n    }\n
\n\n

The directives will be embedded within the Directory (Files, or Location) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this directory. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      directories => [ { path => '/srv/www'\n        error_documents => [\n          { 'error_code' => '503', 'document' => '/service-unavail' },\n        ],\n      }]\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
index_options
\n\n

Styles the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],\n    }\n
\n\n
index_order_default
\n\n

Sets the order of the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
ssl_options
\n\n

String or list of SSLOptions for the given <Directory> block. This overrides, or refines the SSLOptions of the parent block (either vhost, or server).

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', ssl_options => '+ExportCertData' }\n        { path => '/path/to/different/dir', ssl_options => [ '-StdEnvVars', '+ExportCertData'] },\n      ],\n    }\n
\n\n
suphp
\n\n

An array containing two values: User and group for the suPHP_UserGroup setting.\nThis directive must be used with suphp_engine => on in the vhost declaration. This directive only works in <Directory> or <Location>.

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', suphp => { user =>  'myappuser', group => 'myappgroup' }\n      ],\n    }\n
\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
directoryindex
\n\n

Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this vhost. Defaults to []. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      error_documents => [\n        { 'error_code' => '503', 'document' => '/service-unavail' },\n        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },\n      ],\n    }\n
\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
fastcgi_server
\n\n

Specifies the filename as an external FastCGI application. Defaults to 'undef'.

\n\n
fastcgi_socket
\n\n

Filename used to communicate with the web server. Defaults to 'undef'.

\n\n
fastcgi_dir
\n\n

Directory to enable for FastCGI. Defaults to 'undef'.

\n\n
additional_includes
\n\n

Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
log_level
\n\n

Specifies the verbosity level of the error log. Defaults to warn for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for log_level is one of emerg, alert, crit, error, warn, notice, info or debug.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
scriptaliases
\n\n

Passes a list of hashes to the vhost to create ScriptAlias or ScriptAliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
    scriptaliases => [\n      {\n        alias => '/myscript',\n        path  => '/usr/share/myscript',\n      },\n      {\n        aliasmatch => '^/foo(.*)',\n        path       => '/usr/share/fooscripts$1',\n      },\n      {\n        aliasmatch => '^/bar/(.*)',\n        path       => '/usr/share/bar/wrapper.sh/$1',\n      },\n      {\n        alias => '/neatscript',\n        path  => '/usr/share/neatscript',\n      },\n    ]\n
\n\n

These directives are created in the order specified. As with Alias and AliasMatch directives the more specific aliases should come before the more general ones to avoid shadowing.

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_protocol
\n\n

Specifies the SSL Protocol (SSLProtocol).

\n\n
ssl_cipher
\n\n

Specifies the SSLCipherSuite.

\n\n
ssl_honorcipherorder
\n\n

Sets SSLHonorCipherOrder directive, used to prefer the server's cipher preference order

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs on Debian and /etc/pki/tls/certs on RedHat.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
ssl_verify_client
\n\n

Sets SSLVerifyClient directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_client => 'optional',\n    }\n
\n\n
ssl_verify_depth
\n\n

Sets SSLVerifyDepth directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_depth => 1,\n    }\n
\n\n
ssl_options
\n\n

Sets SSLOptions directives as per the Apache Core documentation. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => '+ExportCertData',\n    }\n
\n\n

An array of strings example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => [ '+StrictRequire', '+ExportCertData' ],\n    }\n
\n\n
ssl_proxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

On FreeBSD you're required to define apache::package or apache class before apache::dev.

\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "

2013-12-05 Release 0.10.0

\n\n

Summary:

\n\n

This release adds FreeBSD osfamily support and various other improvements to some mods.

\n\n

Features:

\n\n
    \n
  • Add suPHP_UserGroup directive to directory context
  • \n
  • Add support for ScriptAliasMatch directives
  • \n
  • Set SSLOptions StdEnvVars in server context
  • \n
  • No implicit entry for ScriptAlias path
  • \n
  • Add support for overriding ErrorDocument
  • \n
  • Add support for AliasMatch directives
  • \n
  • Disable default "allow from all" in vhost-directories
  • \n
  • Add WSGIPythonPath as an optional parameter to mod_wsgi.
  • \n
  • Add mod_rpaf support
  • \n
  • Add directives: IndexOptions, IndexOrderDefault
  • \n
  • Add ability to include additional external configurations in vhost
  • \n
  • need to use the provider variable not the provider key value from the directory hash for matches
  • \n
  • Support for FreeBSD and few other features
  • \n
  • Add new params to apache::mod::mime class
  • \n
  • Allow apache::mod to specify module id and path
  • \n
  • added $server_root parameter
  • \n
  • Add Allow and ExtendedStatus support to mod_status
  • \n
  • Expand vhost/_directories.pp directive support
  • \n
  • Add initial support for nss module (no directives in vhost template yet)
  • \n
  • added peruser and event mpms
  • \n
  • added $service_name parameter
  • \n
  • add parameter for TraceEnable
  • \n
  • Make LogLevel configurable for server and vhost
  • \n
  • Add documentation about $ip
  • \n
  • Add ability to pass ip (instead of wildcard) in default vhost files
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Don't listen on port or set NameVirtualHost for non-existent vhost
  • \n
  • only apply Directory defaults when provider is a directory
  • \n
  • Working mod_authnz_ldap support on Debian/Ubuntu
  • \n
\n\n

2013-09-06 Release 0.9.0

\n\n

Summary:

\n\n

This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.

\n\n

Backwards-incompatible Changes:

\n\n
    \n
  • Remove many default mods that are not normally needed.
  • \n
  • Remove rewrite_base apache::vhost parameter; did not work anyway.
  • \n
  • Specify dependencies on stdlib >=2.4.0 (this was already the case, but\nmaking explicit)
  • \n
  • Deprecate a2mod in favor of the apache::mod::* classes and apache::mod\ndefined resource.
  • \n
\n\n

Features:

\n\n
    \n
  • apache class\n\n
      \n
    • Add httpd_dir parameter to change the location of the configuration\nfiles.
    • \n
    • Add logroot parameter to change the logroot
    • \n
    • Add ports_file parameter to changes the ports.conf file location
    • \n
    • Add keepalive parameter to enable persistent connections
    • \n
    • Add keepalive_timeout parameter to change the timeout
    • \n
    • Update default_mods to be able to take an array of mods to enable.
    • \n
  • \n
  • apache::vhost\n\n
      \n
    • Add wsgi_daemon_process, wsgi_daemon_process_options,\nwsgi_process_group, and wsgi_script_aliases parameters for per-vhost\nWSGI configuration.
    • \n
    • Add access_log_syslog parameter to enable syslogging.
    • \n
    • Add error_log_syslog parameter to enable syslogging of errors.
    • \n
    • Add directories hash parameter. Please see README for documentation.
    • \n
    • Add sslproxyengine parameter to enable SSLProxyEngine
    • \n
    • Add suphp_addhandler, suphp_engine, and suphp_configpath for\nconfiguring SuPHP.
    • \n
    • Add custom_fragment parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)
    • \n
  • \n
  • Add apache::mod::suphp class for configuring SuPHP.
  • \n
  • Add apache::mod::itk class for configuring ITK mpm module.
  • \n
  • Update apache::mod::wsgi class for global WSGI configuration with\nwsgi_socket_prefix and wsgi_python_home parameters.
  • \n
  • Add README.passenger.md to document the apache::mod::passenger usage.\nAdded passenger_high_performance, passenger_pool_idle_time,\npassenger_max_requests, passenger_stat_throttle_rate, rack_autodetect,\nand rails_autodetect parameters.
  • \n
  • Separate the httpd service resource into a new apache::service class for\ndependency chaining of Class['apache'] -> <resource> ~>\nClass['apache::service']
  • \n
  • Added apache::mod::proxy_balancer class for apache::balancer
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Change dependency to puppetlabs-concat
  • \n
  • Fix ruby 1.9 bug for a2mod
  • \n
  • Change servername to be $::hostname if there is no $::fqdn
  • \n
  • Make /etc/ssl/certs the default ssl certs directory for RedHat non-5.
  • \n
  • Make php the default php package for RedHat non-5.
  • \n
  • Made aliases able to take a single alias hash instead of requiring an\narray.
  • \n
\n\n

2013-07-26 Release 0.8.1

\n\n

Bugfixes:

\n\n
    \n
  • Update apache::mpm_module detection for worker/prefork
  • \n
  • Update apache::mod::cgi and apache::mod::cgid detection for\nworker/prefork
  • \n
\n\n

2013-07-16 Release 0.8.0

\n\n

Features:

\n\n
    \n
  • Add servername parameter to apache class
  • \n
  • Add proxy_set parameter to apache::balancer define
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix ordering for multiple apache::balancer clusters
  • \n
  • Fix symlinking for sites-available on Debian-based OSs
  • \n
  • Fix dependency ordering for recursive confdir management
  • \n
  • Fix apache::mod::* to notify the service on config change
  • \n
  • Documentation updates
  • \n
\n\n

2013-07-09 Release 0.7.0

\n\n

Changes:

\n\n
    \n
  • Essentially rewrite the module -- too many to list
  • \n
  • apache::vhost has many abilities -- see README.md for details
  • \n
  • apache::mod::* classes provide httpd mod-loading capabilities
  • \n
  • apache base class is much more configurable
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Many. And many more to come
  • \n
\n\n

2013-03-2 Release 0.6.0

\n\n
    \n
  • update travis tests (add more supported versions)
  • \n
  • add access log_parameter
  • \n
  • make purging of vhost dir configurable
  • \n
\n\n

2012-08-24 Release 0.4.0

\n\n

Changes:

\n\n
    \n
  • include apache is now required when using apache::mod::*
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix syntax for validate_re
  • \n
  • Fix formatting in vhost template
  • \n
  • Fix spec tests such that they pass

    \n\n

    2012-05-08 Puppet Labs info@puppetlabs.com - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache

  • \n
\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-05 15:29:14 -0800", "updated_at": "2013-12-05 15:29:14 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "slug": "puppetlabs-apache-0.10.0", "version": "0.10.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "slug": "puppetlabs-apache-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.1", "slug": "puppetlabs-apache-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.0", "slug": "puppetlabs-apache-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.7.0", "slug": "puppetlabs-apache-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "slug": "puppetlabs-apache-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.5.0-rc1", "slug": "puppetlabs-apache-0.5.0-rc1", "version": "0.5.0-rc1" }, { "uri": "/v3/releases/puppetlabs-apache-0.4.0", "slug": "puppetlabs-apache-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.3.0", "slug": "puppetlabs-apache-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.2", "slug": "puppetlabs-apache-0.2.2", "version": "0.2.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.1", "slug": "puppetlabs-apache-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.0", "slug": "puppetlabs-apache-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.1.1", "slug": "puppetlabs-apache-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.4", "slug": "puppetlabs-apache-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.3", "slug": "puppetlabs-apache-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.2", "slug": "puppetlabs-apache-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.1", "slug": "puppetlabs-apache-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apache", "issues_url": "https://tickets.puppetlabs.com" } puppet_forge-5.0.3/spec/fixtures/v3/modules/puppetlabs-apache.headers0000644000004100000410000000062214515571425026015 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 96128 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 06 Jan 2014 22:42:07 GMT X-Node: forgeapi02 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases.json0000644000004100000410000174550414515571425022130 0ustar www-datawww-data{ "pagination": { "limit": 20, "offset": 0, "first": "/v3/releases?limit=20&offset=0", "previous": null, "current": "/v3/releases?limit=20&offset=0", "next": "/v3/releases?limit=20&offset=20", "total": 5744 }, "results": [ { "uri": "/v3/releases/puppetlabs-stdlib-4.1.0", "module": { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "4.1.0", "metadata": { "types": [ { "doc": " A simple resource type intended to be used as an anchor in a composite class.\n\n In Puppet 2.6, when a class declares another class, the resources in the\n interior class are not contained by the exterior class. This interacts badly\n with the pattern of composing complex modules from smaller classes, as it\n makes it impossible for end users to specify order relationships between the\n exterior class and other modules.\n\n The anchor type lets you work around this. By sandwiching any interior\n classes between two no-op resources that _are_ contained by the exterior\n class, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\n This allows the end user of the ntp module to establish require and before\n relationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }\n\n", "parameters": [ { "doc": "The name of the anchor resource.", "name": "name" } ], "name": "anchor", "properties": [ ] }, { "doc": " Ensures that a given line is contained within a file. The implementation\n matches the full line, including whitespace at the beginning and end. If\n the line is not contained in the given file, Puppet will add the line to\n ensure the desired state. Multiple resources may be declared to manage\n multiple lines in the same file.\n\n Example:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\n In this example, Puppet will ensure both of the specified lines are\n contained in the file /etc/sudoers.\n\n", "providers": [ { "doc": "", "name": "ruby" } ], "parameters": [ { "doc": "An arbitrary name used as the identity of the resource.", "name": "name" }, { "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.", "name": "match" }, { "doc": "The line to be appended to the file located by the path parameter.", "name": "line" }, { "doc": "The file Puppet will ensure contains the line specified by the line parameter.", "name": "path" } ], "name": "file_line", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "license": "Apache 2.0", "checksums": { "spec/unit/puppet/parser/functions/uriescape_spec.rb": "8d9e15156d93fe29bfe91a2e83352ff4", "Gemfile": "a7144ac8fdb2255ed7badb6b54f6c342", "spec/unit/facter/root_home_spec.rb": "4f4c4236ac2368d2e27fd2f3eb606a19", "spec/unit/puppet/parser/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", "spec/unit/puppet/parser/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", "spec/unit/puppet/parser/functions/validate_re_spec.rb": "b21292ad2f30c0d43ab2f0c2df0ba7d5", "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a", "lib/puppet/parser/functions/ensure_packages.rb": "ca852b2441ca44b91a984094de4e3afc", "lib/puppet/parser/functions/validate_augeas.rb": "d4acca7b8a9fdada9ae39e5101902cc1", "spec/unit/puppet/parser/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", "tests/has_ip_network.pp": "abc05686797a776ea8c054657e6f7456", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", "spec/unit/puppet/parser/functions/any2array_spec.rb": "167e114cfa222de971bf8be141766b6a", "spec/unit/facter/pe_required_facts_spec.rb": "0ec83db2a004a0d7f6395b34939c53b9", "spec/unit/puppet/parser/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", "lib/facter/root_home.rb": "f559294cceafcf70799339627d94871d", "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", "spec/unit/puppet/parser/functions/is_float_spec.rb": "171fc0e382d9856c2d8db2b70c9ec9cd", "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", "lib/facter/facter_dot_d.rb": "b35b8b59ec579901444f984127f0b833", "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", "spec/spec_helper.rb": "4449b0cafd8f7b2fb440c0cdb0a1f2b3", "lib/puppet/parser/functions/merge.rb": "52281fe881b762e2adfef20f58dc4180", "lib/puppet/parser/functions/validate_slength.rb": "0ca530d1d3b45c3fe2d604c69acfc22f", "spec/unit/puppet/parser/functions/suffix_spec.rb": "c3eed8e40066f2ad56264405c4192f2e", "spec/unit/puppet/parser/functions/validate_bool_spec.rb": "32a580f280ba62bf17ccd30460d357bd", "spec/unit/puppet/parser/functions/str2bool_spec.rb": "60e3eaea48b0f6efccc97010df7d912c", "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", "lib/puppet/parser/functions/delete.rb": "9b17b9f7f820adf02360147c1a2f4279", "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", "LICENSE": "38a048b9d82e713d4e1b2573e370a756", "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", "spec/unit/puppet/parser/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", "spec/unit/puppet/parser/functions/validate_array_spec.rb": "bcd231229554785c4270ca92ef99cb60", "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", "lib/puppet/parser/functions/is_numeric.rb": "0a9bcc49e8f57af81bdfbb7e7c3a575c", "spec/unit/puppet/parser/functions/merge_spec.rb": "a63c0bc2f812e27fbef570d834ef61ce", "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba", "spec/unit/puppet/parser/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", "spec/monkey_patches/publicize_methods.rb": "ce2c98f38b683138c5ac649344a39276", "spec/unit/puppet/parser/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", "lib/puppet/parser/functions/chop.rb": "4691a56e6064b792ed4575e4ad3f3d20", "spec/unit/puppet/parser/functions/validate_cmd_spec.rb": "538db08292a0ecc4cd902a14aaa55d74", "spec/unit/puppet/parser/functions/is_integer_spec.rb": "a302cf1de5ccb494ca9614d2fc2b53c5", "spec/functions/ensure_resource_spec.rb": "3423a445e13efc7663a71c6641d49d07", "spec/unit/puppet/parser/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", "lib/puppet/parser/functions/dirname.rb": "bef7214eb89db3eb8f7ee5fc9dca0233", "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", "spec/unit/puppet/parser/functions/delete_spec.rb": "0d84186ea618523b4b2a4ca0b5a09c9e", "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", "spec/unit/puppet/parser/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", "spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb": "c67b71737bee9936f5261d41a37bad46", "spec/unit/puppet/parser/functions/concat_spec.rb": "c21aaa84609f92290d5ffb2ce8ea4bf5", "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", "CHANGELOG": "344383410cb78409f0c59ecf38e8c21a", "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", "spec/unit/puppet/parser/functions/validate_string_spec.rb": "64a4f681084cba55775a070f7fab5e0c", "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", "lib/puppet/parser/functions/pick.rb": "2bede116a0651405c47e650bbf942abe", "spec/unit/puppet/parser/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", "lib/puppet/parser/functions/ensure_resource.rb": "3f68b8e17a16bfd01455cd73f8e324ba", "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce", "spec/unit/puppet/parser/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", "spec/unit/puppet/parser/functions/num2bool_spec.rb": "8cd5b46b7c8e612dfae3362e3a68a5f9", "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", "lib/puppet/parser/functions/join.rb": "b28087823456ca5cf943de4a233ac77f", "spec/unit/puppet/parser/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", "spec/unit/puppet/parser/functions/validate_augeas_spec.rb": "1d5bcfbf97dc56b45734248a14358d4f", "spec/unit/puppet/parser/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", "lib/puppet/parser/functions/is_function_available.rb": "88c63869cb5df3402bc9756a8d40c16d", "lib/puppet/parser/functions/prefix.rb": "21fd6a2c1ee8370964346b3bfe829d2b", "spec/watchr.rb": "b588ddf9ef1c19ab97aa892cc776da73", "spec/unit/puppet/parser/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", "spec/unit/puppet/parser/functions/validate_slength_spec.rb": "a1b4d805149dc0143e9a57e43e1f84bf", "spec/functions/ensure_packages_spec.rb": "935b4aec5ab36bdd0458c1a9b2a93ad5", "lib/puppet/parser/functions/suffix.rb": "109279db4180441e75545dbd5f273298", "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", "spec/unit/puppet/parser/functions/count_spec.rb": "db98ef89752a7112425f0aade10108e0", "lib/puppet/parser/functions/hash.rb": "9d072527dfc7354b69292e9302906530", "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", "spec/unit/puppet/parser/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", "spec/unit/puppet/parser/functions/get_module_path_spec.rb": "b7ea196f548b1a9a745ab6671295ab27", "lib/puppet/parser/functions/is_integer.rb": "a50ebc15c30bffd759e4a6f8ec6a0cf3", "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", "spec/unit/puppet/parser/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", "spec/unit/puppet/parser/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", "spec/unit/puppet/parser/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", "lib/puppet/parser/functions/chomp.rb": "719d46923d75251f7b6b68b6e015cccc", "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", "spec/unit/puppet/parser/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", "Modulefile": "351bba73290cd526ca7bacd4c7d250dc", "spec/unit/puppet/parser/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", "spec/unit/puppet/type/file_line_spec.rb": "d9f4e08e8b98e565a07f1b995593fa89", "spec/unit/puppet/parser/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", "lib/puppet/parser/functions/concat.rb": "f28a09811ff4d19bb5e7a540e767d65c", "spec/unit/puppet/parser/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", "tests/init.pp": "1d98070412c76824e66db4b7eb74d433", "lib/puppet/provider/file_line/ruby.rb": "a445a57f9b884037320ea37307dbc92b", "tests/has_ip_address.pp": "93ce02915f67ddfb43a049b2b84ef391", "spec/unit/puppet/parser/functions/min_spec.rb": "bf80bf58261117bb24392670b624a611", "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", "lib/puppet/type/file_line.rb": "3e8222cb58f3503b3ea7de3647c602a0", "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", "spec/functions/getparam_spec.rb": "122f37cf9ec7489f1dae10db39c871b5", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "spec/unit/puppet/parser/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", "spec/unit/puppet/parser/functions/max_spec.rb": "5562bccc643443af7e4fa7c9d1e52b8b", "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", "spec/unit/puppet/parser/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", "spec/unit/puppet/parser/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", "spec/unit/puppet/parser/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", "spec/unit/puppet/parser/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", "spec/unit/puppet/parser/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", "lib/puppet/parser/functions/is_domain_name.rb": "fba9f855df3bbf90d72dfd5201f65d2b", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e8cd7432739cb212d40a9148523bd4d7", "spec/unit/puppet/parser/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", "spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb": "1de174be8835ba6fef86b590887bb2cc", "spec/unit/puppet/parser/functions/prefix_spec.rb": "16a95b321d76e773812693c80edfbe36", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "lib/puppet/parser/functions/uriescape.rb": "9ebc34f1b2f319626512b8cd7cde604c", "lib/puppet/parser/functions/floor.rb": "c5a960e9714810ebb99198ff81a11a3b", "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", "spec/unit/puppet/parser/functions/range_spec.rb": "91d69115dea43f62a2dca9a10467d836", "tests/has_interface_with.pp": "59c98b4af0d39fc11d1ef4c7a6dc8f7a", "spec/unit/puppet/parser/functions/is_function_available.rb": "069ef7490eba66424cab75444f36828a", "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", "spec/unit/puppet/parser/functions/flatten_spec.rb": "583c9a70f93e492cfb22ffa1811f6aa0", "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", "lib/puppet/parser/functions/str2bool.rb": "c822a8944747f5624b13f2da0df8db21", "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", "spec/unit/puppet/parser/functions/validate_hash_spec.rb": "8529c74051ceb71e6b1b97c9cecdf625", "spec/unit/puppet/parser/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", "README.markdown": "b63097a958f22abf7999d475a6a4d32a", "spec/unit/puppet/parser/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", "lib/puppet/parser/functions/validate_cmd.rb": "0319a15d24fd077ebabc2f79969f6ab5", "lib/puppet/parser/functions/is_float.rb": "f1b0d333061d31bf0c25bd4c33dc134b", "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", "lib/puppet/parser/functions/validate_bool.rb": "4ddffdf5954b15863d18f392950b88f4", "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", "spec/unit/puppet/parser/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", "spec/unit/puppet/parser/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", "spec/unit/puppet/parser/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", "spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb": "07839082d24d5a7628fd5bce6c8b35c3", "spec/unit/puppet/parser/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", "spec/unit/puppet/type/anchor_spec.rb": "a5478a72a7fab2d215f39982a9230c18", "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", "spec/unit/puppet/parser/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", "spec/unit/puppet/parser/functions/floor_spec.rb": "d01ef7dfe0245d7a0a73d7df13cb02e3", "spec/unit/puppet/parser/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", "spec/unit/puppet/parser/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00", "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", "spec/classes/anchor_spec.rb": "695d65275c3ac310d7fa23b91f8bbb4a", "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", "spec/unit/puppet/parser/functions/pick_spec.rb": "aba6247d3925e373272fca6768fd5403", "spec/unit/puppet/parser/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", "spec/unit/puppet/parser/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", "spec/unit/puppet/parser/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", "spec/unit/facter/util/puppet_settings_spec.rb": "345bcbef720458e25be0190b7638e4d9", "spec/unit/puppet/parser/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", "spec/unit/puppet/parser/functions/dirname_spec.rb": "1d7cf70468c2cfa6dacfc75935322395", "spec/unit/puppet/parser/functions/delete_at_spec.rb": "5a4287356b5bd36a6e4c100421215b8e", "spec/unit/puppet/parser/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", "spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", "lib/puppet/parser/functions/range.rb": "033048bba333fe429e77e0f2e91db25f", "lib/puppet/parser/functions/parseyaml.rb": "00f10ec1e2b050e23d80c256061ebdd7", "spec/unit/puppet/parser/functions/is_numeric_spec.rb": "5f08148803b6088c27b211c446ad3658", "spec/unit/puppet/parser/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6", "CONTRIBUTING.md": "fdddc4606dc3b6949e981e6bf50bc8e5" }, "version": "4.1.0", "description": "Standard Library for Puppet Modules", "source": "git://github.com/puppetlabs/puppetlabs-stdlib.git", "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", "summary": "Puppet Module Standard Library", "dependencies": [ ], "author": "puppetlabs", "name": "puppetlabs-stdlib" }, "tags": [ "puppetlabs", "library", "stdlib", "standard", "stages" ], "file_uri": "/v3/files/puppetlabs-stdlib-4.1.0.tar.gz", "file_size": 67586, "file_md5": "bbf919d7ee9d278d2facf39c25578bf8", "downloads": 628084, "readme": "

Puppet Labs Standard Library

\n\n

\"Build

\n\n

This module provides a "standard library" of resources for developing Puppet\nModules. This modules will include the following additions to Puppet

\n\n
    \n
  • Stages
  • \n
  • Facts
  • \n
  • Functions
  • \n
  • Defined resource types
  • \n
  • Types
  • \n
  • Providers
  • \n
\n\n

This module is officially curated and provided by Puppet Labs. The modules\nPuppet Labs writes and distributes will make heavy use of this standard\nlibrary.

\n\n

To report or research a bug with any part of this module, please go to\nhttp://projects.puppetlabs.com/projects/stdlib

\n\n

Versions

\n\n

This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of Puppet\nEnterprise and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically "merged up" into main. The current\nlist of integration branches are:

\n\n
    \n
  • v2.1.x (v2.1.1 released in PE 1)
  • \n
  • v2.2.x (Never released as part of PE, only to the Forge)
  • \n
  • v2.3.x (Released in PE 2)
  • \n
  • v3.0.x (Never released as part of PE, only to the Forge)
  • \n
  • v4.0.x (Drops support for Puppet 2.7)
  • \n
  • main (mainline development branch)
  • \n
\n\n

The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.

\n\n

Compatibility

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Puppet Versions< 2.62.62.73.x
stdlib 2.xnoyesyesno
stdlib 3.xnonoyesyes
stdlib 4.xnononoyes
\n\n

The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.

\n\n

stdlib 2.x

\n\n

All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.

\n\n

stdlib 3.x

\n\n

The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2 and Puppet 3.

\n\n

stdlib 4.x

\n\n

The 4.0 major release of stdlib drops support for Puppet 2.7. Stdlib 4.x\nsupports Puppet 3. Notably, ruby 1.8.5 is no longer supported though ruby\n1.8.7, 1.9.3, and 2.0.0 are fully supported.

\n\n

Functions

\n\n

abs

\n\n

Returns the absolute value of a number, for example -34.56 becomes\n34.56. Takes a single integer and float value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

any2array

\n\n

This converts any object to an array containing that object. Empty argument\nlists are converted to an empty array. Arrays are left untouched. Hashes are\nconverted to arrays of alternating keys and values.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

bool2num

\n\n

Converts a boolean to a number. Converts the values:\nfalse, f, 0, n, and no to 0\ntrue, t, 1, y, and yes to 1\n Requires a single boolean or string as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

capitalize

\n\n

Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chomp

\n\n

Removes the record separator from the end of a string or an array of\nstrings, for example hello\\n becomes hello.\nRequires a single string or array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chop

\n\n

Returns a new string with the last character removed. If the string ends\nwith \\r\\n, both characters are removed. Applying chop to an empty\nstring returns an empty string. If you wish to merely remove record\nseparators then you should use the chomp function.\nRequires a string or array of strings as input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

concat

\n\n

Appends the contents of array 2 onto array 1.

\n\n

Example:

\n\n
concat(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n

['1','2','3','4','5','6']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

count

\n\n

Takes an array as first argument and an optional second argument.\nCount the number of elements in array that matches second argument.\nIf called with only an array it counts the number of elements that are not nil/undef.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

defined_with_params

\n\n

Takes a resource reference and an optional hash of attributes.

\n\n

Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.

\n\n
user { 'dan':\n  ensure => present,\n}\n\nif ! defined_with_params(User[dan], {'ensure' => 'present' }) {\n  user { 'dan': ensure => present, }\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete

\n\n

Deletes all instances of a given element from an array, substring from a\nstring, or key from a hash.

\n\n

Examples:

\n\n
delete(['a','b','c','b'], 'b')\nWould return: ['a','c']\n\ndelete({'a'=>1,'b'=>2,'c'=>3}, 'b')\nWould return: {'a'=>1,'c'=>3}\n\ndelete('abracadabra', 'bra')\nWould return: 'acada'\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete_at

\n\n

Deletes a determined indexed value from an array.

\n\n

Examples:

\n\n
delete_at(['a','b','c'], 1)\n
\n\n

Would return: ['a','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

dirname

\n\n

Returns the dirname of a path.

\n\n

Examples:

\n\n
dirname('/path/to/a/file.ext')\n
\n\n

Would return: '/path/to/a'

\n\n

downcase

\n\n

Converts the case of a string or all strings in an array to lower case.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

empty

\n\n

Returns true if the variable is empty.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

ensure_packages

\n\n

Takes a list of packages and only installs them if they don't already exist.

\n\n
    \n
  • Type: statement
  • \n
\n\n

ensure_resource

\n\n

Takes a resource type, title, and a list of attributes that describe a\nresource.

\n\n
user { 'dan':\n  ensure => present,\n}\n
\n\n

This example only creates the resource if it does not already exist:

\n\n
ensure_resource('user, 'dan', {'ensure' => 'present' })\n
\n\n

If the resource already exists but does not match the specified parameters,\nthis function will attempt to recreate the resource leading to a duplicate\nresource definition error.

\n\n

An array of resources can also be passed in and each will be created with\nthe type and parameters specified if it doesn't already exist.

\n\n
ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

flatten

\n\n

This function flattens any deeply nested arrays and returns a single flat array\nas a result.

\n\n

Examples:

\n\n
flatten(['a', ['b', ['c']]])\n
\n\n

Would return: ['a','b','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

floor

\n\n

Returns the largest integer less or equal to the argument.\nTakes a single numeric value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

fqdn_rotate

\n\n

Rotates an array a random number of times based on a nodes fqdn.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

get_module_path

\n\n

Returns the absolute path of the specified module for the current\nenvironment.

\n\n

Example:\n $module_path = get_module_path('stdlib')

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getparam

\n\n

Takes a resource reference and name of the parameter and\nreturns value of resource's parameter.

\n\n

Examples:

\n\n
define example_resource($param) {\n}\n\nexample_resource { "example_resource_instance":\n    param => "param_value"\n}\n\ngetparam(Example_resource["example_resource_instance"], "param")\n
\n\n

Would return: param_value

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getvar

\n\n

Lookup a variable in a remote namespace.

\n\n

For example:

\n\n
$foo = getvar('site::data::foo')\n# Equivalent to $foo = $site::data::foo\n
\n\n

This is useful if the namespace itself is stored in a string:

\n\n
$datalocation = 'site::data'\n$bar = getvar("${datalocation}::bar")\n# Equivalent to $bar = $site::data::bar\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

grep

\n\n

This function searches through an array and returns any elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
grep(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['aaa','aaaddd']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_interface_with

\n\n

Returns boolean based on kind and value:

\n\n
    \n
  • macaddress
  • \n
  • netmask
  • \n
  • ipaddress
  • \n
  • network
  • \n
\n\n

has_interface_with("macaddress", "x:x:x:x:x:x")\nhas_interface_with("ipaddress", "127.0.0.1") => true\netc.

\n\n

If no "kind" is given, then the presence of the interface is checked:\nhas_interface_with("lo") => true

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_address

\n\n

Returns true if the client has the requested IP address on some interface.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'ipaddress_IFACE' facts, performing a simple string comparison.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_network

\n\n

Returns true if the client has an IP address within the requested network.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'network_IFACE' facts, performing a simple string comparision.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_key

\n\n

Determine if a hash has a certain key value.

\n\n

Example:

\n\n
$my_hash = {'key_one' => 'value_one'}\nif has_key($my_hash, 'key_two') {\n  notice('we will not reach here')\n}\nif has_key($my_hash, 'key_one') {\n  notice('this will be printed')\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

hash

\n\n

This function converts an array into a hash.

\n\n

Examples:

\n\n
hash(['a',1,'b',2,'c',3])\n
\n\n

Would return: {'a'=>1,'b'=>2,'c'=>3}

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_array

\n\n

Returns true if the variable passed to this function is an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_domain_name

\n\n

Returns true if the string passed to this function is a syntactically correct domain name.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_float

\n\n

Returns true if the variable passed to this function is a float.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_function_available

\n\n

This function accepts a string as an argument, determines whether the\nPuppet runtime has access to a function by that name. It returns a\ntrue if the function exists, false if not.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_hash

\n\n

Returns true if the variable passed to this function is a hash.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_integer

\n\n

Returns true if the variable returned to this string is an integer.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_ip_address

\n\n

Returns true if the string passed to this function is a valid IP address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_mac_address

\n\n

Returns true if the string passed to this function is a valid mac address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_numeric

\n\n

Returns true if the variable passed to this function is a number.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_string

\n\n

Returns true if the variable passed to this function is a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join

\n\n

This function joins an array into a string using a seperator.

\n\n

Examples:

\n\n
join(['a','b','c'], ",")\n
\n\n

Would result in: "a,b,c"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join_keys_to_values

\n\n

This function joins each key of a hash to that key's corresponding value with a\nseparator. Keys and values are cast to strings. The return value is an array in\nwhich each element is one joined key/value pair.

\n\n

Examples:

\n\n
join_keys_to_values({'a'=>1,'b'=>2}, " is ")\n
\n\n

Would result in: ["a is 1","b is 2"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

keys

\n\n

Returns the keys of a hash as an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

loadyaml

\n\n

Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.

\n\n

For example:

\n\n
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

lstrip

\n\n

Strips leading spaces to the left of a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

max

\n\n

Returns the highest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

member

\n\n

This function determines if a variable is a member of an array.

\n\n

Examples:

\n\n
member(['a','b'], 'b')\n
\n\n

Would return: true

\n\n
member(['a','b'], 'c')\n
\n\n

Would return: false

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

merge

\n\n

Merges two or more hashes together and returns the resulting hash.

\n\n

For example:

\n\n
$hash1 = {'one' => 1, 'two', => 2}\n$hash2 = {'two' => 'dos', 'three', => 'tres'}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash =  {'one' => 1, 'two' => 'dos', 'three' => 'tres'}\n
\n\n

When there is a duplicate key, the key in the rightmost hash will "win."

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

min

\n\n

Returns the lowest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

num2bool

\n\n

This function converts a number or a string representation of a number into a\ntrue boolean. Zero or anything non-numeric becomes false. Numbers higher then 0\nbecome true.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parsejson

\n\n

This function accepts JSON as a string and converts into the correct Puppet\nstructure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parseyaml

\n\n

This function accepts YAML as a string and converts it into the correct\nPuppet structure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

pick

\n\n

This function is similar to a coalesce function in SQL in that it will return\nthe first value in a list of values that is not undefined or an empty string\n(two things in Puppet that will return a boolean false value). Typically,\nthis function is used to check for a value in the Puppet Dashboard/Enterprise\nConsole, and failover to a default value like the following:

\n\n
$real_jenkins_version = pick($::jenkins_version, '1.449')\n
\n\n

The value of $real_jenkins_version will first look for a top-scope variable\ncalled 'jenkins_version' (note that parameters set in the Puppet Dashboard/\nEnterprise Console are brought into Puppet as top-scope variables), and,\nfailing that, will use a default value of 1.449.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

prefix

\n\n

This function applies a prefix to all elements in an array.

\n\n

Examples:

\n\n
prefix(['a','b','c'], 'p')\n
\n\n

Will return: ['pa','pb','pc']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

range

\n\n

When given range in the form of (start, stop) it will extrapolate a range as\nan array.

\n\n

Examples:

\n\n
range("0", "9")\n
\n\n

Will return: [0,1,2,3,4,5,6,7,8,9]

\n\n
range("00", "09")\n
\n\n

Will return: 0,1,2,3,4,5,6,7,8,9

\n\n
range("a", "c")\n
\n\n

Will return: ["a","b","c"]

\n\n
range("host01", "host10")\n
\n\n

Will return: ["host01", "host02", ..., "host09", "host10"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reject

\n\n

This function searches through an array and rejects all elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
reject(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['bbb','ccc']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reverse

\n\n

Reverses the order of a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

rstrip

\n\n

Strips leading spaces to the right of the string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

shuffle

\n\n

Randomizes the order of a string or array elements.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

size

\n\n

Returns the number of elements in a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

sort

\n\n

Sorts strings and arrays lexically.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

squeeze

\n\n

Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2bool

\n\n

This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to 'true' and strings that contain things\nlike: 0, f, n, false, no to 'false'.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2saltedsha512

\n\n

This converts a string to a salted-SHA512 password hash (which is used for\nOS X versions >= 10.7). Given any simple string, you will get a hex version\nof a salted-SHA512 password hash that can be inserted into your Puppet\nmanifests as a valid password attribute.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strftime

\n\n

This function returns formatted time.

\n\n

Examples:

\n\n

To return the time since epoch:

\n\n
strftime("%s")\n
\n\n

To return the date:

\n\n
strftime("%Y-%m-%d")\n
\n\n

Format meaning:

\n\n
%a - The abbreviated weekday name (``Sun'')\n%A - The  full  weekday  name (``Sunday'')\n%b - The abbreviated month name (``Jan'')\n%B - The  full  month  name (``January'')\n%c - The preferred local date and time representation\n%C - Century (20 in 2009)\n%d - Day of the month (01..31)\n%D - Date (%m/%d/%y)\n%e - Day of the month, blank-padded ( 1..31)\n%F - Equivalent to %Y-%m-%d (the ISO 8601 date format)\n%h - Equivalent to %b\n%H - Hour of the day, 24-hour clock (00..23)\n%I - Hour of the day, 12-hour clock (01..12)\n%j - Day of the year (001..366)\n%k - hour, 24-hour clock, blank-padded ( 0..23)\n%l - hour, 12-hour clock, blank-padded ( 0..12)\n%L - Millisecond of the second (000..999)\n%m - Month of the year (01..12)\n%M - Minute of the hour (00..59)\n%n - Newline (\n
\n\n

)\n %N - Fractional seconds digits, default is 9 digits (nanosecond)\n %3N millisecond (3 digits)\n %6N microsecond (6 digits)\n %9N nanosecond (9 digits)\n %p - Meridian indicator (AM'' orPM'')\n %P - Meridian indicator (am'' orpm'')\n %r - time, 12-hour (same as %I:%M:%S %p)\n %R - time, 24-hour (%H:%M)\n %s - Number of seconds since 1970-01-01 00:00:00 UTC.\n %S - Second of the minute (00..60)\n %t - Tab character ( )\n %T - time, 24-hour (%H:%M:%S)\n %u - Day of the week as a decimal, Monday being 1. (1..7)\n %U - Week number of the current year,\n starting with the first Sunday as the first\n day of the first week (00..53)\n %v - VMS date (%e-%b-%Y)\n %V - Week number of year according to ISO 8601 (01..53)\n %W - Week number of the current year,\n starting with the first Monday as the first\n day of the first week (00..53)\n %w - Day of the week (Sunday is 0, 0..6)\n %x - Preferred representation for the date alone, no time\n %X - Preferred representation for the time alone, no date\n %y - Year without a century (00..99)\n %Y - Year with century\n %z - Time zone as hour offset from UTC (e.g. +0900)\n %Z - Time zone name\n %% - Literal ``%'' character

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strip

\n\n

This function removes leading and trailing whitespace from a string or from\nevery string inside an array.

\n\n

Examples:

\n\n
strip("    aaa   ")\n
\n\n

Would result in: "aaa"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

suffix

\n\n

This function applies a suffix to all elements in an array.

\n\n

Examples:

\n\n
suffix(['a','b','c'], 'p')\n
\n\n

Will return: ['ap','bp','cp']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

swapcase

\n\n

This function will swap the existing case of a string.

\n\n

Examples:

\n\n
swapcase("aBcD")\n
\n\n

Would result in: "AbCd"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

time

\n\n

This function will return the current time since epoch as an integer.

\n\n

Examples:

\n\n
time()\n
\n\n

Will return something like: 1311972653

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

to_bytes

\n\n

Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

type

\n\n

Returns the type when passed a variable. Type can be one of:

\n\n
    \n
  • string
  • \n
  • array
  • \n
  • hash
  • \n
  • float
  • \n
  • integer
  • \n
  • boolean

  • \n
  • Type: rvalue

  • \n
\n\n

unique

\n\n

This function will remove duplicates from strings and arrays.

\n\n

Examples:

\n\n
unique("aabbcc")\n
\n\n

Will return:

\n\n
abc\n
\n\n

You can also use this with arrays:

\n\n
unique(["a","a","b","b","c","c"])\n
\n\n

This returns:

\n\n
["a","b","c"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

upcase

\n\n

Converts a string or an array of strings to uppercase.

\n\n

Examples:

\n\n
upcase("abcd")\n
\n\n

Will return:

\n\n
ASDF\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

uriescape

\n\n

Urlencodes a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

validate_absolute_path

\n\n

Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.

\n\n

The following values will pass:

\n\n
$my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"\nvalidate_absolute_path($my_path)\n$my_path2 = "/var/lib/puppet"\nvalidate_absolute_path($my_path2)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_absolute_path(true)\nvalidate_absolute_path([ 'var/lib/puppet', '/var/foo' ])\nvalidate_absolute_path([ '/var/lib/puppet', 'var/foo' ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_array

\n\n

Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_array = [ 'one', 'two' ]\nvalidate_array($my_array)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_array(true)\nvalidate_array('some_string')\n$undefined = undef\nvalidate_array($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_augeas

\n\n

Perform validation of a string using an Augeas lens\nThe first argument of this function should be a string to\ntest, and the second argument should be the name of the Augeas lens to use.\nIf Augeas fails to parse the string with the lens, the compilation will\nabort with a parse error.

\n\n

A third argument can be specified, listing paths which should\nnot be found in the file. The $file variable points to the location\nof the temporary file being tested in the Augeas tree.

\n\n

For example, if you want to make sure your passwd content never contains\na user foo, you could write:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo'])\n
\n\n

Or if you wanted to ensure that no users used the '/bin/barsh' shell,\nyou could use:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]']\n
\n\n

If a fourth argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n
validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_bool

\n\n

Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
$some_array = [ true ]\nvalidate_bool("false")\nvalidate_bool("true")\nvalidate_bool($some_array)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_cmd

\n\n

Perform validation of a string with an external command.\nThe first argument of this function should be a string to\ntest, and the second argument should be a path to a test command\ntaking a file as last argument. If the command, launched against\na tempfile containing the passed string, returns a non-null value,\ncompilation will abort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n

Example:

\n\n
validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_hash

\n\n

Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_hash = { 'one' => 'two' }\nvalidate_hash($my_hash)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_hash(true)\nvalidate_hash('some_string')\n$undefined = undef\nvalidate_hash($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_re

\n\n

Perform simple validation of a string against one or more regular\nexpressions. The first argument of this function should be a string to\ntest, and the second argument should be a stringified regular expression\n(without the // delimiters) or an array of regular expressions. If none\nof the regular expressions match the string passed in, compilation will\nabort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

The following strings will validate against the regular expressions:

\n\n
validate_re('one', '^one$')\nvalidate_re('one', [ '^one', '^two' ])\n
\n\n

The following strings will fail to validate, causing compilation to abort:

\n\n
validate_re('one', [ '^two', '^three' ])\n
\n\n

A helpful error message can be returned like this:

\n\n
validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_slength

\n\n

Validate that the first argument is a string (or an array of strings), and\nless/equal to than the length of the second argument. It fails if the first\nargument is not a string or array of strings, and if arg 2 is not convertable\nto a number.

\n\n

The following values will pass:

\n\n

validate_slength("discombobulate",17)\n validate_slength(["discombobulate","moo"],17)

\n\n

The following valueis will not:

\n\n

validate_slength("discombobulate",1)\n validate_slength(["discombobulate","thermometer"],5)

\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_string

\n\n

Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_string = "one two"\nvalidate_string($my_string, 'three')\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_string(true)\nvalidate_string([ 'some', 'array' ])\n$undefined = undef\nvalidate_string($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

values

\n\n

When given a hash this function will return the values of that hash.

\n\n

Examples:

\n\n
$hash = {\n  'a' => 1,\n  'b' => 2,\n  'c' => 3,\n}\nvalues($hash)\n
\n\n

This example would return:

\n\n
[1,2,3]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

values_at

\n\n

Finds value inside an array based on location.

\n\n

The first argument is the array you want to analyze, and the second element can\nbe a combination of:

\n\n
    \n
  • A single numeric index
  • \n
  • A range in the form of 'start-stop' (eg. 4-9)
  • \n
  • An array combining the above
  • \n
\n\n

Examples:

\n\n
values_at(['a','b','c'], 2)\n
\n\n

Would return ['c'].

\n\n
values_at(['a','b','c'], ["0-1"])\n
\n\n

Would return ['a','b'].

\n\n
values_at(['a','b','c','d','e'], [0, "2-3"])\n
\n\n

Would return ['a','c','d'].

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

zip

\n\n

Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.

\n\n

Example:

\n\n
zip(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n
["1", "4"], ["2", "5"], ["3", "6"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

This page autogenerated on 2013-04-11 13:54:25 -0700

\n
", "changelog": "
2013-05-06 - Jeff McCune <jeff@puppetlabs.com> - 4.1.0\n * (#20582) Restore facter_dot_d to stdlib for PE users (3b887c8)\n * (maint) Update Gemfile with GEM_FACTER_VERSION (f44d535)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> - 4.1.0\n * Terser method of string to array conversion courtesy of ethooz. (d38bce0)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Refactor ensure_resource expectations (b33cc24)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Changed str-to-array conversion and removed abbreviation. (de253db)\n\n2013-05-03 - Alex Cline <acline@us.ibm.com> 4.1.0\n * (#20548) Allow an array of resource titles to be passed into the ensure_resource function (e08734a)\n\n2013-05-02 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.1.0\n * Add a dirname function (2ba9e47)\n\n2013-04-29 - Mark Smith-Guerrero <msmithgu@gmail.com> - 4.1.0\n * (maint) Fix a small typo in hash() description (928036a)\n\n2013-04-12 - Jeff McCune <jeff@puppetlabs.com> - 4.0.2\n * Update user information in gemspec to make the intent of the Gem clear.\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.1\n * Fix README function documentation (ab3e30c)\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * stdlib 4.0 drops support with Puppet 2.7\n * stdlib 4.0 preserves support with Puppet 3\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add ability to use puppet from git via bundler (9c5805f)\n\n2013-04-10 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Make stdlib usable as a Ruby GEM (e81a45e)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Add a count function (f28550e)\n\n2013-03-31 - Amos Shapira <ashapira@atlassian.com> - 4.0.0\n * (#19998) Implement any2array (7a2fb80)\n\n2013-03-29 - Steve Huff <shuff@vecna.org> - 4.0.0\n * (19864) num2bool match fix (8d217f0)\n\n2013-03-20 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Allow comparisons of Numeric and number as String (ff5dd5d)\n\n2013-03-26 - Richard Soderberg <rsoderberg@mozilla.com> - 4.0.0\n * add suffix function to accompany the prefix function (88a93ac)\n\n2013-03-19 - Kristof Willaert <kristof.willaert@gmail.com> - 4.0.0\n * Add floor function implementation and unit tests (0527341)\n\n2012-04-03 - Eric Shamow <eric@puppetlabs.com> - 4.0.0\n * (#13610) Add is_function_available to stdlib (961dcab)\n\n2012-12-17 - Justin Lambert <jlambert@eml.cc> - 4.0.0\n * str2bool should return a boolean if called with a boolean (5d5a4d4)\n\n2012-10-23 - Uwe Stuehler <ustuehler@team.mobile.de> - 4.0.0\n * Fix number of arguments check in flatten() (e80207b)\n\n2013-03-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add contributing document (96e19d0)\n\n2013-03-04 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)\n\n2013-02-14 - Joshua Hoblitt <jhoblitt@cpan.org> - 4.0.0\n * (#19272) Add has_element() function (95cf3fe)\n\n2013-02-07 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_augeas function (3a97c23)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_cmd function (6902cc5)\n\n2013-01-14 - David Schmitt <david@dasz.at> - 4.0.0\n * Add geppetto project definition (b3fc0a3)\n\n2013-01-02 - Jaka Hudoklin <jakahudoklin@gmail.com> - 4.0.0\n * Add getparam function to get defined resource parameters (20e0e07)\n\n2013-01-05 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Add Travis CI Support (d082046)\n\n2012-12-04 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Clarify that stdlib 3 supports Puppet 3 (3a6085f)\n\n2012-11-30 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * maint: style guideline fixes (7742e5f)\n\n2012-11-09 - James Fryman <james@frymanet.com> - 4.0.0\n * puppet-lint cleanup (88acc52)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 4.0.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)\n\n2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0\n * (#14670) autorequire a file_line resource's path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0\n * stdlib 3.0 drops support with Puppet 2.6\n * stdlib 3.0 preserves support with Puppet 2.7\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0\n * Add support for a 'match' parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0\n * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2\n * Make file_line default to ensure => present (1373e70)\n * Memoize file_line spec instance variables (20aacc5)\n * Fix spec tests using the new spec_helper (1ebfa5d)\n * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)\n * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)\n * (#13439) Fix test failures with Puppet 2.6.x (665610b)\n * (#13439) refactor spec helper for compatibility with both puppet 2.7 and main (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3\n* (#11607) Add Rakefile to enable spec testing\n* (#12377) Avoid infinite loop when retrying require json\n\n2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0\n* Add a large number of new Puppet functions\n* Backwards compatibility preserved with 2.2.x\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0\n* #10285 - Refactor json to use pson instead.\n* Maint  - Add watchr autotest script\n* Maint  - Make rspec tests work with Puppet 2.6.4\n* #9859  - Add root_home fact and tests\n\n2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* /etc/facter/facts.d\n* /etc/puppetlabs/facter/facts.d\n\n2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0\n* Add R.I. Pienaar's facts.d custom facter fact\n* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are\n  automatically loaded now.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0\n* Rename whole_line to file_line\n* This is an API change and as such motivating a 2.0.0 release according to semver.org.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0\n* Rename append_line to whole_line\n* This is an API change and as such motivating a 1.1.0 release.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0\n* Initial stable release\n* Add validate_array and validate_string functions\n* Make merge() function work with Ruby 1.8.5\n* Add hash merging function\n* Add has_key function\n* Add loadyaml() function\n* Add append_line native\n\n2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Add stdlib::stages class with a standard set of stages\n
", "license": "
Copyright (C) 2011 Puppet Labs Inc\n\nand some parts:\n\nCopyright (C) 2011 Krzysztof Wilczynski\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-05-13 08:31:19 -0700", "updated_at": "2013-05-13 08:31:19 -0700", "deleted_at": null }, { "uri": "/v3/releases/ripienaar-concat-0.2.0", "module": { "uri": "/v3/modules/ripienaar-concat", "name": "concat", "owner": { "uri": "/v3/users/ripienaar", "username": "ripienaar", "gravatar_id": "9482a1c5a9c64c5d7296971f030165b7" } }, "version": "0.2.0", "metadata": { "license": "Apache", "dependencies": [ ], "source": "git://github.com/ripienaar/puppet-concat.git", "version": "0.2.0", "description": "Concat module", "summary": "Concat module", "types": [ ], "author": "R.I.Pienaar", "project_page": "http://github.com/ripienaar/puppet-concat", "name": "ripienaar-concat", "checksums": { "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "files/concatfragments.sh": "256169ee61115a6b717b2844d2ea3128", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "README.markdown": "f0605b99afffca3404e3a80dad951d83", "Modulefile": "5dda7c51425f5337bb3234993a52732f", "CHANGELOG": "543eb3beeb56b779171cff6e181a44cb", "manifests/fragment.pp": "a34e1f60a31bb64eaed22745f70a88e7", "lib/facter/concat_basedir.rb": "f2e991697602ffb3e80e0cc9efa37f3a", "spec/defines/init_spec.rb": "cc8ce111b49906033dbf7837bc6b7495", "manifests/init.pp": "7128c08a525c7bbc8bf4a721ad1c4f3e", "manifests/setup.pp": "dc8d30bc47d447c5bde2c390fd34541c", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "LICENSE": "f5a76685d453424cd63dde1535811cf0" } }, "tags": [ "fileserver", "utilities" ], "file_uri": "/v3/files/ripienaar-concat-0.2.0.tar.gz", "file_size": 9602, "file_md5": "ec5888c7deee6e892b6ca1c8cb79006f", "downloads": 77976, "readme": "

What is it?

\n\n

A Puppet module that can construct files from fragments.

\n\n

Please see the comments in the various .pp files for details\nas well as posts on my blog at http://www.devco.net/

\n\n

Released under the Apache 2.0 licence

\n\n

Usage:

\n\n

If you wanted a /etc/motd file that listed all the major modules\non the machine. And that would be maintained automatically even\nif you just remove the include lines for other modules you could\nuse code like below, a sample /etc/motd would be:

\n\n
\nPuppet modules on this server:\n\n    -- Apache\n    -- MySQL\n
\n\n

Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.

\n\n
\n# class to setup basic motd, include on all nodes\nclass motd {\n   $motd = \"/etc/motd\"\n\n   concat{$motd:\n      owner => root,\n      group => root,\n      mode  => 644\n   }\n\n   concat::fragment{\"motd_header\":\n      target => $motd,\n      content => \"\\nPuppet modules on this server:\\n\\n\",\n      order   => 01,\n   }\n\n   # local users on the machine can append to motd by just creating\n   # /etc/motd.local\n   concat::fragment{\"motd_local\":\n      target => $motd,\n      ensure  => \"/etc/motd.local\",\n      order   => 15\n   }\n}\n\n# used by other modules to register themselves in the motd\ndefine motd::register($content=\"\", $order=10) {\n   if $content == \"\" {\n      $body = $name\n   } else {\n      $body = $content\n   }\n\n   concat::fragment{\"motd_fragment_$name\":\n      target  => \"/etc/motd\",\n      content => \"    -- $body\\n\"\n   }\n}\n\n# a sample apache module\nclass apache {\n   include apache::install, apache::config, apache::service\n\n   motd::register{\"Apache\": }\n}\n
\n\n

Known Issues:

\n\n
    \n
  • Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true for at least the first run.\nYou have this issue if puppet fails to run on the client and you have\na message similar to\n"err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
  • \n
\n\n

Contributors:

\n\n

Paul Elliot

\n\n
    \n
  • Provided 0.24.8 support, shell warnings and empty file creation support.
  • \n
\n\n

Chad Netzer

\n\n
    \n
  • Various patches to improve safety of file operations
  • \n
  • Symlink support
  • \n
\n\n

David Schmitt

\n\n
    \n
  • Patch to remove hard coded paths relying on OS path
  • \n
  • Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
  • \n
\n\n

Peter Meier

\n\n
    \n
  • Basedir as a fact
  • \n
  • Unprivileged user support
  • \n
\n\n

Sharif Nassar

\n\n
    \n
  • Solaris/Nexenta support
  • \n
  • Better error reporting
  • \n
\n\n

Christian G. Warden

\n\n
    \n
  • Style improvements
  • \n
\n\n

Reid Vandewiele

\n\n
    \n
  • Support non GNU systems by default
  • \n
\n\n

**Erik Dalén*

\n\n
    \n
  • Style improvements
  • \n
\n\n

Gildas Le Nadan

\n\n
    \n
  • Documentation improvements
  • \n
\n\n

Paul Belanger

\n\n
    \n
  • Testing improvements and Travis support
  • \n
\n\n

Branan Purvine-Riley

\n\n
    \n
  • Support Puppet Module Tool better
  • \n
\n\n

Dustin J. Mitchell

\n\n
    \n
  • Always include setup when using the concat define
  • \n
\n\n

Andreas Jaggi

\n\n
    \n
  • Puppet Lint support
  • \n
\n\n

Jan Vansteenkiste

\n\n
    \n
  • Configurable paths
  • \n
\n\n

Contact:

\n\n

R.I.Pienaar / rip@devco.net / @ripienaar / http://devco.net

\n
", "changelog": "
CHANGELOG:\n- 2010/02/19 - initial release\n- 2010/03/12 - add support for 0.24.8 and newer\n             - make the location of sort configurable\n             - add the ability to add shell comment based warnings to\n               top of files\n             - add the ablity to create empty files\n- 2010/04/05 - fix parsing of WARN and change code style to match rest\n               of the code\n             - Better and safer boolean handling for warn and force\n             - Don't use hard coded paths in the shell script, set PATH\n               top of the script\n             - Use file{} to copy the result and make all fragments owned\n               by root.  This means we can chnage the ownership/group of the\n               resulting file at any time.\n             - You can specify ensure => "/some/other/file" in concat::fragment\n               to include the contents of a symlink into the final file.\n- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name\n- 2010/05/22 - Improve documentation and show the use of ensure =>\n- 2010/07/14 - Add support for setting the filebucket behavior of files\n- 2010/10/04 - Make the warning message configurable\n- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011/02/03 - Make the shell script more portable and add a config option for root group\n- 2011/06/21 - Make base dir root readable only for security\n- 2011/06/23 - Set base directory using a fact instead of hardcoding it\n- 2011/06/23 - Support operating as non privileged user\n- 2011/06/23 - Support dash instead of bash or sh\n- 2011/07/11 - Better solaris support\n- 2011/12/05 - Use fully qualified variables\n- 2011/12/13 - Improve Nexenta support\n- 2012/04/11 - Do not use any GNU specific extensions in the shell script\n- 2012/03/24 - Comply to community style guides\n- 2012/05/23 - Better errors when basedir isnt set\n- 2012/05/31 - Add spec tests\n- 2012/07/11 - Include concat::setup in concat improving UX\n- 2012/08/14 - Puppet Lint improvements\n- 2012/08/30 - The target path can be different from the $name\n- 2012/08/30 - More Puppet Lint cleanup\n- 2012/09/04 - RELEASE 0.2.0\n
", "license": "
   Copyright 2012 R.I.Pienaar\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2012-09-04 11:44:59 -0700", "updated_at": "2012-09-04 11:44:59 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-concat-1.0.0", "module": { "uri": "/v3/modules/puppetlabs-concat", "name": "concat", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.0", "metadata": { "name": "puppetlabs-concat", "version": "1.0.0", "source": "git://github.com/puppetlabs/puppetlabs-concat.git", "author": "Puppetlabs", "license": "Apache 2.0", "summary": "Concat module", "description": "Concat module", "project_page": "http://github.com/puppetlabs/puppetlabs-concat", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "89220fae3ab04a350132fe94d7a6ca00", "Gemfile": "a913d6f7a0420e07539d8ff1ef047ffb", "LICENSE": "f5a76685d453424cd63dde1535811cf0", "Modulefile": "f99ee2f6778b9e23635ac1027888bbd3", "README": "d15ec3400f628942dd7b7fa8c1a18da3", "README.markdown": "d82e203d729ea4785bdcaca1be166e62", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/concatfragments.sh": "2fbba597a1513eb61229551d35d42b9f", "lib/facter/concat_basedir.rb": "e152593fafe27ef305fc473929c62ca6", "manifests/fragment.pp": "196ee8e405b3a31b84ae618ed54377ed", "manifests/init.pp": "8d0cc8e9cf145ca7a23db05a30252476", "manifests/setup.pp": "2246572410d94c68aff310f8132c55b4", "spec/defines/init_spec.rb": "35e41d4abceba0dca090d3addd92bb4f", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "9c3742bf87d62027f080c6b9fa98b979", "spec/system/basic_spec.rb": "9135d9af6a21f16980ab59b58e91ed9a", "spec/system/concat_spec.rb": "5fe675ec42ca441d0c7e431c31bbc238", "spec/system/empty_spec.rb": "51ab1fc7c86268f1ab1cda72dc5ff583", "spec/system/replace_spec.rb": "275295e6b4f04fc840dc3f87faf56249", "spec/system/warn_spec.rb": "0ea35b44e8f0ac5352256f95115995ce" } }, "tags": [ "concat", "files", "fragments", "templates" ], "file_uri": "/v3/files/puppetlabs-concat-1.0.0.tar.gz", "file_size": 11866, "file_md5": "b46fed82226a08b37428769f4fa6e534", "downloads": 66264, "readme": "

What is it?

\n\n

A Puppet module that can construct files from fragments.

\n\n

Please see the comments in the various .pp files for details\nas well as posts on my blog at http://www.devco.net/

\n\n

Released under the Apache 2.0 licence

\n\n

Usage:

\n\n

If you wanted a /etc/motd file that listed all the major modules\non the machine. And that would be maintained automatically even\nif you just remove the include lines for other modules you could\nuse code like below, a sample /etc/motd would be:

\n\n
\nPuppet modules on this server:\n\n    -- Apache\n    -- MySQL\n
\n\n

Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.

\n\n
\n# class to setup basic motd, include on all nodes\nclass motd {\n   $motd = \"/etc/motd\"\n\n   concat{$motd:\n      owner => root,\n      group => root,\n      mode  => '0644',\n   }\n\n   concat::fragment{\"motd_header\":\n      target => $motd,\n      content => \"\\nPuppet modules on this server:\\n\\n\",\n      order   => 01,\n   }\n\n   # local users on the machine can append to motd by just creating\n   # /etc/motd.local\n   concat::fragment{\"motd_local\":\n      target => $motd,\n      ensure  => \"/etc/motd.local\",\n      order   => 15\n   }\n}\n\n# used by other modules to register themselves in the motd\ndefine motd::register($content=\"\", $order=10) {\n   if $content == \"\" {\n      $body = $name\n   } else {\n      $body = $content\n   }\n\n   concat::fragment{\"motd_fragment_$name\":\n      target  => \"/etc/motd\",\n      content => \"    -- $body\\n\"\n   }\n}\n\n# a sample apache module\nclass apache {\n   include apache::install, apache::config, apache::service\n\n   motd::register{\"Apache\": }\n}\n
\n\n

Detailed documentation of the class options can be found in the\nmanifest files.

\n\n

Known Issues:

\n\n
    \n
  • Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true on the [main] section of your\nnode's '/etc/puppet/puppet.conf' for at least the first run.\nYou have this issue if puppet fails to run on the client and you have\na message similar to\n"err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
  • \n
\n\n

Contributors:

\n\n

Paul Elliot

\n\n
    \n
  • Provided 0.24.8 support, shell warnings and empty file creation support.
  • \n
\n\n

Chad Netzer

\n\n
    \n
  • Various patches to improve safety of file operations
  • \n
  • Symlink support
  • \n
\n\n

David Schmitt

\n\n
    \n
  • Patch to remove hard coded paths relying on OS path
  • \n
  • Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
  • \n
\n\n

Peter Meier

\n\n
    \n
  • Basedir as a fact
  • \n
  • Unprivileged user support
  • \n
\n\n

Sharif Nassar

\n\n
    \n
  • Solaris/Nexenta support
  • \n
  • Better error reporting
  • \n
\n\n

Christian G. Warden

\n\n
    \n
  • Style improvements
  • \n
\n\n

Reid Vandewiele

\n\n
    \n
  • Support non GNU systems by default
  • \n
\n\n

Erik Dalén

\n\n
    \n
  • Style improvements
  • \n
\n\n

Gildas Le Nadan

\n\n
    \n
  • Documentation improvements
  • \n
\n\n

Paul Belanger

\n\n
    \n
  • Testing improvements and Travis support
  • \n
\n\n

Branan Purvine-Riley

\n\n
    \n
  • Support Puppet Module Tool better
  • \n
\n\n

Dustin J. Mitchell

\n\n
    \n
  • Always include setup when using the concat define
  • \n
\n\n

Andreas Jaggi

\n\n
    \n
  • Puppet Lint support
  • \n
\n\n

Jan Vansteenkiste

\n\n
    \n
  • Configurable paths
  • \n
\n\n

Contact:

\n\n

puppet-users@ mailing list.

\n
", "changelog": "
2013-08-09 1.0.0\n\nSummary:\n\nMany new features and bugfixes in this release, and if you're a heavy concat\nuser you should test carefully before upgrading.  The features should all be\nbackwards compatible but only light testing has been done from our side before\nthis release.\n\nFeatures:\n- New parameters in concat:\n - `replace`: specify if concat should replace existing files.\n - `ensure_newline`: controls if fragments should contain a newline at the end.\n- Improved README documentation.\n- Add rspec:system tests (rake spec:system to test concat)\n\nBugfixes\n- Gracefully handle \\n in a fragment resource name.\n- Adding more helpful message for 'pluginsync = true'\n- Allow passing `source` and `content` directly to file resource, rather than\ndefining resource defaults.\n- Added -r flag to read so that filenames with \\ will be read correctly.\n- sort always uses LANG=C.\n- Allow WARNMSG to contain/start with '#'.\n- Replace while-read pattern with for-do in order to support Solaris.\n\nCHANGELOG:\n- 2010/02/19 - initial release\n- 2010/03/12 - add support for 0.24.8 and newer\n             - make the location of sort configurable\n             - add the ability to add shell comment based warnings to\n               top of files\n             - add the ablity to create empty files\n- 2010/04/05 - fix parsing of WARN and change code style to match rest\n               of the code\n             - Better and safer boolean handling for warn and force\n             - Don't use hard coded paths in the shell script, set PATH\n               top of the script\n             - Use file{} to copy the result and make all fragments owned\n               by root.  This means we can chnage the ownership/group of the\n               resulting file at any time.\n             - You can specify ensure => "/some/other/file" in concat::fragment\n               to include the contents of a symlink into the final file.\n- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name\n- 2010/05/22 - Improve documentation and show the use of ensure =>\n- 2010/07/14 - Add support for setting the filebucket behavior of files\n- 2010/10/04 - Make the warning message configurable\n- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011/02/03 - Make the shell script more portable and add a config option for root group\n- 2011/06/21 - Make base dir root readable only for security\n- 2011/06/23 - Set base directory using a fact instead of hardcoding it\n- 2011/06/23 - Support operating as non privileged user\n- 2011/06/23 - Support dash instead of bash or sh\n- 2011/07/11 - Better solaris support\n- 2011/12/05 - Use fully qualified variables\n- 2011/12/13 - Improve Nexenta support\n- 2012/04/11 - Do not use any GNU specific extensions in the shell script\n- 2012/03/24 - Comply to community style guides\n- 2012/05/23 - Better errors when basedir isnt set\n- 2012/05/31 - Add spec tests\n- 2012/07/11 - Include concat::setup in concat improving UX\n- 2012/08/14 - Puppet Lint improvements\n- 2012/08/30 - The target path can be different from the $name\n- 2012/08/30 - More Puppet Lint cleanup\n- 2012/09/04 - RELEASE 0.2.0\n- 2012/12/12 - Added (file) $replace parameter to concat\n
", "license": "
   Copyright 2012 R.I.Pienaar\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-08-14 15:59:00 -0700", "updated_at": "2013-08-14 15:59:00 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apt-1.4.0", "module": { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.4.0", "metadata": { "name": "puppetlabs-apt", "version": "1.4.0", "summary": "Puppet Labs Apt Module", "author": "Evolving Web / Puppet Labs", "description": "APT Module for Puppet", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "0c43f56b0bb8e8d04e8051a0e7aa37a5", ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".nodeset.yml": "78d78c172336a387a1067464434ffbcb", ".travis.yml": "782420dcc9d6412c79c30f03b1f3613c", "CHANGELOG": "f5488e1e891a8f8c47143dac790ddab3", "Gemfile": "1bfa7eb6e30346c9ddb4a8b144b0d255", "Gemfile.lock": "8ff8bc3d32bb7412bd97e48190a93b2f", "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d", "Modulefile": "b34e93626fbc137cbb651952e7509839", "README.md": "65176b395f7202fe5d222ae7b0de4e05", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70", "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd", "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3", "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5", "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5", "manifests/force.pp": "cf871e869f4114f32ab164de2a67e7e2", "manifests/init.pp": "5ec106a7a03313c544159a9a1f6b78e6", "manifests/key.pp": "3cf082ed91a3933ab7218d1be3464f4f", "manifests/params.pp": "ca4ce3730a65c43f884ab3e6445f1661", "manifests/pin.pp": "dea8cbaabc37010ce25838080608802b", "manifests/ppa.pp": "754a83944ae79b5001fc0c0a8c775985", "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9", "manifests/source.pp": "6eab8d33c173a066f5dec8474efdedb6", "manifests/unattended_upgrades.pp": "e97f908b42010ff9a85be4afd2c721ab", "manifests/update.pp": "436c79f160f2cb603710795a9ec71ac7", "spec/classes/apt_spec.rb": "54841b04b42026770ed6d744a82c55df", "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f", "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e", "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7", "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4", "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4", "spec/classes/unattended_upgrades_spec.rb": "a2e206bda79d24cdb43312d035eff66f", "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5", "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c", "spec/defines/force_spec.rb": "97098c5b123be49e321e71cda288fe53", "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0", "spec/defines/pin_spec.rb": "c912e59e9e3d1145280d659cccabe72b", "spec/defines/ppa_spec.rb": "72ce037a1d6ea0a33f369b1f3d98b3d6", "spec/defines/source_spec.rb": "e553bb9598dbe2becba6ae7f91d4deb0", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "e67d2574baae312f1095f90d78fdf5e9", "spec/system/apt_builddep_spec.rb": "97be5a48d2d16d96cb7c35ccdbcdcb69", "spec/system/apt_key_spec.rb": "098835d0c53c69390d4c3b6ea8ef3815", "spec/system/apt_ppa_spec.rb": "c96f6d0bbdafac39beaf0d5e6eba9010", "spec/system/apt_source_spec.rb": "df5aa98b03688884903c564bb507469f", "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6", "spec/system/class_spec.rb": "2ba4265236f00685c23cb00f908defc1", "templates/10periodic.erb": "2aeea866a39f19a62254abbb4f1bc59d", "templates/50unattended-upgrades.erb": "ae995ade214fdaefab51d335c85819ae", "templates/pin.pref.erb": "623249839cee7788fa0805a3474396db", "templates/source.list.erb": "65a016e60daf065c481f3d5f2c883324", "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88", "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb", "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca", "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600", "tests/init.pp": "551138eb704e71ab3687932dda429a81", "tests/key.pp": "371a695e1332d51a38e283a87be52798", "tests/params.pp": "900db40f3fc84b0be173278df2ebff35", "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff", "tests/release.pp": "53ce5debe6fa5bee42821767599cc768", "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98", "tests/unattended-upgrades.pp": "cdc853f1b58e5206c5a538621ddca161" }, "source": "https://github.com/puppetlabs/puppetlabs-apt", "project_page": "https://github.com/puppetlabs/puppetlabs-apt", "license": "Apache License 2.0" }, "tags": [ "apt", "debian", "ubuntu", "dpkg", "apt-get", "aptitude", "ppa" ], "file_uri": "/v3/files/puppetlabs-apt-1.4.0.tar.gz", "file_size": 27238, "file_md5": "c483d6e375387d5e1fe780ee51ee512c", "downloads": 61047, "readme": "

apt

\n\n

\"Build

\n\n

Description

\n\n

Provides helpful definitions for dealing with Apt.

\n\n

Overview

\n\n

The APT module provides a simple interface for managing APT source, key, and definitions with Puppet.

\n\n

Module Description

\n\n

APT automates obtaining and installing software packages on *nix systems.

\n\n

Setup

\n\n

What APT affects:

\n\n
    \n
  • package/service/configuration files for APT
  • \n
  • your system's sources.list file and sources.list.d directory\n\n
      \n
    • NOTE: Setting the purge_sources_list and purge_sources_list_d parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.
    • \n
  • \n
  • system repositories
  • \n
  • authentication keys
  • \n
  • wget (optional)
  • \n
\n\n

Beginning with APT

\n\n

To begin using the APT module with default parameters, declare the class

\n\n
class { 'apt': }\n
\n\n

Puppet code that uses anything from the APT module requires that the core apt class be declared.

\n\n

Usage

\n\n

Using the APT module consists predominantly in declaring classes that provide desired functionality and features.

\n\n

apt

\n\n

apt provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.

\n\n

The parameters for apt are not required in general and are predominantly for development environment use-cases.

\n\n
class { 'apt':\n  always_apt_update    => false,\n  disable_keys         => undef,\n  proxy_host           => false,\n  proxy_port           => '8080',\n  purge_sources_list   => false,\n  purge_sources_list_d => false,\n  purge_preferences_d  => false,\n  update_timeout       => undef\n}\n
\n\n

Puppet will manage your system's sources.list file and sources.list.d directory but will do its best to respect existing content.

\n\n

If you declare your apt class with purge_sources_list and purge_sources_list_d set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.

\n\n

apt::builddep

\n\n

Installs the build depends of a specified package.

\n\n
apt::builddep { 'glusterfs-server': }\n
\n\n

apt::force

\n\n

Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
apt::force { 'glusterfs-server':\n  release => 'unstable',\n  version => '3.0.3',\n  require => Apt::Source['debian_unstable'],\n}\n
\n\n

apt::key

\n\n

Adds a key to the list of keys used by APT to authenticate packages.

\n\n
apt::key { 'puppetlabs':\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n\napt::key { 'jenkins':\n  key        => 'D50582E6',\n  key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',\n}\n
\n\n

Note that use of key_source requires wget to be installed and working.

\n\n

apt::pin

\n\n

Adds an apt pin for a certain release.

\n\n
apt::pin { 'karmic': priority => 700 }\napt::pin { 'karmic-updates': priority => 700 }\napt::pin { 'karmic-security': priority => 700 }\n
\n\n

Note you can also specifying more complex pins using distribution properties.

\n\n
apt::pin { 'stable':\n  priority        => -10,\n  originator      => 'Debian',\n  release_version => '3.0',\n  component       => 'main',\n  label           => 'Debian'\n}\n
\n\n

apt::ppa

\n\n

Adds a ppa repository using add-apt-repository.

\n\n
apt::ppa { 'ppa:drizzle-developers/ppa': }\n
\n\n

apt::release

\n\n

Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
class { 'apt::release':\n  release_id => 'precise',\n}\n
\n\n

apt::source

\n\n

Adds an apt source to /etc/apt/sources.list.d/.

\n\n
apt::source { 'debian_unstable':\n  location          => 'http://debian.mirror.iweb.ca/debian/',\n  release           => 'unstable',\n  repos             => 'main contrib non-free',\n  required_packages => 'debian-keyring debian-archive-keyring',\n  key               => '55BE302B',\n  key_server        => 'subkeys.pgp.net',\n  pin               => '-10',\n  include_src       => true\n}\n
\n\n

If you would like to configure your system so the source is the Puppet Labs APT repository

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

Testing

\n\n

The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources.

\n\n

Example Test

\n\n

This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.

\n\n

Check your smoke test for syntax errors

\n\n
$ puppet parser validate tests/puppetlabs-apt.pp\n
\n\n

If you receive no output from that command, it means nothing is wrong. Then apply the code

\n\n
$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e'\ninfo: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]\nnotice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>\n
\n\n

The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.

\n\n

Implementation

\n\n

apt::backports

\n\n

Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to $lsbdistcodename. Setting this manually can cause undefined behavior (read: universe exploding).

\n\n

Limitations

\n\n

This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Contributors

\n\n

A lot of great people have contributed to this module. A somewhat current list follows:

\n\n\n
", "changelog": "
2013-10-08 1.4.0\n\nSummary:\n\nMinor bugfix and allow the timeout to be adjusted.\n\nFeatures:\n- Add an `updates_timeout` to apt::params\n\nFixes:\n- Ensure apt::ppa can readd a ppa removed by hand.\n\nSummary\n\n1.3.0\n=====\n\nSummary:\n\nThis major feature in this release is the new apt::unattended_upgrades class,\nallowing you to handle Ubuntu's unattended feature.  This allows you to select\nspecific packages to automatically upgrade without any further user\ninvolvement.\n\nIn addition we extend our Wheezy support, add proxy support to apt:ppa and do\nvarious cleanups and tweaks.\n\nFeatures:\n- Add apt::unattended_upgrades support for Ubuntu.\n- Add wheezy backports support.\n- Use the geoDNS http.debian.net instead of the main debian ftp server.\n- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command.\n- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt).\n\nBugfixes:\n- Fix regsubst() calls to quote single letters (for future parser).\n- Fix lint warnings and other misc cleanup.\n\n1.2.0\n=====\n\nFeatures:\n- Add geppetto `.project` natures\n- Add GH auto-release\n- Add `apt::key::key_options` parameter\n- Add complex pin support using distribution properties for `apt::pin` via new properties:\n  - `apt::pin::codename`\n  - `apt::pin::release_version`\n  - `apt::pin::component`\n  - `apt::pin::originator`\n  - `apt::pin::label`\n- Add source architecture support to `apt::source::architecture`\n\nBugfixes:\n- Use apt-get instead of aptitude in apt::force\n- Update default backports location\n- Add dependency for required packages before apt-get update\n\n\n1.1.1\n=====\n\nThis is a bug fix release that resolves a number of issues:\n\n* By changing template variable usage, we remove the deprecation warnings\n  for Puppet 3.2.x\n* Fixed proxy file removal, when proxy absent\n\nSome documentation, style and whitespaces changes were also merged. This\nrelease also introduced proper rspec-puppet unit testing on Travis-CI to help\nreduce regression.\n\nThanks to all the community contributors below that made this patch possible.\n\n#### Detail Changes\n\n* fix minor comment type (Chris Rutter)\n* whitespace fixes (Michael Moll)\n* Update travis config file (William Van Hevelingen)\n* Build all branches on travis (William Van Hevelingen)\n* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)\n* Updated content to conform to README best practices template (Lauren Rother)\n* Fix apt::release example in readme (Brian Galey)\n* add @ to variables in template (Peter Hoeg)\n* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)\n* Update travis.yml to latest versions of puppet (Ken Barber)\n* Fix proxy file removal (Scott Barber)\n* Add spec test for removing proxy configuration (Dean Reilly)\n* Fix apt::key listing longer than 8 chars (Benjamin Knofe)\n\n\n---------------------------------------\n\n1.1.0\n=====\n\nThis release includes Ubuntu 12.10 (Quantal) support for PPAs.\n\n---------------------------------------\n\n2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4\n * Fix ppa list filename when there is a period in the PPA name\n * Add .pref extension to apt preferences files\n * Allow preferences to be purged\n * Extend pin support\n\n2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support 'ensure => absent' for all defined types\n * add apt::conf\n * add apt::backports\n * fixed Modulefile for module tool dependency resolution\n * configure proxy before doing apt-get update\n * use apt-get update instead of aptitude for apt::ppa\n * add support to pin release\n\n\n2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2\n41cedbb (#13261) Add real examples to smoke tests.\nd159a78 (#13261) Add key.pp smoke test\n7116c7a (#13261) Replace foo source with puppetlabs source\n1ead0bf Ignore pkg directory.\n9c13872 (#13289) Fix some more style violations\n0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path\na758247 (#13289) Clean up style violations and fix corresponding tests\n99c3fd3 (#13289) Add puppet lint tests to Rakefile\n5148cbf (#13125) Apt keys should be case insensitive\nb9607a4 Convert apt::key to use anchors\n\n2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1\nd4fec56 Modify apt::source release parameter test\n1132a07 (#12917) Add contributors to README\n8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it\n7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input\nbe2cc3e (#12522) Adjust spec test for splitting purge\n7dc60ae (#12522) Split purge option to spare sources.list\n9059c4e Fix source specs to test all key permutations\n8acb202 Add test for python-software-properties package\na4af11f Check if python-software-properties is defined before attempting to define it.\n1dcbf3d Add tests for required_packages change\nf3735d2 Allow duplicate $required_packages\n74c8371 (#12430) Add tests for changes to apt module\n97ebb2d Test two sources with the same key\n1160bcd (#12526) Add ability to reverse apt { disable_keys => true }\n2842d73 Add Modulefile to puppet-apt\nc657742 Allow the use of the same key in multiple sources\n8c27963 (#12522) Adding purge option to apt class\n997c9fd (#12529) Add unit test for apt proxy settings\n50f3cca (#12529) Add parameter to support setting a proxy for apt\nd522877 (#12094) Replace chained .with_* with a hash\n8cf1bd0 (#12094) Remove deprecated spec.opts file\n2d688f4 (#12094) Add rspec-puppet tests for apt\n0fb5f78 (#12094) Replace name with path in file resources\nf759bc0 (#11953) Apt::force passes $version to aptitude\nf71db53 (#11413) Add spec test for apt::force to verify changes to unless\n2f5d317 (#11413) Update dpkg query used by apt::force\ncf6caa1 (#10451) Add test coverage to apt::ppa\n0dd697d include_src parameter in example; Whitespace cleanup\nb662eb8 fix typos in "repositories"\n1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added\n864302a Set the pin priority before adding the source (Fix #10449)\n1de4e0a Refactored as per mlitteken\n1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!\n52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep\n5c05fa0 added builddep command.\na11af50 added the ability to specify the content of a key\nc42db0f Fixes ppa test.\n77d2b0d reformatted whitespace to match recommended style of 2 space indentation.\n27ebdfc ignore swap files.\n377d58a added smoke tests for module.\n18f614b reformatted apt::ppa according to recommended style.\nd8a1e4e Created a params class to hold global data.\n636ae85 Added two params for apt class\n148fc73 Update LICENSE.\ned2d19e Support ability to add more than one PPA\n420d537 Add call to apt-update after add-apt-repository in apt::ppa\n945be77 Add package definition for python-software-properties\n71fc425 Abs paths for all commands\n9d51cd1 Adding LICENSE\n71796e3 Heading fix in README\n87777d8 Typo in README\nf848bac First commit\n
", "license": "
Copyright (c) 2011 Evolving Web Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2013-10-15 11:06:03 -0700", "updated_at": "2013-10-15 11:06:03 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apt-1.1.0", "module": { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.1.0", "metadata": { "description": "APT Module for Puppet", "summary": "Puppet Labs Apt Module", "types": [ ], "author": "Evolving Web / Puppet Labs", "source": "https://github.com/puppetlabs/puppetlabs-apt", "project_page": "https://github.com/puppetlabs/puppetlabs-apt", "name": "puppetlabs-apt", "checksums": { "tests/release.pp": "53ce5debe6fa5bee42821767599cc768", "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600", "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c", "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4", "README.md": "38107287d9158b875b0ef1ac485c0a54", "manifests/init.pp": "2519ac8778de7b704c09abe5555a2a12", "manifests/force.pp": "2c9e6c49e8afc188c106fb43ed580fa1", "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca", "templates/source.list.erb": "7cfd5f0839f487c02653c749bc73f7f5", "manifests/pin.pp": "a0e49c860bbcccf01d444e785a7ef8cb", "manifests/key.pp": "c8926002997a59e5b3d7320aae783e6d", "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70", "CHANGELOG": "1cad40be1ae7dbe34f8645a9ab8b5cca", "spec/defines/ppa_spec.rb": "02394ce677512ef84d3868a4cc9be9ce", "spec/defines/pin_spec.rb": "80334696011d40968a40f056bcfd6eb3", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0", "Modulefile": "af09365541ea5bfe7bcb5fb13567ec1b", "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9", "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5", "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff", "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "spec/defines/source_spec.rb": "15c0c52e084815a3cc32c716f19878fd", "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5", "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7", "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e", "spec/classes/apt_spec.rb": "632f0ae60f921728725b2567f29a2aa8", "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4", "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5", "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd", "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f", "manifests/ppa.pp": "cb185fcdad83e2ee6feb115fcef128f9", "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/source.pp": "b76cf7805a072b9936c253fe80f9d5dd", "manifests/params.pp": "22111a8a26e5f972c79b82f9e5efd69e", "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98", "tests/params.pp": "900db40f3fc84b0be173278df2ebff35", "tests/init.pp": "551138eb704e71ab3687932dda429a81", "spec/defines/force_spec.rb": "e9de1b32e63d9441f95f9dedbabbfea0", "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d", "tests/key.pp": "b2047c373bc698a42729c160bab875b6", "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88", "templates/pin.pref.erb": "cc6dcd4fbc24ebd9393122983ee0fae3", "manifests/update.pp": "bff1331f5467f146edf9fa43475fe532" }, "dependencies": [ { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ], "license": "Apache License 2.0", "version": "1.1.0" }, "tags": [ "apt", "debian", "ubuntu", "dpkg", "apt-get", "aptitude", "ppa" ], "file_uri": "/v3/files/puppetlabs-apt-1.1.0.tar.gz", "file_size": 15880, "file_md5": "ac35dd5b6b7ba473f587f46caf72b08b", "downloads": 53232, "readme": "

Apt module for Puppet

\n\n

Description

\n\n

Provides helpful definitions for dealing with Apt.

\n\n

Usage

\n\n

apt

\n\n

The apt class provides a number of common resources and options which\nare shared by the various defined types in this module. This class\nshould always be included in your manifests if you are using the apt\nmodule.

\n\n
class { 'apt':\n  always_apt_update    => false,\n  disable_keys         => undef,\n  proxy_host           => false,\n  proxy_port           => '8080',\n  purge_sources_list   => false,\n  purge_sources_list_d => false,\n  purge_preferences_d  => false\n}\n
\n\n

apt::builddep

\n\n

Install the build depends of a specified package.

\n\n
apt::builddep { "glusterfs-server": }\n
\n\n

apt::force

\n\n

Force a package to be installed from a specific release. Useful when\nusing repositories like Debian unstable in Ubuntu.

\n\n
apt::force { "glusterfs-server":\n  release => "unstable",\n  version => '3.0.3',\n  require => Apt::Source["debian_unstable"],\n}\n
\n\n

apt::pin

\n\n

Add an apt pin for a certain release.

\n\n
apt::pin { "karmic": priority => 700 }\napt::pin { "karmic-updates": priority => 700 }\napt::pin { "karmic-security": priority => 700 }\n
\n\n

apt::ppa

\n\n

Add a ppa repository using add-apt-repository. Somewhat experimental.

\n\n
apt::ppa { "ppa:drizzle-developers/ppa": }\n
\n\n

apt::release

\n\n

Set the default apt release. Useful when using repositories like\nDebian unstable in Ubuntu.

\n\n
apt::release { "karmic": }\n
\n\n

apt::source

\n\n

Add an apt source to /etc/apt/sources.list.d/.

\n\n
apt::source { "debian_unstable":\n  location          => "http://debian.mirror.iweb.ca/debian/",\n  release           => "unstable",\n  repos             => "main contrib non-free",\n  required_packages => "debian-keyring debian-archive-keyring",\n  key               => "55BE302B",\n  key_server        => "subkeys.pgp.net",\n  pin               => "-10",\n  include_src       => true\n}\n
\n\n

This source will configure your system for the Puppet Labs APT\nrepository.

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

apt::key

\n\n

Add a key to the list of keys used by apt to authenticate packages.

\n\n
apt::key { "puppetlabs":\n  key        => "4BD6EC30",\n  key_server => "pgp.mit.edu",\n}\n\napt::key { "jenkins":\n  key        => "D50582E6",\n  key_source => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key",\n}\n
\n\n

Note that use of the "key_source" parameter requires wget to be\ninstalled and working.

\n\n

Contributors

\n\n

A lot of great people have contributed to this module. A somewhat\ncurrent list follows.

\n\n

Ben Godfrey ben.godfrey@wonga.com\nBranan Purvine-Riley branan@puppetlabs.com\nChristian G. Warden cwarden@xerus.org
\nDan Bode bodepd@gmail.com dan@puppetlabs.com
\nGarrett Honeycutt github@garretthoneycutt.com
\nJeff Wallace jeff@evolvingweb.ca jeff@tjwallace.ca
\nKen Barber ken@bob.sh
\nMatthaus Litteken matthaus@puppetlabs.com mlitteken@gmail.com
\nMatthias Pigulla mp@webfactory.de
\nMonty Taylor mordred@inaugust.com
\nPeter Drake pdrake@allplayers.com
\nReid Vandewiele marut@cat.pdx.edu
\nRobert Navarro rnavarro@phiivo.com
\nRyan Coleman ryan@puppetlabs.com
\nScott McLeod scott.mcleod@theice.com
\nSpencer Krum spencer@puppetlabs.com
\nWilliam Van Hevelingen blkperl@cat.pdx.edu wvan13@gmail.com
\nZach Leslie zach@puppetlabs.com

\n
", "changelog": "
2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4\n * Fix ppa list filename when there is a period in the PPA name\n * Add .pref extension to apt preferences files\n * Allow preferences to be purged\n * Extend pin support\n\n2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support 'ensure => absent' for all defined types\n * add apt::conf\n * add apt::backports\n * fixed Modulefile for module tool dependency resolution\n * configure proxy before doing apt-get update\n * use apt-get update instead of aptitude for apt::ppa\n * add support to pin release\n\n\n2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2\n41cedbb (#13261) Add real examples to smoke tests.\nd159a78 (#13261) Add key.pp smoke test\n7116c7a (#13261) Replace foo source with puppetlabs source\n1ead0bf Ignore pkg directory.\n9c13872 (#13289) Fix some more style violations\n0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path\na758247 (#13289) Clean up style violations and fix corresponding tests\n99c3fd3 (#13289) Add puppet lint tests to Rakefile\n5148cbf (#13125) Apt keys should be case insensitive\nb9607a4 Convert apt::key to use anchors\n\n2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1\nd4fec56 Modify apt::source release parameter test\n1132a07 (#12917) Add contributors to README\n8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it\n7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input\nbe2cc3e (#12522) Adjust spec test for splitting purge\n7dc60ae (#12522) Split purge option to spare sources.list\n9059c4e Fix source specs to test all key permutations\n8acb202 Add test for python-software-properties package\na4af11f Check if python-software-properties is defined before attempting to define it.\n1dcbf3d Add tests for required_packages change\nf3735d2 Allow duplicate $required_packages\n74c8371 (#12430) Add tests for changes to apt module\n97ebb2d Test two sources with the same key\n1160bcd (#12526) Add ability to reverse apt { disable_keys => true }\n2842d73 Add Modulefile to puppet-apt\nc657742 Allow the use of the same key in multiple sources\n8c27963 (#12522) Adding purge option to apt class\n997c9fd (#12529) Add unit test for apt proxy settings\n50f3cca (#12529) Add parameter to support setting a proxy for apt\nd522877 (#12094) Replace chained .with_* with a hash\n8cf1bd0 (#12094) Remove deprecated spec.opts file\n2d688f4 (#12094) Add rspec-puppet tests for apt\n0fb5f78 (#12094) Replace name with path in file resources\nf759bc0 (#11953) Apt::force passes $version to aptitude\nf71db53 (#11413) Add spec test for apt::force to verify changes to unless\n2f5d317 (#11413) Update dpkg query used by apt::force\ncf6caa1 (#10451) Add test coverage to apt::ppa\n0dd697d include_src parameter in example; Whitespace cleanup\nb662eb8 fix typos in "repositories"\n1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added\n864302a Set the pin priority before adding the source (Fix #10449)\n1de4e0a Refactored as per mlitteken\n1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!\n52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep\n5c05fa0 added builddep command.\na11af50 added the ability to specify the content of a key\nc42db0f Fixes ppa test.\n77d2b0d reformatted whitespace to match recommended style of 2 space indentation.\n27ebdfc ignore swap files.\n377d58a added smoke tests for module.\n18f614b reformatted apt::ppa according to recommended style.\nd8a1e4e Created a params class to hold global data.\n636ae85 Added two params for apt class\n148fc73 Update LICENSE.\ned2d19e Support ability to add more than one PPA\n420d537 Add call to apt-update after add-apt-repository in apt::ppa\n945be77 Add package definition for python-software-properties\n71fc425 Abs paths for all commands\n9d51cd1 Adding LICENSE\n71796e3 Heading fix in README\n87777d8 Typo in README\nf848bac First commit\n
", "license": "
Copyright (c) 2011 Evolving Web Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2012-12-02 16:05:23 -0800", "updated_at": "2012-12-02 16:05:23 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-firewall-0.4.2", "module": { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.2", "metadata": { "name": "puppetlabs-firewall", "version": "0.4.2", "source": "git://github.com/puppetlabs/puppetlabs-firewall.git", "author": "puppetlabs", "license": "ASL 2.0", "summary": "Firewall Module", "description": "Manages Firewalls such as iptables", "project_page": "http://forge.puppetlabs.com/puppetlabs/firewall", "dependencies": [ ], "types": [ { "name": "firewall", "doc": " This type provides the capability to manage firewall rules within\n puppet.\n\n **Autorequires:**\n\n If Puppet is managing the iptables or ip6tables chains specified in the\n `chain` or `jump` parameters, the firewall resource will autorequire\n those firewallchain resources.\n\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables or ip6tables, the firewall resource will\n autorequire those packages to ensure that any required binaries are\n installed.\n", "properties": [ { "name": "ensure", "doc": " Manage the state of this rule. The default action is *present*.\n Valid values are `present`, `absent`." }, { "name": "action", "doc": " This is the action to perform on a match. Can be one of:\n\n * accept - the packet is accepted\n * reject - the packet is rejected with a suitable ICMP response\n * drop - the packet is dropped\n\n If you specify no value it will simply match the rule but perform no\n action unless you provide a provider specific parameter (such as *jump*).\n Valid values are `accept`, `reject`, `drop`." }, { "name": "source", "doc": " The source address. For example:\n\n source => '192.168.2.0/24'\n\n The source can also be an IPv6 address if your provider supports it.\n" }, { "name": "src_range", "doc": " The source IP range. For example:\n\n src_range => '192.168.1.1-192.168.1.10'\n\n The source IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "destination", "doc": " The destination address to match. For example:\n\n destination => '192.168.1.0/24'\n\n The destination can also be an IPv6 address if your provider supports it.\n" }, { "name": "dst_range", "doc": " The destination IP range. For example:\n\n dst_range => '192.168.1.1-192.168.1.10'\n\n The destination IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "sport", "doc": " The source port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dport", "doc": " The destination port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "port", "doc": " The destination or source port to match for this filter (if the protocol\n supports ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dst_type", "doc": " The destination address type. For example:\n\n dst_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "src_type", "doc": " The source address type. For example:\n\n src_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "proto", "doc": " The specific protocol to match for this rule. By default this is\n *tcp*.\n Valid values are `tcp`, `udp`, `icmp`, `ipv6-icmp`, `esp`, `ah`, `vrrp`, `igmp`, `ipencap`, `ospf`, `gre`, `all`." }, { "name": "tcp_flags", "doc": " Match when the TCP flags are as specified.\n Is a string with a list of comma-separated flag names for the mask,\n then a space, then a comma-separated list of flags that should be set.\n The flags are: SYN ACK FIN RST URG PSH ALL NONE\n Note that you specify them in the order that iptables --list-rules\n would list them to avoid having puppet think you changed the flags.\n Example: FIN,SYN,RST,ACK SYN matches packets with the SYN bit set and the\n\t ACK,RST and FIN bits cleared. Such packets are used to request\n TCP connection initiation.\n Requires features tcp_flags." }, { "name": "chain", "doc": " Name of the chain to use. Can be one of the built-ins:\n\n * INPUT\n * FORWARD\n * OUTPUT\n * PREROUTING\n * POSTROUTING\n\n Or you can provide a user-based chain.\n\n The default value is 'INPUT'.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features iptables." }, { "name": "table", "doc": " Table to use. Can be one of:\n\n * nat\n * mangle\n * filter\n * raw\n * rawpost\n\n By default the setting is 'filter'.\n Valid values are `nat`, `mangle`, `filter`, `raw`, `rawpost`. Requires features iptables." }, { "name": "jump", "doc": " The value for the iptables --jump parameter. Normal values are:\n\n * QUEUE\n * RETURN\n * DNAT\n * SNAT\n * LOG\n * MASQUERADE\n * REDIRECT\n * MARK\n\n But any valid chain name is allowed.\n\n For the values ACCEPT, DROP and REJECT you must use the generic\n 'action' parameter. This is to enfore the use of generic parameters where\n possible for maximum cross-platform modelling.\n\n If you set both 'accept' and 'jump' parameters, you will get an error as\n only one of the options should be set.\n Requires features iptables." }, { "name": "iniface", "doc": " Input interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "outiface", "doc": " Output interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "tosource", "doc": " When using jump => \"SNAT\" you can specify the new source address using\n this parameter.\n Requires features snat." }, { "name": "todest", "doc": " When using jump => \"DNAT\" you can specify the new destination address\n using this paramter.\n Requires features dnat." }, { "name": "toports", "doc": " For DNAT this is the port that will replace the destination port.\n Requires features dnat." }, { "name": "reject", "doc": " When combined with jump => \"REJECT\" you can specify a different icmp\n response to be sent back to the packet sender.\n Requires features reject_type." }, { "name": "log_level", "doc": " When combined with jump => \"LOG\" specifies the system log level to log\n to.\n Requires features log_level." }, { "name": "log_prefix", "doc": " When combined with jump => \"LOG\" specifies the log prefix to use when\n logging.\n Requires features log_prefix." }, { "name": "icmp", "doc": " When matching ICMP packets, this is the type of ICMP packet to match.\n\n A value of \"any\" is not supported. To achieve this behaviour the\n parameter should simply be omitted or undefined.\n Requires features icmp_match." }, { "name": "state", "doc": " Matches a packet based on its state in the firewall stateful inspection\n table. Values can be:\n\n * INVALID\n * ESTABLISHED\n * NEW\n * RELATED\n Valid values are `INVALID`, `ESTABLISHED`, `NEW`, `RELATED`. Requires features state_match." }, { "name": "limit", "doc": " Rate limiting value for matched packets. The format is:\n rate/[/second/|/minute|/hour|/day].\n\n Example values are: '50/sec', '40/min', '30/hour', '10/day'.\"\n Requires features rate_limiting." }, { "name": "burst", "doc": " Rate limiting burst value (per second) before limit checks apply.\n Values can match `/^\\d+$/`. Requires features rate_limiting." }, { "name": "uid", "doc": " UID or Username owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple uid in a single\n statement.\n Requires features owner." }, { "name": "gid", "doc": " GID or Group owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple gid in a single\n statement.\n Requires features owner." }, { "name": "set_mark", "doc": " Set the Netfilter mark value associated with the packet. Accepts either of:\n mark/mask or mark. These will be converted to hex if they are not already.\n Requires features mark." }, { "name": "pkttype", "doc": " Sets the packet type to match.\n Valid values are `unicast`, `broadcast`, `multicast`. Requires features pkttype." }, { "name": "isfragment", "doc": " Set to true to match tcp fragments (requires type to be set to tcp)\n Valid values are `true`, `false`. Requires features isfragment." }, { "name": "socket", "doc": " If true, matches if an open socket can be found by doing a coket lookup\n on the packet.\n Valid values are `true`, `false`. Requires features socket." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the rule. This name is also used for ordering\n so make sure you prefix the rule with a number:\n\n 000 this runs first\n 999 this runs last\n\n Depending on the provider, the name of the rule can be stored using\n the comment feature of the underlying firewall subsystem.\n Values can match `/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`." }, { "name": "line", "doc": " Read-only property for caching the rule line.\n" } ], "providers": [ { "name": "ip6tables", "doc": "Ip6tables type provider\n\nRequired binaries: `ip6tables`, `ip6tables-save`. Supported features: `dnat`, `icmp_match`, `interface_match`, `iptables`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `state_match`, `tcp_flags`." }, { "name": "iptables", "doc": "Iptables type provider\n\nRequired binaries: `iptables`, `iptables-save`. Default for `kernel` == `linux`. Supported features: `address_type`, `dnat`, `icmp_match`, `interface_match`, `iprange`, `iptables`, `isfragment`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `socket`, `state_match`, `tcp_flags`." } ] }, { "name": "firewallchain", "doc": " This type provides the capability to manage rule chains for firewalls.\n\n Currently this supports only iptables, ip6tables and ebtables on Linux. And\n provides support for setting the default policy on chains and tables that\n allow it.\n\n **Autorequires:**\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables_chain, the firewall resource will autorequire\n those packages to ensure that any required binaries are installed.\n", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "policy", "doc": " This is the action to when the end of the chain is reached.\n It can only be set on inbuilt chains (INPUT, FORWARD, OUTPUT,\n PREROUTING, POSTROUTING) and can be one of:\n\n * accept - the packet is accepted\n * drop - the packet is dropped\n * queue - the packet is passed userspace\n * return - the packet is returned to calling (jump) queue\n or the default of inbuilt chains\n Valid values are `accept`, `drop`, `queue`, `return`." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the chain.\n\n For iptables the format must be {chain}:{table}:{protocol}.\n" } ], "providers": [ { "name": "iptables_chain", "doc": "Iptables chain provider\n\nRequired binaries: `iptables`, `iptables-save`, `ip6tables`, `ip6tables-save`, `ebtables`, `ebtables-save`. Default for `kernel` == `linux`. Supported features: `iptables_chain`, `policy`." } ] } ], "checksums": { "CONTRIBUTING.md": "346969b756bc432a2a2fab4307ebb93a", "Changelog": "1de1691b4ab10ee354f761a1f4c6f443", "Gemfile": "cbdce086f4dbabe5394121e2281b739f", "Gemfile.lock": "df949ce515d5c06d6ed31b9d7e5e3391", "LICENSE": "ade7f2bb88b5b4f034152822222ec314", "Modulefile": "5e06a785cd9bce7b53f95c23eba506d2", "README.markdown": "41df885b5286abc9ba27f054c5ff6dbf", "Rakefile": "35d0261289b65faa09bef45b888d40ae", "lib/facter/ip6tables_version.rb": "091123ad703f1706686bca4398c5b06f", "lib/facter/iptables_persistent_version.rb": "b7a47827cd3d3bb1acbd526a31da3acb", "lib/facter/iptables_version.rb": "facbd760223f236538b731c1d1f6cf8f", "lib/puppet/provider/firewall/ip6tables.rb": "e9579ae3afdf8b1392cbdc0335ef5464", "lib/puppet/provider/firewall/iptables.rb": "bb7ea2c54c60c1047e68745f3b370c6f", "lib/puppet/provider/firewall.rb": "32d2f5e5dcc082986b82ef26a119038b", "lib/puppet/provider/firewallchain/iptables_chain.rb": "e98592c22901792305e0d20376c9a281", "lib/puppet/type/firewall.rb": "2a591254b2df7528eafaa6dff5459ace", "lib/puppet/type/firewallchain.rb": "91ebccecff290a9ab2116867a74080c7", "lib/puppet/util/firewall.rb": "a9f0057c1b16a51a0bace5d4a8cc4ea4", "lib/puppet/util/ipcidr.rb": "e1160dfd6e73fc5ef2bb8abc291f6fd5", "manifests/init.pp": "ba3e697f00fc3d4e7e5b9c7fdbc6a89d", "manifests/linux/archlinux.pp": "1257fe335ecafa0629b285dc8621cf75", "manifests/linux/debian.pp": "626f0fd23f2f451ca14e2b7f690675fe", "manifests/linux/redhat.pp": "44ce25057ae8d814465260767b39c414", "manifests/linux.pp": "7380519131fa8daae0ef45f9a162aff7", "spec/fixtures/iptables/conversion_hash.rb": "012d92a358cc0c74304de14657bf9a23", "spec/spec_helper.rb": "faae8467928b93bd251a1a66e1eedbe5", "spec/spec_helper_system.rb": "4981e0b995c12996e628d004ffdcc9f4", "spec/system/basic_spec.rb": "34a22dedba01b8239024137bda8ab3f8", "spec/system/class_spec.rb": "04d89039312c3b9293dbb680878101c6", "spec/system/params_spec.rb": "f982f9eb6ecc8d6782b9267b59d321bf", "spec/system/purge_spec.rb": "a336e8a20d4c330606bf5955799a7e35", "spec/system/resource_cmd_spec.rb": "f991d2b7a3e2eb6d28471534cd38b0c8", "spec/system/standard_usage_spec.rb": "f80f86703843775ac14635464e9f7549", "spec/unit/classes/firewall_linux_archlinux_spec.rb": "1c600a9852ec328b14cb15b0630ed5ff", "spec/unit/classes/firewall_linux_debian_spec.rb": "6334936fb16223cf15f637083c67850e", "spec/unit/classes/firewall_linux_redhat_spec.rb": "f41b21caf6948f3ac08f42c1bc59ba1b", "spec/unit/classes/firewall_linux_spec.rb": "b934ab4e0a806f29bfdabd2369e41d0e", "spec/unit/classes/firewall_spec.rb": "14fc76eeb702913159661c01125baabb", "spec/unit/facter/iptables_persistent_version_spec.rb": "98aa337aae2ae8a2ac7f70586351e928", "spec/unit/facter/iptables_spec.rb": "ebb008f0e01530a49007228ca1a81097", "spec/unit/puppet/provider/iptables_chain_spec.rb": "6265dbb6be5af74f056d32c7e7236d0a", "spec/unit/puppet/provider/iptables_spec.rb": "b1e92084c8595b7e2ef21aa0800ea084", "spec/unit/puppet/type/firewall_spec.rb": "f229613c1bec34b6f84b544e021dc856", "spec/unit/puppet/type/firewallchain_spec.rb": "49157d8703daf8776e414ef9ea9e5cb3", "spec/unit/puppet/util/firewall_spec.rb": "3d7858f46ea3c97617311b7a5cebbae1", "spec/unit/puppet/util/ipcidr_spec.rb": "1a6eeb2dd7c9634fcfb60d8ead6e1d79" } }, "tags": [ "iptables", "security", "firewall", "ip6tables", "archlinux", "redhat", "centos", "debian", "ubuntu" ], "file_uri": "/v3/files/puppetlabs-firewall-0.4.2.tar.gz", "file_size": 51834, "file_md5": "7862ef0aa64d9a4b87152ef27302c9e4", "downloads": 53034, "readme": "

firewall

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Firewall module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Firewall\n\n
  6. \n
  7. Usage - Configuration and customization options\n\n
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module\n\n
  14. \n
\n\n

Overview

\n\n

The Firewall module lets you manage firewall rules with Puppet.

\n\n

Module Description

\n\n

PuppetLabs' Firewall introduces the resource firewall, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables.

\n\n

The module also introduces the resource firewallchain, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported.

\n\n

Setup

\n\n

What Firewall affects:

\n\n
    \n
  • every node running a firewall
  • \n
  • system's firewall settings
  • \n
  • connection settings for managed nodes
  • \n
  • unmanaged resources (get purged)
  • \n
  • site.pp
  • \n
\n\n

Setup Requirements

\n\n

Firewall uses Ruby-based providers, so you must have pluginsync enabled.

\n\n

Beginning with Firewall

\n\n

To begin, you need to provide some initial top-scope configuration to ensure your firewall configurations are ordered properly and you do not lock yourself out of your box or lose any configuration.

\n\n

Persistence of rules between reboots is handled automatically, although there are known issues with ip6tables on older Debian/Ubuntu, as well as known issues with ebtables.

\n\n

In your site.pp (or some similarly top-scope file), set up a metatype to purge unmanaged firewall resources. This will clear any existing rules and make sure that only rules defined in Puppet exist on the machine.

\n\n
resources { "firewall":\n  purge => true\n}\n
\n\n

Next, set up the default parameters for all of the firewall rules you will be establishing later. These defaults will ensure that the pre and post classes (you will be setting up in just a moment) are run in the correct order to avoid locking you out of your box during the first puppet run.

\n\n
Firewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\n
\n\n

You also need to declare the my_fw::pre & my_fw::post classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following

\n\n
class { ['my_fw::pre', 'my_fw::post']: }\n
\n\n

Finally, you should include the firewall class to ensure the correct packages are installed.

\n\n
class { 'firewall': }\n
\n\n

Now to create the my_fw::pre and my_fw::post classes. Firewall acts on your running firewall, making immediate changes as the catalog executes. Defining default pre and post rules allows you provide global defaults for your hosts before and after any custom rules; it is also required to avoid locking yourself out of your own boxes when Puppet runs. This approach employs a allowlist setup, so you can define what rules you want and everything else is ignored rather than removed.

\n\n

The pre class should be located in my_fw/manifests/pre.pp and should contain any default rules to be applied first.

\n\n
class my_fw::pre {\n  Firewall {\n    require => undef,\n  }\n\n  # Default firewall rules\n  firewall { '000 accept all icmp':\n    proto   => 'icmp',\n    action  => 'accept',\n  }->\n  firewall { '001 accept all to lo interface':\n    proto   => 'all',\n    iniface => 'lo',\n    action  => 'accept',\n  }->\n  firewall { '002 accept related established rules':\n    proto   => 'all',\n    state   => ['RELATED', 'ESTABLISHED'],\n    action  => 'accept',\n  }\n}\n
\n\n

The rules in pre should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed.

\n\n

The post class should be located in my_fw/manifests/post.pp and include any default rules to be applied last.

\n\n
class my_fw::post {\n  firewall { '999 drop all':\n    proto   => 'all',\n    action  => 'drop',\n    before  => undef,\n  }\n}\n
\n\n

To put it all together: the before parameter in Firewall {} ensures my_fw::post is run before any other rules and the the require parameter ensures my_fw::pre is run after any other rules. So the run order is:

\n\n
    \n
  • run the rules in my_fw::pre
  • \n
  • run your rules (defined in code)
  • \n
  • run the rules in my_fw::post
  • \n
\n\n

Upgrading

\n\n

Upgrading from version 0.2.0 and newer

\n\n

Upgrade the module with the puppet module tool as normal:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Upgrading from version 0.1.1 and older

\n\n

Start by upgrading the module using the puppet module tool:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Previously, you would have required the following in your site.pp (or some other global location):

\n\n
# Always persist firewall rules\nexec { 'persist-firewall':\n  command     => $operatingsystem ? {\n    'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n    /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n  },\n  refreshonly => true,\n}\nFirewall {\n  notify  => Exec['persist-firewall'],\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nFirewallchain {\n  notify  => Exec['persist-firewall'],\n}\nresources { "firewall":\n  purge => true\n}\n
\n\n

With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre & post rules.

\n\n
resources { "firewall":\n  purge => true\n}\nFirewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nclass { ['my_fw::pre', 'my_fw::post']: }\nclass { 'firewall': }\n
\n\n

Consult the the documentation below for more details around the classes my_fw::pre and my_fw::post.

\n\n

Usage

\n\n

There are two kinds of firewall rules you can use with Firewall: default rules and application-specific rules. Default rules apply to general firewall settings, whereas application-specific rules manage firewall settings of a specific application, node, etc.

\n\n

All rules employ a numbering system in the resource's title that is used for ordering. When titling your rules, make sure you prefix the rule with a number.

\n\n
  000 this runs first\n  999 this runs last\n
\n\n

Default rules

\n\n

You can place default rules in either my_fw::pre or my_fw::post, depending on when you would like them to run. Rules placed in the pre class will run first, rules in the post class, last.

\n\n

Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match /^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/.

\n\n

Examples of default rules

\n\n

Basic accept ICMP request example:

\n\n
firewall { "000 accept all icmp requests":\n  proto  => "icmp",\n  action => "accept",\n}\n
\n\n

Drop all:

\n\n
firewall { "999 drop all other requests":\n  action => "drop",\n}\n
\n\n

Application-specific rules

\n\n

Application-specific rules can live anywhere you declare the firewall resource. It is best to put your firewall rules close to the service that needs it, such as in the module that configures it.

\n\n

You should be able to add firewall rules to your application-specific classes so firewalling is performed at the same time when the class is invoked.

\n\n

For example, if you have an Apache module, you could declare the class as below

\n\n
class apache {\n  firewall { '100 allow http and https access':\n    port   => [80, 443],\n    proto  => tcp,\n    action => accept,\n  }\n  # ... the rest of your code ...\n}\n
\n\n

When someone uses the class, firewalling is provided automatically.

\n\n
class { 'apache': }\n
\n\n

Other rules

\n\n

You can also apply firewall rules to specific nodes. Usually, you will want to put the firewall rule in another class and apply that class to a node. But you can apply a rule to a node.

\n\n
node 'foo.bar.com' {\n  firewall { '111 open port 111':\n    dport => 111\n  }\n}\n
\n\n

You can also do more complex things with the firewall resource. Here we are doing some NAT configuration.

\n\n
firewall { '100 snat for network foo2':\n  chain    => 'POSTROUTING',\n  jump     => 'MASQUERADE',\n  proto    => 'all',\n  outiface => "eth0",\n  source   => '10.1.2.0/24',\n  table    => 'nat',\n}\n
\n\n

In the below example, we are creating a new chain and forwarding any port 5000 access to it.

\n\n
firewall { '100 forward to MY_CHAIN':\n  chain   => 'INPUT',\n  jump    => 'MY_CHAIN',\n}\n# The namevar here is in the format chain_name:table:protocol\nfirewallchain { 'MY_CHAIN:filter:IPv4':\n  ensure  => present,\n}\nfirewall { '100 my rule':\n  chain   => 'MY_CHAIN',\n  action  => 'accept',\n  proto   => 'tcp',\n  dport   => 5000,\n}\n
\n\n

Additional Information

\n\n

You can access the inline documentation:

\n\n
puppet describe firewall\n
\n\n

Or

\n\n
puppet doc -r type\n(and search for firewall)\n
\n\n

Reference

\n\n

Classes:

\n\n\n\n

Types:

\n\n\n\n

Facts:

\n\n\n\n

Class: firewall

\n\n

This class is provided to do the basic setup tasks required for using the firewall resources.

\n\n

At the moment this takes care of:

\n\n
    \n
  • iptables-persistent package installation
  • \n
\n\n

You should include the class for nodes that need to use the resources in this module. For example

\n\n
class { 'firewall': }\n
\n\n

ensure

\n\n

Indicates the state of iptables on your system, allowing you to disable iptables if desired.

\n\n

Can either be running or stopped. Default to running.

\n\n

Type: firewall

\n\n

This type provides the capability to manage firewall rules within puppet.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Type:: firewallchain

\n\n

This type provides the capability to manage rule chains for firewalls.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Fact: ip6tables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution.

\n\n

Fact: iptables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution.

\n\n

Fact: iptables_persistent_version

\n\n

Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact.

\n\n

Limitations

\n\n

While we aim to support as low as Puppet 2.6.x (for now), we recommend installing the latest Puppet version from the Puppetlabs official repos.

\n\n

Please note, we only aim support for the following distributions and versions - that is, we actually do ongoing system tests on these platforms:

\n\n
    \n
  • Redhat 5.9 and 6.4
  • \n
  • Debian 6.0 and 7.0
  • \n
  • Ubuntu 10.04 and 12.04
  • \n
\n\n

If you want a new distribution supported feel free to raise a ticket and we'll consider it. If you want an older revision supported we'll also consider it, but don't get insulted if we reject it. Specifically, we will not consider Redhat 4.x support - its just too old.

\n\n

If you really want to get support for your OS we suggest writing any patch fix yourself, and for continual system testing if you can provide a sufficient trusted Veewee template we could consider adding such an OS to our ongoing continuous integration tests.

\n\n

Also, as this is a 0.x release the API is still in flux and may change. Make sure\nyou read the release notes before upgrading.

\n\n

Bugs can be reported using Github Issues:

\n\n

http://github.com/puppetlabs/puppetlabs-firewall/issues

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

For this particular module, please also read CONTRIBUTING.md before contributing.

\n\n

Currently we support:

\n\n
    \n
  • iptables
  • \n
  • ip6tables
  • \n
  • ebtables (chains only)
  • \n
\n\n

But plans are to support lots of other firewall implementations:

\n\n
    \n
  • FreeBSD (ipf)
  • \n
  • Mac OS X (ipfw)
  • \n
  • OpenBSD (pf)
  • \n
  • Cisco (ASA and basic access lists)
  • \n
\n\n

If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.

\n\n

Testing

\n\n

Make sure you have:

\n\n
    \n
  • rake
  • \n
  • bundler
  • \n
\n\n

Install the necessary gems:

\n\n
bundle install\n
\n\n

And run the tests from the root of the source code:

\n\n
rake test\n
\n\n

If you have a copy of Vagrant 1.1.0 you can also run the system tests:

\n\n
RSPEC_SET=debian-606-x64 rake spec:system\nRSPEC_SET=centos-58-x64 rake spec:system\n
\n\n

Note: system testing is fairly alpha at this point, your mileage may vary.

\n
", "changelog": "
## puppetlabs-firewall changelog\n\nRelease notes for puppetlabs-firewall module.\n\n---------------------------------------\n\n#### 0.4.2 - 2013-09-10\n\nAnother attempt to fix the packaging issue.  We think we understand exactly\nwhat is failing and this should work properly for the first time.\n\n---------------------------------------\n\n#### 0.4.1 - 2013-08-09\n\nBugfix release to fix a packaging issue that may have caused puppet module\ninstall commands to fail.\n\n---------------------------------------\n\n#### 0.4.0 - 2013-07-11\n\nThis release adds support for address type, src/dest ip ranges, and adds\nadditional testing and bugfixes.\n\n#### Features\n* Add `src_type` and `dst_type` attributes (Nick Stenning)\n* Add `src_range` and `dst_range` attributes (Lei Zhang)\n* Add SL and SLC operatingsystems as supported (Steve Traylen)\n\n#### Bugfixes\n* Fix parser for bursts other than 5 (Chris Rutter)\n* Fix parser for -f in --comment (Georg Koester)\n* Add doc headers to class files (Dan Carley)\n* Fix lint warnings/errors (Wolf Noble)\n\n---------------------------------------\n\n#### 0.3.1 - 2013/6/10\n\nThis minor release provides some bugfixes and additional tests.\n\n#### Changes\n\n* Update tests for rspec-system-puppet 2 (Ken Barber)\n* Update rspec-system tests for rspec-system-puppet 1.5 (Ken Barber)\n* Ensure all services have 'hasstatus => true' for Puppet 2.6 (Ken Barber)\n* Accept pre-existing rule with invalid name (Joe Julian)\n* Swap log_prefix and log_level order to match the way it's saved (Ken Barber)\n* Fix log test to replicate bug #182 (Ken Barber)\n* Split argments while maintaining quoted strings (Joe Julian)\n* Add more log param tests (Ken Barber)\n* Add extra tests for logging parameters (Ken Barber)\n* Clarify OS support (Ken Barber)\n\n---------------------------------------\n\n#### 0.3.0 - 2013/4/25\n\nThis release introduces support for Arch Linux and extends support for Fedora 15 and up. There are also lots of bugs fixed and improved testing to prevent regressions.\n\n##### Changes\n\n* Fix error reporting for insane hostnames (Tomas Doran)\n* Support systemd on Fedora 15 and up (Eduardo Gutierrez)\n* Move examples to docs (Ken Barber)\n* Add support for Arch Linux platform (Ingmar Steen)\n* Add match rule for fragments (Georg Koester)\n* Fix boolean rules being recognized as changed (Georg Koester)\n* Same rules now get deleted (Anastasis Andronidis)\n* Socket params test (Ken Barber)\n* Ensure parameter can disable firewall (Marc Tardif)\n\n---------------------------------------\n\n#### 0.2.1 - 2012/3/13\n\nThis maintenance release introduces the new README layout, and fixes a bug with iptables_persistent_version.\n\n##### Changes\n\n* (GH-139) Throw away STDERR from dpkg-query in Fact\n* Update README to be consistent with module documentation template\n* Fix failing spec tests due to dpkg change in iptables_persistent_version\n\n---------------------------------------\n\n#### 0.2.0 - 2012/3/3\n\nThis release introduces automatic persistence, removing the need for the previous manual dependency requirement for persistent the running rules to the OS persistence file.\n\nPreviously you would have required the following in your site.pp (or some other global location):\n\n    # Always persist firewall rules\n    exec { 'persist-firewall':\n      command     => $operatingsystem ? {\n        'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n        /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n      },\n      refreshonly => true,\n    }\n    Firewall {\n      notify  => Exec['persist-firewall'],\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n    Firewallchain {\n      notify  => Exec['persist-firewall'],\n    }\n    resources { "firewall":\n      purge => true\n    }\n\nYou only need:\n\n    class { 'firewall': }\n    Firewall {\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n\nTo install pre-requisites and to create dependencies on your pre & post rules. Consult the README for more information.\n\n##### Changes\n\n* Firewall class manifests (Dan Carley)\n* Firewall and firewallchain persistence (Dan Carley)\n* (GH-134) Autorequire iptables related packages (Dan Carley)\n* Typo in #persist_iptables OS normalisation (Dan Carley)\n* Tests for #persist_iptables (Dan Carley)\n* (GH-129) Replace errant return in autoreq block (Dan Carley)\n\n---------------------------------------\n\n#### 0.1.1 - 2012/2/28\n\nThis release primarily fixes changing parameters in 3.x\n\n##### Changes\n\n* (GH-128) Change method_missing usage to define_method for 3.x compatibility\n* Update travis.yml gem specifications to actually test 2.6\n* Change source in Gemfile to use a specific URL for Ruby 2.0.0 compatibility\n\n---------------------------------------\n\n#### 0.1.0 - 2012/2/24\n\nThis release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won't fall this far behind again :-).\n\n##### Changes\n\n* Add support for MARK target and set-mark property (Johan Huysmans)\n* Fix broken call to super for ruby-1.9.2 in munge (Ken Barber)\n* simple fix of the error message for allowed values of the jump property (Daniel Black)\n* Adding OSPF(v3) protocol to puppetlabs-firewall (Arnoud Vermeer)\n* Display multi-value: port, sport, dport and state command seperated (Daniel Black)\n* Require jump=>LOG for log params (Daniel Black)\n* Reject and document icmp => "any" (Dan Carley)\n* add firewallchain type and iptables_chain provider (Daniel Black)\n* Various fixes for firewallchain resource (Ken Barber)\n* Modify firewallchain name to be chain:table:protocol (Ken Barber)\n* Fix allvalidchain iteration (Ken Barber)\n* Firewall autorequire Firewallchains (Dan Carley)\n* Tests and docstring for chain autorequire (Dan Carley)\n* Fix README so setup instructions actually work (Ken Barber)\n* Support vlan interfaces (interface containing ".") (Johan Huysmans)\n* Add tests for VLAN support for iniface/outiface (Ken Barber)\n* Add the table when deleting rules (Johan Huysmans)\n* Fix tests since we are now prefixing -t)\n* Changed 'jump' to 'action', commands to lower case (Jason Short)\n* Support interface names containing "+" (Simon Deziel)\n* Fix for when iptables-save spews out "FATAL" errors (Sharif Nassar)\n* Fix for incorrect limit command arguments for ip6tables provider (Michael Hsu)\n* Document Util::Firewall.host_to_ip (Dan Carley)\n* Nullify addresses with zero prefixlen (Dan Carley)\n* Add support for --tcp-flags (Thomas Vander Stichele)\n* Make tcp_flags support a feature (Ken Barber)\n* OUTPUT is a valid chain for the mangle table (Adam Gibbins)\n* Enable travis-ci support (Ken Barber)\n* Convert an existing test to CIDR (Dan Carley)\n* Normalise iptables-save to CIDR (Dan Carley)\n* be clearer about what distributions we support (Ken Barber)\n* add gre protocol to list of acceptable protocols (Jason Hancock)\n* Added pkttype property (Ashley Penney)\n* Fix mark to not repeat rules with iptables 1.4.1+ (Sharif Nassar)\n* Stub iptables_version for now so tests run on non-Linux hosts (Ken Barber)\n* Stub iptables facts for set_mark tests (Dan Carley)\n* Update formatting of README to meet Puppet Labs best practices (Will Hopper)\n* Support for ICMP6 type code resolutions (Dan Carley)\n* Insert order hash included chains from different tables (Ken Barber)\n* rspec 2.11 compatibility (Jonathan Boyett)\n* Add missing class declaration in README (sfozz)\n* array_matching is contraindicated (Sharif Nassar)\n* Convert port Fixnum into strings (Sharif Nassar)\n* Update test framework to the modern age (Ken Barber)\n* working with ip6tables support (wuwx)\n* Remove gemfile.lock and add to gitignore (William Van Hevelingen)\n* Update travis and gemfile to be like stdlib travis files (William Van Hevelingen)\n* Add support for -m socket option (Ken Barber)\n* Add support for single --sport and --dport parsing (Ken Barber)\n* Fix tests for Ruby 1.9.3 from 3e13bf3 (Dan Carley)\n* Mock Resolv.getaddress in #host_to_ip (Dan Carley)\n* Update docs for source and dest - they are not arrays (Ken Barber)\n\n---------------------------------------\n\n#### 0.0.4 - 2011/12/05\n\nThis release adds two new parameters, 'uid' and 'gid'. As a part of the owner module, these params allow you to specify a uid, username, gid, or group got a match:\n\n    firewall { '497 match uid':\n      port => '123',\n      proto => 'mangle',\n      chain => 'OUTPUT',\n      action => 'drop'\n      uid => '123'\n    }\n\nThis release also adds value munging for the 'log_level', 'source', and 'destination' parameters. The 'source' and 'destination' now support hostnames:\n\n    firewall { '498 accept from puppetlabs.com':\n      port => '123',\n      proto => 'tcp',\n      source => 'puppetlabs.com',\n      action => 'accept'\n    }\n\n\nThe 'log_level' parameter now supports using log level names, such as 'warn', 'debug', and 'panic':\n\n    firewall { '499 logging':\n      port => '123',\n      proto => 'udp',\n      log_level => 'debug',\n      action => 'drop'\n    }\n\nAdditional changes include iptables and ip6tables version facts, general whitespace cleanup, and adding additional unit tests.\n\n##### Changes\n\n* (#10957) add iptables_version and ip6tables_version facts\n* (#11093) Improve log_level property so it converts names to numbers\n* (#10723) Munge hostnames and IPs to IPs with CIDR\n* (#10718) Add owner-match support\n* (#10997) Add fixtures for ipencap\n* (#11034) Whitespace cleanup\n* (#10690) add port property support to ip6tables\n\n---------------------------------------\n\n#### 0.0.3 - 2011/11/12\n\nThis release introduces a new parameter 'port' which allows you to set both\nsource and destination ports for a match:\n\n    firewall { "500 allow NTP requests":\n      port => "123",\n      proto => "udp",\n      action => "accept",\n    }\n\nWe also have the limit parameter finally working:\n\n    firewall { "500 limit HTTP requests":\n      dport => 80,\n      proto => tcp,\n      limit => "60/sec",\n      burst => 30,\n      action => accept,\n    }\n\nState ordering has been fixed now, and more characters are allowed in the\nnamevar:\n\n* Alphabetical\n* Numbers\n* Punctuation\n* Whitespace\n\n##### Changes\n\n* (#10693) Ensure -m limit is added for iptables when using 'limit' param\n* (#10690) Create new port property\n* (#10700) allow additional characters in comment string\n* (#9082) Sort iptables --state option values internally to keep it consistent across runs\n* (#10324) Remove extraneous whitespace from iptables rule line in spec tests\n\n---------------------------------------\n\n#### 0.0.2 - 2011/10/26\n\nThis is largely a maintanence and cleanup release, but includes the ability to\nspecify ranges of ports in the sport/dport parameter:\n\n    firewall { "500 allow port range":\n      dport => ["3000-3030","5000-5050"],\n      sport => ["1024-65535"],\n      action => "accept",\n    }\n\n##### Changes\n\n* (#10295) Work around bug #4248 whereby the puppet/util paths are not being loaded correctly on the primary Puppet server\n* (#10002) Change to dport and sport to handle ranges, and fix handling of name to name to port\n* (#10263) Fix tests on Puppet 2.6.x\n* (#10163) Cleanup some of the inline documentation and README file to align with general forge usage\n\n---------------------------------------\n\n#### 0.0.1 - 2011/10/18\n\nInitial release.\n\n##### Changes\n\n* (#9362) Create action property and perform transformation for accept, drop, reject value for iptables jump parameter\n* (#10088) Provide a customised version of CONTRIBUTING.md\n* (#10026) Re-arrange provider and type spec files to align with Puppet\n* (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default\n* (#9439) fix parsing and deleting existing rules\n* (#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider\n* (#9576) Stub provider so it works properly outside of Linux\n* (#9576) Align spec framework with Puppet core\n* and lots of other earlier development tasks ...\n
", "license": "
Puppet Firewall Module - Puppet module for managing Firewalls\n\nCopyright (C) 2011-2013 Puppet Labs, Inc.\nCopyright (C) 2011 Jonathan Boyett\nCopyright (C) 2011 Media Temple, Inc.\n\nSome of the iptables code was taken from puppet-iptables which was:\n\nCopyright (C) 2011 Bob.sh Limited\nCopyright (C) 2008 Camptocamp Association\nCopyright (C) 2007 Dmitri Priimak\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-09-10 13:27:07 -0700", "updated_at": "2013-09-10 13:27:07 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-stdlib-3.2.0", "module": { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.2.0", "metadata": { "license": "Apache 2.0", "version": "3.2.0", "types": [ { "doc": " A simple resource type intended to be used as an anchor in a composite class.\n\n In Puppet 2.6, when a class declares another class, the resources in the\n interior class are not contained by the exterior class. This interacts badly\n with the pattern of composing complex modules from smaller classes, as it\n makes it impossible for end users to specify order relationships between the\n exterior class and other modules.\n\n The anchor type lets you work around this. By sandwiching any interior\n classes between two no-op resources that _are_ contained by the exterior\n class, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\n This allows the end user of the ntp module to establish require and before\n relationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }\n\n", "parameters": [ { "doc": "The name of the anchor resource.", "name": "name" } ], "name": "anchor", "properties": [ ] }, { "doc": " Ensures that a given line is contained within a file. The implementation\n matches the full line, including whitespace at the beginning and end. If\n the line is not contained in the given file, Puppet will add the line to\n ensure the desired state. Multiple resources may be declared to manage\n multiple lines in the same file.\n\n Example:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\n In this example, Puppet will ensure both of the specified lines are\n contained in the file /etc/sudoers.\n\n", "providers": [ { "doc": "", "name": "ruby" } ], "parameters": [ { "doc": "An arbitrary name used as the identity of the resource.", "name": "name" }, { "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.", "name": "match" }, { "doc": "The line to be appended to the file located by the path parameter.", "name": "line" }, { "doc": "The file Puppet will ensure contains the line specified by the line parameter.", "name": "path" } ], "name": "file_line", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "description": "Standard Library for Puppet Modules", "source": "git://github.com/puppetlabs/puppetlabs-stdlib", "summary": "Puppet Module Standard Library", "author": "puppetlabs", "dependencies": [ ], "name": "puppetlabs-stdlib", "checksums": { "spec/unit/puppet/parser/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", "spec/unit/puppet/parser/functions/validate_string_spec.rb": "3c04a751615a86656f04d313028a4cf4", "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", "spec/spec_helper.rb": "4449b0cafd8f7b2fb440c0cdb0a1f2b3", "spec/functions/ensure_packages_spec.rb": "935b4aec5ab36bdd0458c1a9b2a93ad5", "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e8cd7432739cb212d40a9148523bd4d7", "spec/unit/puppet/parser/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", "spec/unit/puppet/parser/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", "lib/puppet/parser/functions/ensure_packages.rb": "ca852b2441ca44b91a984094de4e3afc", "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", "lib/puppet/parser/functions/chomp.rb": "7040b3348d2f770f265cf4c8c25c51c5", "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", "spec/unit/puppet/parser/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", "lib/puppet/parser/functions/validate_bool.rb": "4ddffdf5954b15863d18f392950b88f4", "lib/puppet/parser/functions/is_numeric.rb": "6283dd52935fb1aba41958e50c85b1ed", "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", "spec/unit/puppet/parser/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", "spec/unit/puppet/parser/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", "spec/watchr.rb": "b588ddf9ef1c19ab97aa892cc776da73", "lib/puppet/parser/functions/min.rb": "35f1e50e7f9ff6d5b04e48952d4e13bd", "lib/puppet/parser/functions/prefix.rb": "6a2d86233c9435afc1738f60a0c34576", "spec/unit/puppet/parser/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", "spec/unit/puppet/parser/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", "spec/unit/facter/root_home_spec.rb": "4f4c4236ac2368d2e27fd2f3eb606a19", "lib/puppet/parser/functions/flatten.rb": "251d63696564254d41742ecbfbfcb9fd", "spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", "spec/unit/puppet/parser/functions/delete_spec.rb": "0d84186ea618523b4b2a4ca0b5a09c9e", "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", "spec/unit/puppet/parser/functions/flatten_spec.rb": "c1c039171d1baef89452092731b9e003", "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", "spec/unit/puppet/parser/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", "spec/unit/puppet/parser/functions/is_integer_spec.rb": "8237a89bdb32c69c5bd4a275eb7df8b7", "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", "spec/unit/puppet/parser/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "tests/has_ip_network.pp": "2250fc62ed9aec64bd8542ac12829005", "spec/unit/puppet/parser/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", "spec/unit/puppet/parser/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", "lib/puppet/parser/functions/delete.rb": "9b17b9f7f820adf02360147c1a2f4279", "spec/unit/puppet/parser/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", "lib/puppet/parser/functions/chop.rb": "4cc840d63ec172d8533a613676391d39", "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", "spec/unit/puppet/parser/functions/range_spec.rb": "91d69115dea43f62a2dca9a10467d836", "spec/unit/puppet/parser/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", "lib/puppet/parser/functions/abs.rb": "c2f2c4a62a56e7adbf5cf0b292e081fc", "spec/unit/puppet/parser/functions/validate_hash_spec.rb": "399d936c9532e7f328291027b7535ea7", "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", "lib/facter/facter_dot_d.rb": "926b2c2e886a43c615d7663029d43595", "spec/unit/puppet/parser/functions/uriescape_spec.rb": "8d9e15156d93fe29bfe91a2e83352ff4", "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", "lib/puppet/parser/functions/is_float.rb": "491937483b14fbe2594a6e0e9af6acf9", "spec/unit/puppet/parser/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", "lib/puppet/type/anchor.rb": "cc1da7acfe1259d5b86a64e2dea42c34", "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", "lib/puppet/provider/file_line/ruby.rb": "f0f61ee3076d6b8f5883872abe844f37", "spec/unit/puppet/parser/functions/prefix_spec.rb": "16a95b321d76e773812693c80edfbe36", "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", "spec/unit/puppet/parser/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", "lib/puppet/parser/functions/hash.rb": "75fd86c01d5b1e50be1bc8b22d3d0a61", "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", "spec/unit/puppet/parser/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", "lib/puppet/parser/functions/squeeze.rb": "ae5aafb7478cced0ba0c23856e45cec5", "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", "spec/unit/puppet/parser/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", "spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb": "215579d1a544bd62b251bf048c565b26", "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", "spec/unit/puppet/parser/functions/is_float_spec.rb": "6545a48ae74b5b9986f46e0cc177f200", "spec/unit/puppet/parser/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", "spec/unit/puppet/parser/functions/validate_re_spec.rb": "b21292ad2f30c0d43ab2f0c2df0ba7d5", "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", "spec/monkey_patches/publicize_methods.rb": "1b03a4af94f7dac35f7c2809caf372ca", "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", "spec/unit/puppet/parser/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", "lib/puppet/parser/functions/validate_slength.rb": "0ca530d1d3b45c3fe2d604c69acfc22f", "lib/facter/root_home.rb": "f559294cceafcf70799339627d94871d", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "spec/unit/puppet/parser/functions/get_module_path_spec.rb": "24c75fb78853f05d35d041b59232c3f4", "spec/unit/puppet/parser/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", "spec/functions/ensure_resource_spec.rb": "0ff2b16e3b1d23603c6cbfca08109c02", "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", "spec/unit/puppet/parser/functions/merge_spec.rb": "a0e0d7514b90a157def16244cbbf81df", "spec/unit/puppet/parser/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", "spec/unit/puppet/parser/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", "LICENSE": "38a048b9d82e713d4e1b2573e370a756", "tests/init.pp": "1d98070412c76824e66db4b7eb74d433", "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", "spec/unit/facter/util/puppet_settings_spec.rb": "345bcbef720458e25be0190b7638e4d9", "spec/unit/puppet/type/file_line_spec.rb": "0f532215c0467bf323b233c9f1733e37", "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", "spec/unit/puppet/parser/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", "lib/puppet/parser/functions/pick.rb": "2bede116a0651405c47e650bbf942abe", "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", "spec/unit/puppet/parser/functions/str2bool_spec.rb": "a3f9c1e4121a58e02c1614cc771d180d", "lib/puppet/parser/functions/max.rb": "02975799d44ded069c1a0769cbf8b73b", "spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb": "c053cb14a26e820713c882040f0569ab", "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", "spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb": "07839082d24d5a7628fd5bce6c8b35c3", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "spec/unit/puppet/parser/functions/num2bool_spec.rb": "7c80e016a73122fa5f921dac02626d89", "tests/has_interface_with.pp": "384f0afaafc04dcbd6b0bda20214854c", "spec/unit/puppet/parser/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", "spec/unit/puppet/parser/functions/validate_array_spec.rb": "3fd3c8cca1c69e47e89acf27fafd2ddb", "spec/unit/puppet/parser/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", "lib/puppet/type/file_line.rb": "3e8222cb58f3503b3ea7de3647c602a0", "spec/unit/puppet/parser/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", "spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "spec/unit/puppet/parser/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", "spec/unit/puppet/parser/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", "RELEASE_PROCESS.markdown": "1981f306c0047720e37be07bb6c976a4", "spec/unit/puppet/parser/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", "lib/puppet/parser/functions/merge.rb": "52281fe881b762e2adfef20f58dc4180", "CHANGELOG": "0b2b98610735e1634acdf5596dedb262", "spec/unit/puppet/parser/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", "lib/puppet/parser/functions/ensure_resource.rb": "5c2e7990e22e5a532931627b4aaf545b", "spec/unit/puppet/parser/functions/validate_bool_spec.rb": "9b1e15d42a7aaa45e56cca0e60ac1fc3", "lib/puppet/parser/functions/str2bool.rb": "846b49d623cb847c1870d7ac4a6bedf3", "lib/puppet/parser/functions/range.rb": "033048bba333fe429e77e0f2e91db25f", "lib/puppet/parser/functions/is_domain_name.rb": "fba9f855df3bbf90d72dfd5201f65d2b", "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", "README.markdown": "719cd9e9c77c8af555ac54baaf62c036", "spec/unit/puppet/parser/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", "spec/unit/puppet/parser/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", "spec/unit/puppet/parser/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", "spec/unit/puppet/parser/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", "spec/unit/puppet/parser/functions/validate_slength_spec.rb": "a1b4d805149dc0143e9a57e43e1f84bf", "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", "lib/puppet/parser/functions/join.rb": "b28087823456ca5cf943de4a233ac77f", "lib/puppet/parser/functions/is_ip_address.rb": "a53f6e3a5855954148230846ccb3e04d", "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", "spec/unit/puppet/parser/functions/is_numeric_spec.rb": "0527750a0960bae36c14f6705fd50f37", "spec/unit/puppet/parser/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", "spec/unit/puppet/parser/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", "spec/unit/puppet/parser/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", "spec/unit/puppet/parser/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", "spec/unit/puppet/parser/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", "lib/puppet/parser/functions/parseyaml.rb": "6cfee471d287c8d110a3629a9ac31b69", "spec/unit/puppet/parser/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", "spec/unit/puppet/parser/functions/delete_at_spec.rb": "5a4287356b5bd36a6e4c100421215b8e", "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", "lib/puppet/parser/functions/num2bool.rb": "dbdc81982468ebb8ac24ab78d7097ad3", "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", "spec/unit/puppet/parser/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", "spec/unit/puppet/parser/functions/max_spec.rb": "8c8eb040afb373d55c88745377fc2313", "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", "Modulefile": "a635981fa8fed0970b7eb1581e785924", "tests/has_ip_address.pp": "f8ac1b6d3c75c484d0b8b33f24a732b1", "spec/unit/puppet/parser/functions/min_spec.rb": "8371e367c8ff0525308b9cbeeba3ab94", "spec/unit/puppet/parser/functions/pick_spec.rb": "aba6247d3925e373272fca6768fd5403", "spec/unit/puppet/parser/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", "spec/unit/puppet/parser/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", "spec/unit/puppet/type/anchor_spec.rb": "a5478a72a7fab2d215f39982a9230c18", "lib/puppet/parser/functions/uriescape.rb": "9ebc34f1b2f319626512b8cd7cde604c", "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", "lib/puppet/parser/functions/is_integer.rb": "6520458000b349f1c7ba7c9ed382ae0b" }, "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib" }, "tags": [ "puppetlabs", "library", "stdlib", "standard", "stages" ], "file_uri": "/v3/files/puppetlabs-stdlib-3.2.0.tar.gz", "file_size": 55678, "file_md5": "aeef7a080c7367728dcb47239cddb5ef", "downloads": 51733, "readme": "

Puppet Labs Standard Library

\n\n

This module provides a "standard library" of resources for developing Puppet\nModules. This modules will include the following additions to Puppet

\n\n
    \n
  • Stages
  • \n
  • Facts
  • \n
  • Functions
  • \n
  • Defined resource types
  • \n
  • Types
  • \n
  • Providers
  • \n
\n\n

This module is officially curated and provided by Puppet Labs. The modules\nPuppet Labs writes and distributes will make heavy use of this standard\nlibrary.

\n\n

To report or research a bug with any part of this module, please go to\nhttp://projects.puppetlabs.com/projects/stdlib

\n\n

Versions

\n\n

This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of Puppet\nEnterprise and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically "merged up" into main. The current\nlist of integration branches are:

\n\n
    \n
  • v2.1.x (v2.1.1 released in PE 1.2, 1.2.1, 1.2.3, 1.2.4)
  • \n
  • v2.2.x (Never released as part of PE, only to the Forge)
  • \n
  • v2.3.x (Released in PE 2.5.x)
  • \n
  • main (mainline development branch)
  • \n
\n\n

The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.

\n\n

Compatibility

\n\n

The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.

\n\n

stdlib 2.x

\n\n

All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.

\n\n

stdlib 3.x

\n\n

The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2.7.

\n\n

Functions

\n\n

abs

\n\n

Returns the absolute value of a number, for example -34.56 becomes 34.56. Takes\na single integer and float value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

bool2num

\n\n

Converts a boolean to a number. Converts the values:\nfalse, f, 0, n, and no to 0\ntrue, t, 1, y, and yes to 1\n Requires a single boolean or string as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

capitalize

\n\n

Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chomp

\n\n

Removes the record separator from the end of a string or an array of strings,\nfor example hello\\n becomes hello. Requires a single string or array as an\ninput.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chop

\n\n

Returns a new string with the last character removed. If the string ends\nwith \\r\\n, both characters are removed. Applying chop to an empty\nstring returns an empty string. If you wish to merely remove record\nseparators then you should use the chomp function.\nRequires a string or array of strings as input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

defined_with_params

\n\n

Takes a resource reference and an optional hash of attributes.

\n\n

Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.

\n\n
user { 'dan':\n  ensure => present,\n}\n\nif ! defined_with_params(User[dan], {'ensure' => 'present' }) {\n  user { 'dan': ensure => present, }\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete

\n\n

Deletes a selected element from an array.

\n\n

Examples:

\n\n
delete(['a','b','c'], 'b')\n
\n\n

Would return: ['a','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete_at

\n\n

Deletes a determined indexed value from an array.

\n\n

Examples:

\n\n
delete_at(['a','b','c'], 1)\n
\n\n

Would return: ['a','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

downcase

\n\n

Converts the case of a string or all strings in an array to lower case.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

empty

\n\n

Returns true if the variable is empty.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

ensure_resource

\n\n

Takes a resource type, title, and a list of attributes that describe a\nresource.

\n\n
user { 'dan':\n  ensure => present,\n}\n
\n\n

This example only creates the resource if it does not already exist:

\n\n
ensure_resource('user, 'dan', {'ensure' => 'present' })\n
\n\n

If the resource already exists but does not match the specified parameters,\nthis function will attempt to recreate the resource leading to a duplicate\nresource definition error.

\n\n
    \n
  • Type: statement
  • \n
\n\n

flatten

\n\n

This function flattens any deeply nested arrays and returns a single flat array\nas a result.

\n\n

Examples:

\n\n
flatten(['a', ['b', ['c']]])\n
\n\n

Would return: ['a','b','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

fqdn_rotate

\n\n

Rotates an array a random number of times based on a nodes fqdn.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

get_module_path

\n\n

Returns the absolute path of the specified module for the current\nenvironment.

\n\n

Example:\n $module_path = get_module_path('stdlib')

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getvar

\n\n

Lookup a variable in a remote namespace.

\n\n

For example:

\n\n
$foo = getvar('site::data::foo')\n# Equivalent to $foo = $site::data::foo\n
\n\n

This is useful if the namespace itself is stored in a string:

\n\n
$datalocation = 'site::data'\n$bar = getvar("${datalocation}::bar")\n# Equivalent to $bar = $site::data::bar\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

grep

\n\n

This function searches through an array and returns any elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
grep(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['aaa','aaaddd']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_key

\n\n

Determine if a hash has a certain key value.

\n\n

Example:

\n\n
$my_hash = {'key_one' => 'value_one'}\nif has_key($my_hash, 'key_two') {\n  notice('we will not reach here')\n}\nif has_key($my_hash, 'key_one') {\n  notice('this will be printed')\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

hash

\n\n

This function converts and array into a hash.

\n\n

Examples:

\n\n
hash(['a',1,'b',2,'c',3])\n
\n\n

Would return: {'a'=>1,'b'=>2,'c'=>3}

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_array

\n\n

Returns true if the variable passed to this function is an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_domain_name

\n\n

Returns true if the string passed to this function is a syntactically correct domain name.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_float

\n\n

Returns true if the variable passed to this function is a float.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_hash

\n\n

Returns true if the variable passed to this function is a hash.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_integer

\n\n

Returns true if the variable returned to this string is an integer.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_ip_address

\n\n

Returns true if the string passed to this function is a valid IP address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_mac_address

\n\n

Returns true if the string passed to this function is a valid mac address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_numeric

\n\n

Returns true if the variable passed to this function is a number.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_string

\n\n

Returns true if the variable passed to this function is a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join

\n\n

This function joins an array into a string using a seperator.

\n\n

Examples:

\n\n
join(['a','b','c'], ",")\n
\n\n

Would result in: "a,b,c"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

keys

\n\n

Returns the keys of a hash as an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

loadyaml

\n\n

Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.

\n\n

For example:

\n\n
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

lstrip

\n\n

Strips leading spaces to the left of a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

member

\n\n

This function determines if a variable is a member of an array.

\n\n

Examples:

\n\n
member(['a','b'], 'b')\n
\n\n

Would return: true

\n\n
member(['a','b'], 'c')\n
\n\n

Would return: false

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

merge

\n\n

Merges two or more hashes together and returns the resulting hash.

\n\n

For example:

\n\n
$hash1 = {'one' => 1, 'two', => 2}\n$hash2 = {'two' => 'dos', 'three', => 'tres'}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash =  {'one' => 1, 'two' => 'dos', 'three' => 'tres'}\n
\n\n

When there is a duplicate key, the key in the rightmost hash will "win."

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

num2bool

\n\n

This function converts a number into a true boolean. Zero becomes false. Numbers\nhigher then 0 become true.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parsejson

\n\n

This function accepts JSON as a string and converts into the correct Puppet\nstructure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parseyaml

\n\n

This function accepts YAML as a string and converts it into the correct\nPuppet structure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

prefix

\n\n

This function applies a prefix to all elements in an array.

\n\n

Examles:

\n\n
prefix(['a','b','c'], 'p')\n
\n\n

Will return: ['pa','pb','pc']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

range

\n\n

When given range in the form of (start, stop) it will extrapolate a range as\nan array.

\n\n

Examples:

\n\n
range("0", "9")\n
\n\n

Will return: [0,1,2,3,4,5,6,7,8,9]

\n\n
range("00", "09")\n
\n\n

Will return: 0,1,2,3,4,5,6,7,8,9

\n\n
range("a", "c")\n
\n\n

Will return: ["a","b","c"]

\n\n
range("host01", "host10")\n
\n\n

Will return: ["host01", "host02", ..., "host09", "host10"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reverse

\n\n

Reverses the order of a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

rstrip

\n\n

Strips leading spaces to the right of the string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

shuffle

\n\n

Randomizes the order of a string or array elements.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

size

\n\n

Returns the number of elements in a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

sort

\n\n

Sorts strings and arrays lexically.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

squeeze

\n\n

Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2bool

\n\n

This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to 'true' and strings that contain things\nlike: 0, f, n, false, no to 'false'.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2saltedsha512

\n\n

This converts a string to a salted-SHA512 password hash (which is used for OS X\nversions >= 10.7). Given any simple string, you will get a hex version of a\nsalted-SHA512 password hash that can be inserted into your Puppet manifests as\na valid password attribute.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strftime

\n\n

This function returns formatted time.

\n\n

Examples:

\n\n

To return the time since epoch:

\n\n
strftime("%s")\n
\n\n

To return the date:

\n\n
strftime("%Y-%m-%d")\n
\n\n

Format meaning:

\n\n
%a - The abbreviated weekday name (``Sun'')\n%A - The  full  weekday  name (``Sunday'')\n%b - The abbreviated month name (``Jan'')\n%B - The  full  month  name (``January'')\n%c - The preferred local date and time representation\n%C - Century (20 in 2009)\n%d - Day of the month (01..31)\n%D - Date (%m/%d/%y)\n%e - Day of the month, blank-padded ( 1..31)\n%F - Equivalent to %Y-%m-%d (the ISO 8601 date format)\n%h - Equivalent to %b\n%H - Hour of the day, 24-hour clock (00..23)\n%I - Hour of the day, 12-hour clock (01..12)\n%j - Day of the year (001..366)\n%k - hour, 24-hour clock, blank-padded ( 0..23)\n%l - hour, 12-hour clock, blank-padded ( 0..12)\n%L - Millisecond of the second (000..999)\n%m - Month of the year (01..12)\n%M - Minute of the hour (00..59)\n%n - Newline (\n
\n\n

)\n %N - Fractional seconds digits, default is 9 digits (nanosecond)\n %3N millisecond (3 digits)\n %6N microsecond (6 digits)\n %9N nanosecond (9 digits)\n %p - Meridian indicator (AM'' orPM'')\n %P - Meridian indicator (am'' orpm'')\n %r - time, 12-hour (same as %I:%M:%S %p)\n %R - time, 24-hour (%H:%M)\n %s - Number of seconds since 1970-01-01 00:00:00 UTC.\n %S - Second of the minute (00..60)\n %t - Tab character ( )\n %T - time, 24-hour (%H:%M:%S)\n %u - Day of the week as a decimal, Monday being 1. (1..7)\n %U - Week number of the current year,\n starting with the first Sunday as the first\n day of the first week (00..53)\n %v - VMS date (%e-%b-%Y)\n %V - Week number of year according to ISO 8601 (01..53)\n %W - Week number of the current year,\n starting with the first Monday as the first\n day of the first week (00..53)\n %w - Day of the week (Sunday is 0, 0..6)\n %x - Preferred representation for the date alone, no time\n %X - Preferred representation for the time alone, no date\n %y - Year without a century (00..99)\n %Y - Year with century\n %z - Time zone as hour offset from UTC (e.g. +0900)\n %Z - Time zone name\n %% - Literal ``%'' character

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strip

\n\n

This function removes leading and trailing whitespace from a string or from\nevery string inside an array.

\n\n

Examples:

\n\n
strip("    aaa   ")\n
\n\n

Would result in: "aaa"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

swapcase

\n\n

This function will swap the existing case of a string.

\n\n

Examples:

\n\n
swapcase("aBcD")\n
\n\n

Would result in: "AbCd"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

time

\n\n

This function will return the current time since epoch as an integer.

\n\n

Examples:

\n\n
time()\n
\n\n

Will return something like: 1311972653

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

to_bytes

\n\n

Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

type

\n\n

Returns the type when passed a variable. Type can be one of:

\n\n
    \n
  • string
  • \n
  • array
  • \n
  • hash
  • \n
  • float
  • \n
  • integer
  • \n
  • boolean

  • \n
  • Type: rvalue

  • \n
\n\n

unique

\n\n

This function will remove duplicates from strings and arrays.

\n\n

Examples:

\n\n
unique("aabbcc")\n
\n\n

Will return:

\n\n
abc\n
\n\n

You can also use this with arrays:

\n\n
unique(["a","a","b","b","c","c"])\n
\n\n

This returns:

\n\n
["a","b","c"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

upcase

\n\n

Converts a string or an array of strings to uppercase.

\n\n

Examples:

\n\n
upcase("abcd")\n
\n\n

Will return:

\n\n
ABCD\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

validate_absolute_path

\n\n

Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.

\n\n

The following values will pass:

\n\n
$my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"\nvalidate_absolute_path($my_path)\n$my_path2 = "/var/lib/puppet"\nvalidate_absolute_path($my_path2)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_absolute_path(true)\nvalidate_absolute_path([ 'var/lib/puppet', '/var/foo' ])\nvalidate_absolute_path([ '/var/lib/puppet', 'var/foo' ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_array

\n\n

Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_array = [ 'one', 'two' ]\nvalidate_array($my_array)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_array(true)\nvalidate_array('some_string')\n$undefined = undef\nvalidate_array($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_bool

\n\n

Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
$some_array = [ true ]\nvalidate_bool("false")\nvalidate_bool("true")\nvalidate_bool($some_array)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_hash

\n\n

Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_hash = { 'one' => 'two' }\nvalidate_hash($my_hash)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_hash(true)\nvalidate_hash('some_string')\n$undefined = undef\nvalidate_hash($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_re

\n\n

Perform simple validation of a string against one or more regular\nexpressions. The first argument of this function should be a string to\ntest, and the second argument should be a stringified regular expression\n(without the // delimiters) or an array of regular expressions. If none\nof the regular expressions match the string passed in, compilation will\nabort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

The following strings will validate against the regular expressions:

\n\n
validate_re('one', '^one$')\nvalidate_re('one', [ '^one', '^two' ])\n
\n\n

The following strings will fail to validate, causing compilation to abort:

\n\n
validate_re('one', [ '^two', '^three' ])\n
\n\n

A helpful error message can be returned like this:

\n\n
validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_slength

\n\n

Validate that the first argument is a string (or an array of strings), and\nless/equal to than the length of the second argument. It fails if the first\nargument is not a string or array of strings, and if arg 2 is not convertable\nto a number.

\n\n

The following values will pass:

\n\n

validate_slength("discombobulate",17)\n validate_slength(["discombobulate","moo"],17)

\n\n

The following valueis will not:

\n\n

validate_slength("discombobulate",1)\n validate_slength(["discombobulate","thermometer"],5)

\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_string

\n\n

Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_string = "one two"\nvalidate_string($my_string, 'three')\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_string(true)\nvalidate_string([ 'some', 'array' ])\n$undefined = undef\nvalidate_string($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

values

\n\n

When given a hash this function will return the values of that hash.

\n\n

Examples:

\n\n
$hash = {\n  'a' => 1,\n  'b' => 2,\n  'c' => 3,\n}\nvalues($hash)\n
\n\n

This example would return:

\n\n
[1,2,3]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

values_at

\n\n

Finds value inside an array based on location.

\n\n

The first argument is the array you want to analyze, and the second element can\nbe a combination of:

\n\n
    \n
  • A single numeric index
  • \n
  • A range in the form of 'start-stop' (eg. 4-9)
  • \n
  • An array combining the above
  • \n
\n\n

Examples:

\n\n
values_at(['a','b','c'], 2)\n
\n\n

Would return ['c'].

\n\n
values_at(['a','b','c'], ["0-1"])\n
\n\n

Would return ['a','b'].

\n\n
values_at(['a','b','c','d','e'], [0, "2-3"])\n
\n\n

Would return ['a','c','d'].

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

zip

\n\n

Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.

\n\n

Example:

\n\n
zip(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n
["1", "4"], ["2", "5"], ["3", "6"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n
", "changelog": "
2012-11-28 - Peter Meier <peter.meier@immerda.ch> - 3.2.0\n * Add reject() function (a79b2cd)\n\n2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0\n * (#14670) autorequire a file_line resource's path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0\n * stdlib 3.0 drops support with Puppet 2.6\n * stdlib 3.0 preserves support with Puppet 2.7\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0\n * Add support for a 'match' parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0\n * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2\n * Make file_line default to ensure => present (1373e70)\n * Memoize file_line spec instance variables (20aacc5)\n * Fix spec tests using the new spec_helper (1ebfa5d)\n * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)\n * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)\n * (#13439) Fix test failures with Puppet 2.6.x (665610b)\n * (#13439) refactor spec helper for compatibility with both puppet 2.7 and main (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3\n* (#11607) Add Rakefile to enable spec testing\n* (#12377) Avoid infinite loop when retrying require json\n\n2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0\n* Add a large number of new Puppet functions\n* Backwards compatibility preserved with 2.2.x\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0\n* #10285 - Refactor json to use pson instead.\n* Maint  - Add watchr autotest script\n* Maint  - Make rspec tests work with Puppet 2.6.4\n* #9859  - Add root_home fact and tests\n\n2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* /etc/facter/facts.d\n* /etc/puppetlabs/facter/facts.d\n\n2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0\n* Add R.I. Pienaar's facts.d custom facter fact\n* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are\n  automatically loaded now.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0\n* Rename whole_line to file_line\n* This is an API change and as such motivating a 2.0.0 release according to semver.org.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0\n* Rename append_line to whole_line\n* This is an API change and as such motivating a 1.1.0 release.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0\n* Initial stable release\n* Add validate_array and validate_string functions\n* Make merge() function work with Ruby 1.8.5\n* Add hash merging function\n* Add has_key function\n* Add loadyaml() function\n* Add append_line native\n\n2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Add stdlib::stages class with a standard set of stages\n
", "license": "
Copyright (C) 2011 Puppet Labs Inc\n\nand some parts:\n\nCopyright (C) 2011 Krzysztof Wilczynski\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-11-28 14:53:03 -0800", "updated_at": "2012-11-28 14:53:03 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apt-1.2.0", "module": { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.2.0", "metadata": { "name": "puppetlabs-apt", "version": "1.2.0", "summary": "Puppet Labs Apt Module", "author": "Evolving Web / Puppet Labs", "description": "APT Module for Puppet", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ ], "checksums": { ".bundle/config": "b898efea5e8783d6593fcdabec67e925", ".fixtures.yml": "0c43f56b0bb8e8d04e8051a0e7aa37a5", ".forge-release/pom.xml": "6d418d97f34067f501aff90c2fe52b94", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".travis.yml": "782420dcc9d6412c79c30f03b1f3613c", "CHANGELOG": "d2b6ac5ca0a7dda91b7103d6ff67ed8d", "Gemfile": "6bac61e5713dbf7c477c0c8dccc00cf6", "Gemfile.lock": "f16cfb9dbccc2174ede52c63431b6193", "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d", "Modulefile": "c84323ad284755f09d422de788bf033a", "README.md": "48d8b527c8c0efa83223be6aebfe7114", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70", "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd", "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3", "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5", "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5", "manifests/force.pp": "cf871e869f4114f32ab164de2a67e7e2", "manifests/init.pp": "670b069a94cfa6766715e2577e48fb15", "manifests/key.pp": "3cf082ed91a3933ab7218d1be3464f4f", "manifests/params.pp": "e34c27699b574e957940952f37714694", "manifests/pin.pp": "ee5610e8f493e4db81b5eefc675f62d5", "manifests/ppa.pp": "16da338782f3c4b55718c7a8d799bd98", "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9", "manifests/source.pp": "6eab8d33c173a066f5dec8474efdedb6", "manifests/update.pp": "bff1331f5467f146edf9fa43475fe532", "spec/classes/apt_spec.rb": "54841b04b42026770ed6d744a82c55df", "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f", "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e", "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7", "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4", "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4", "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5", "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c", "spec/defines/force_spec.rb": "97098c5b123be49e321e71cda288fe53", "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0", "spec/defines/pin_spec.rb": "c912e59e9e3d1145280d659cccabe72b", "spec/defines/ppa_spec.rb": "02394ce677512ef84d3868a4cc9be9ce", "spec/defines/source_spec.rb": "caa3be1996630704730af19bc1ee798c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "templates/pin.pref.erb": "623249839cee7788fa0805a3474396db", "templates/source.list.erb": "9ddccd6b59757d40e99158dbfe9a97e2", "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88", "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb", "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca", "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600", "tests/init.pp": "551138eb704e71ab3687932dda429a81", "tests/key.pp": "8a585cc7cc10671cc7b8795bf6a0a7ce", "tests/params.pp": "900db40f3fc84b0be173278df2ebff35", "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff", "tests/release.pp": "53ce5debe6fa5bee42821767599cc768", "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98" }, "source": "https://github.com/puppetlabs/puppetlabs-apt", "project_page": "https://github.com/puppetlabs/puppetlabs-apt", "license": "Apache License 2.0" }, "tags": [ "apt", "debian", "ubuntu", "dpkg", "apt-get", "aptitude", "ppa" ], "file_uri": "/v3/files/puppetlabs-apt-1.2.0.tar.gz", "file_size": 21622, "file_md5": "8bb36e43b8755bbed80dc6ab58f7dba4", "downloads": 38345, "readme": "

apt

\n\n

\"Build

\n\n

Description

\n\n

Provides helpful definitions for dealing with Apt.

\n\n

Overview

\n\n

The APT module provides a simple interface for managing APT source, key, and definitions with Puppet.

\n\n

Module Description

\n\n

APT automates obtaining and installing software packages on *nix systems.

\n\n

Setup

\n\n

What APT affects:

\n\n
    \n
  • package/service/configuration files for APT
  • \n
  • your system's sources.list file and sources.list.d directory\n\n
      \n
    • NOTE: Setting the purge_sources_list and purge_sources_list_d parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.
    • \n
  • \n
  • system repositories
  • \n
  • authentication keys
  • \n
  • wget (optional)
  • \n
\n\n

Beginning with APT

\n\n

To begin using the APT module with default parameters, declare the class

\n\n
class { 'apt': }\n
\n\n

Puppet code that uses anything from the APT module requires that the core apt class be declared.

\n\n

Usage

\n\n

Using the APT module consists predominantly in declaring classes that provide desired functionality and features.

\n\n

apt

\n\n

apt provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.

\n\n

The parameters for apt are not required in general and are predominantly for development environment use-cases.

\n\n
class { 'apt':\n  always_apt_update    => false,\n  disable_keys         => undef,\n  proxy_host           => false,\n  proxy_port           => '8080',\n  purge_sources_list   => false,\n  purge_sources_list_d => false,\n  purge_preferences_d  => false\n}\n
\n\n

Puppet will manage your system's sources.list file and sources.list.d directory but will do its best to respect existing content.

\n\n

If you declare your apt class with purge_sources_list and purge_sources_list_d set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.

\n\n

apt::builddep

\n\n

Installs the build depends of a specified package.

\n\n
apt::builddep { 'glusterfs-server': }\n
\n\n

apt::force

\n\n

Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
apt::force { 'glusterfs-server':\n  release => 'unstable',\n  version => '3.0.3',\n  require => Apt::Source['debian_unstable'],\n}\n
\n\n

apt::key

\n\n

Adds a key to the list of keys used by APT to authenticate packages.

\n\n
apt::key { 'puppetlabs':\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n\napt::key { 'jenkins':\n  key        => 'D50582E6',\n  key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',\n}\n
\n\n

Note that use of key_source requires wget to be installed and working.

\n\n

apt::pin

\n\n

Adds an apt pin for a certain release.

\n\n
apt::pin { 'karmic': priority => 700 }\napt::pin { 'karmic-updates': priority => 700 }\napt::pin { 'karmic-security': priority => 700 }\n
\n\n

Note you can also specifying more complex pins using distribution properties.

\n\n
apt::pin { 'stable':\n  priority        => -10,\n  originator      => 'Debian',\n  release_version => '3.0',\n  component       => 'main',\n  label           => 'Debian'\n}\n
\n\n

apt::ppa

\n\n

Adds a ppa repository using add-apt-repository.

\n\n
apt::ppa { 'ppa:drizzle-developers/ppa': }\n
\n\n

apt::release

\n\n

Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
class { 'apt::release':\n  release_id => 'precise',\n}\n
\n\n

apt::source

\n\n

Adds an apt source to /etc/apt/sources.list.d/.

\n\n
apt::source { 'debian_unstable':\n  location          => 'http://debian.mirror.iweb.ca/debian/',\n  release           => 'unstable',\n  repos             => 'main contrib non-free',\n  required_packages => 'debian-keyring debian-archive-keyring',\n  key               => '55BE302B',\n  key_server        => 'subkeys.pgp.net',\n  pin               => '-10',\n  include_src       => true\n}\n
\n\n

If you would like to configure your system so the source is the Puppet Labs APT repository

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

Testing

\n\n

The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources.

\n\n

Example Test

\n\n

This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.

\n\n

Check your smoke test for syntax errors

\n\n
$ puppet parser validate tests/puppetlabs-apt.pp\n
\n\n

If you receive no output from that command, it means nothing is wrong. Then apply the code

\n\n
$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e'\ninfo: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]\nnotice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>\n
\n\n

The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.

\n\n

Implementation

\n\n

apt::backports

\n\n

Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to $lsbdistcodename. Setting this manually can cause undefined behavior (read: universe exploding).

\n\n

Limitations

\n\n

This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Contributors

\n\n

A lot of great people have contributed to this module. A somewhat current list follows:

\n\n\n
", "changelog": "
## puppetlabs-apt changelog\n\nRelease notes for the puppetlabs-apt module.\n\n1.2.0\n=====\n\nFeatures:\n- Add geppetto `.project` natures\n- Add GH auto-release\n- Add `apt::key::key_options` parameter\n- Add complex pin support using distribution properties for `apt::pin` via new properties:\n  - `apt::pin::codename`\n  - `apt::pin::release_version`\n  - `apt::pin::component`\n  - `apt::pin::originator`\n  - `apt::pin::label`\n- Add source architecture support to `apt::source::architecture`\n\nBugfixes:\n- Use apt-get instead of aptitude in apt::force\n- Update default backports location\n- Add dependency for required packages before apt-get update\n\n\n1.1.1\n=====\n\nThis is a bug fix release that resolves a number of issues:\n\n* By changing template variable usage, we remove the deprecation warnings\n  for Puppet 3.2.x\n* Fixed proxy file removal, when proxy absent\n\nSome documentation, style and whitespaces changes were also merged. This\nrelease also introduced proper rspec-puppet unit testing on Travis-CI to help\nreduce regression.\n\nThanks to all the community contributors below that made this patch possible.\n\n#### Detail Changes\n\n* fix minor comment type (Chris Rutter)\n* whitespace fixes (Michael Moll)\n* Update travis config file (William Van Hevelingen)\n* Build all branches on travis (William Van Hevelingen)\n* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)\n* Updated content to conform to README best practices template (Lauren Rother)\n* Fix apt::release example in readme (Brian Galey)\n* add @ to variables in template (Peter Hoeg)\n* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)\n* Update travis.yml to latest versions of puppet (Ken Barber)\n* Fix proxy file removal (Scott Barber)\n* Add spec test for removing proxy configuration (Dean Reilly)\n* Fix apt::key listing longer than 8 chars (Benjamin Knofe)\n\n\n---------------------------------------\n\n1.1.0\n=====\n\nThis release includes Ubuntu 12.10 (Quantal) support for PPAs.\n\n---------------------------------------\n\n2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4\n * Fix ppa list filename when there is a period in the PPA name\n * Add .pref extension to apt preferences files\n * Allow preferences to be purged\n * Extend pin support\n\n2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support 'ensure => absent' for all defined types\n * add apt::conf\n * add apt::backports\n * fixed Modulefile for module tool dependency resolution\n * configure proxy before doing apt-get update\n * use apt-get update instead of aptitude for apt::ppa\n * add support to pin release\n\n\n2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2\n41cedbb (#13261) Add real examples to smoke tests.\nd159a78 (#13261) Add key.pp smoke test\n7116c7a (#13261) Replace foo source with puppetlabs source\n1ead0bf Ignore pkg directory.\n9c13872 (#13289) Fix some more style violations\n0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path\na758247 (#13289) Clean up style violations and fix corresponding tests\n99c3fd3 (#13289) Add puppet lint tests to Rakefile\n5148cbf (#13125) Apt keys should be case insensitive\nb9607a4 Convert apt::key to use anchors\n\n2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1\nd4fec56 Modify apt::source release parameter test\n1132a07 (#12917) Add contributors to README\n8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it\n7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input\nbe2cc3e (#12522) Adjust spec test for splitting purge\n7dc60ae (#12522) Split purge option to spare sources.list\n9059c4e Fix source specs to test all key permutations\n8acb202 Add test for python-software-properties package\na4af11f Check if python-software-properties is defined before attempting to define it.\n1dcbf3d Add tests for required_packages change\nf3735d2 Allow duplicate $required_packages\n74c8371 (#12430) Add tests for changes to apt module\n97ebb2d Test two sources with the same key\n1160bcd (#12526) Add ability to reverse apt { disable_keys => true }\n2842d73 Add Modulefile to puppet-apt\nc657742 Allow the use of the same key in multiple sources\n8c27963 (#12522) Adding purge option to apt class\n997c9fd (#12529) Add unit test for apt proxy settings\n50f3cca (#12529) Add parameter to support setting a proxy for apt\nd522877 (#12094) Replace chained .with_* with a hash\n8cf1bd0 (#12094) Remove deprecated spec.opts file\n2d688f4 (#12094) Add rspec-puppet tests for apt\n0fb5f78 (#12094) Replace name with path in file resources\nf759bc0 (#11953) Apt::force passes $version to aptitude\nf71db53 (#11413) Add spec test for apt::force to verify changes to unless\n2f5d317 (#11413) Update dpkg query used by apt::force\ncf6caa1 (#10451) Add test coverage to apt::ppa\n0dd697d include_src parameter in example; Whitespace cleanup\nb662eb8 fix typos in "repositories"\n1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added\n864302a Set the pin priority before adding the source (Fix #10449)\n1de4e0a Refactored as per mlitteken\n1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!\n52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep\n5c05fa0 added builddep command.\na11af50 added the ability to specify the content of a key\nc42db0f Fixes ppa test.\n77d2b0d reformatted whitespace to match recommended style of 2 space indentation.\n27ebdfc ignore swap files.\n377d58a added smoke tests for module.\n18f614b reformatted apt::ppa according to recommended style.\nd8a1e4e Created a params class to hold global data.\n636ae85 Added two params for apt class\n148fc73 Update LICENSE.\ned2d19e Support ability to add more than one PPA\n420d537 Add call to apt-update after add-apt-repository in apt::ppa\n945be77 Add package definition for python-software-properties\n71fc425 Abs paths for all commands\n9d51cd1 Adding LICENSE\n71796e3 Heading fix in README\n87777d8 Typo in README\nf848bac First commit\n
", "license": "
Copyright (c) 2011 Evolving Web Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2013-07-05 10:27:35 -0700", "updated_at": "2013-07-05 10:27:35 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-git-0.0.3", "module": { "uri": "/v3/modules/puppetlabs-git", "name": "git", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.3", "metadata": { "name": "puppetlabs-git", "version": "0.0.3", "source": "git://github.com/puppetlabs/puppetlabs-git.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "module for installing git", "description": "module for installing git", "project_page": "https://github.com/puppetlabs/puppetlabs-git/", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "f2e3e57948da2dcab3bdbe782efd6b11", "LICENSE": "0e5ccf641e613489e66aa98271dbe798", "Modulefile": "f971ce8e90cb5cdf63722c92e0497110", "README.md": "8f241391b0165fe286588154a5321aee", "manifests/gitosis.pp": "6b1bbd3a43baa63c63f5d03dcb9fbe95", "manifests/init.pp": "520e2a141b314dd9b859a0f2d31a338e", "tests/gitosis.pp": "4a9f134fbd08096dac65aafa9fbc0742", "tests/init.pp": "bbf47fdd0ad67c6fa1d47d39fdd6a94b" } }, "tags": [ ], "file_uri": "/v3/files/puppetlabs-git-0.0.3.tar.gz", "file_size": 5931, "file_md5": "64e8403025a9d4fb8270cb53b37a6959", "downloads": 31939, "readme": "

git

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the [Modulename] module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with [Modulename]\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Limitations - OS compatibility, etc.
  10. \n
  11. Development - Guide for contributing to the module
  12. \n
\n\n

Overview

\n\n

Simple module that can install git or gitosis

\n\n

Module Description

\n\n

This module installs the git revision control system on a target node. It does not manage a git server or any associated services; it simply ensures a bare minimum set of features (e.g. just a package) to use git.

\n\n

Setup

\n\n

What git affects

\n\n
    \n
  • Package['git']
  • \n
\n\n

The specifics managed by the module may vary depending on the platform.

\n\n

Usage

\n\n

Simply include the git class.

\n\n
include git\n
\n\n

Limitations

\n\n

This module is known to work with the following operating system families:

\n\n
    \n
  • RedHat 5, 6
  • \n
  • Debian 6.0.7 or newer
  • \n
  • Ubuntu 12.04 or newer
  • \n
\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": null, "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-09-10 08:41:17 -0700", "updated_at": "2013-09-10 08:41:17 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.6.0", "metadata": { "summary": "Puppet module for Apache", "author": "puppetlabs", "version": "0.6.0", "types": [ { "doc": "Manage Apache 2 modules", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" }, { "doc": "Module identifier string used by LoadModule. Default: module-name_module", "name": "identifier" } ], "name": "a2mod" } ], "checksums": { "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/defines/vhost/proxy_spec.rb": "de5cd37d9137791383b6a521feddfb82", "templates/httpd.conf.erb": "63e07e1d3428ecc3da8e812eb2524978", "spec/defines/vhost/redirect_spec.rb": "98f2a7022b7302a771d811e424454639", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "Gemfile": "e87c237ce1d9c2a91e439b8b6d5535a9", "CHANGELOG": "c682326786c52fa91a2f13ae48b4d018", "manifests/vhost/proxy.pp": "1b907bd712e0ac17385cd822a992d87d", "Modulefile": "32454a7842eb7df4461e4b0bf52a15bb", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "spec/classes/php_spec.rb": "7c176dcb6cf35adce2d0ff3d17678f8a", "manifests/params.pp": "df442b5ea6cd7ec31e7eca15ac6b6f87", "manifests/mod/disk_cache.pp": "a6ce6b0d3393bff8287f6267dd49bc82", "manifests/vhost/redirect.pp": "7fb0fe676efa6bbc7de653d0651235c1", "manifests/mod/proxy_html.pp": "8cb51fa968a18d957274a2b68cca8216", "README.md": "9e8a84ba0cf502551d3b1c0e34320864", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "templates/vhost-default.conf.erb": "6d0ca4c613f92f58f5e960ec0512d3f4", "spec/classes/mod/ssl_spec.rb": "df737098c4bd03179e29d0c22a80a565", "templates/vhost-proxy.conf.erb": "21b2be5facb504dc7874f705c7c0882f", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "spec/classes/dev_spec.rb": "64d66d5074a1d634d765db182bea5e43", "spec/classes/python_spec.rb": "ce7b11e4fb4e7bfe5b5c18ded9d24897", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "spec/classes/mod/python_spec.rb": "99f05654c0b748ab18096c5cf4b74781", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "manifests/mod/dev.pp": "71234485e642f0e8cdd8774670d48b7f", "spec/classes/mod/wsgi_spec.rb": "7a05c23e66b027d4738ce1368f6d9f43", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "manifests/vhost.pp": "1643658d86e883b2bb68c4e8a2674035", "manifests/mod/dav_fs.pp": "c6acce86fe14f75521dc8c2920ccedf7", "manifests/mod/php.pp": "6de0671e78c1411cc0713f80075ef61f", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "manifests/mod/python.pp": "344f7b359d801ee6942211726004fa93", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/defines/mod_spec.rb": "c7e74bfdc295af1c0280a7df9828dea0", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/mod.pp": "f8e6c202844b424d4b4b730813f4c6d3", "lib/puppet/provider/a2mod/redhat.rb": "90b9add30cf9acf2289a51d9f4c31bd7", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "spec/classes/apache_spec.rb": "10f2a7629c7e596864f5c0b3c2ece6cf", "manifests/dev.pp": "c263f8db2a35361e9dfdef30477f8ee3", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "spec/classes/ssl_spec.rb": "67c8ccf6b5055f50f40978b221873c88", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/init.pp": "91cc24165436ab241855eb897fcc71b9", "manifests/mod/ssl.pp": "2ffd543847785cd2f916f244f8742448", "spec/classes/params_spec.rb": "41f4e90e9cbe23e5c81831248b2f3cd4", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/passenger.pp": "0bb9e5d4a49b72e56b7a909da42c47bc", "spec/classes/mod/auth_kerb_spec.rb": "6b71ffa45b4a0a1476ee56c75c26e6db", "spec/defines/vhost_spec.rb": "ccea97121bfcab1b50517d4413a55c99", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd" }, "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "name": "puppetlabs-apache", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ], "description": "Module for Apache configuration", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.6.0.tar.gz", "file_size": 31302, "file_md5": "89fa11aef710c060e0bf9f9ff2cae455", "downloads": 25919, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::mod::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Dependencies

\n\n

Some functionality is dependent on other modules:

\n\n\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-03-28 15:44:52 -0700", "updated_at": "2013-03-28 15:44:52 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-ruby-0.0.2", "module": { "uri": "/v3/modules/puppetlabs-ruby", "name": "ruby", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.2", "metadata": { "types": [ ], "project_page": "https://github.com/puppetlabs/puppetlabs-ruby", "version": "0.0.2", "checksums": { "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "manifests/params.pp": "ab282de0876f38d6c67881306a3f4b27", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "tests/params.pp": "624af9411bd668264baef475bcc9e54b", "README.md": "f31b89ff8fa96488bc76955b081a5f10", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/dev.pp": "ee5276a5772eee8c68204c4463842f03", "tests/init.pp": "c3c821d5d8b70fcc6ecbd0b15ed53109", "tests/dev.pp": "4d74853324ca33cc13995f7819948f83", "spec/classes/ruby_spec.rb": "29b3f413f91aacd85bd4b33a095b6825", "Modulefile": "f4def9fdca48beb00377cce8a7a3b4d7", "manifests/init.pp": "45eb7bdae97d4b202061ff274fa48522" }, "dependencies": [ ], "summary": "Puppet Labs Ruby Module", "source": "https://github.com/puppetlabs/puppetlabs-ruby", "description": "Ruby Module for Puppet", "author": "Puppet Labs", "name": "puppetlabs-ruby", "license": "Apache License 2.0" }, "tags": [ "ruby" ], "file_uri": "/v3/files/puppetlabs-ruby-0.0.2.tar.gz", "file_size": 3408, "file_md5": "16f0165618da0c20753beb44e72708b8", "downloads": 21938, "readme": "

Ruby Module

\n\n

This module manages Ruby and Rubygems on Debian and Redhat based systems.

\n\n

Parameters

\n\n
    \n
  • version: (default installed)\nSet the version of Ruby to install

  • \n
  • gems_version: (default installed)\nSet the version of Rubygems to be installed

  • \n
  • rubygems_update: (default true)\nIf set to true, the module will ensure that the rubygems package is installed\nbut will use rubygems-update (same as gem update --system but versionable) to\nupdate Rubygems to the version defined in $gems_version. If set to false then\nthe rubygems package resource will be versioned from $gems_version

  • \n
\n\n

Usage

\n\n

For a standard install using the latest Rubygems provided by rubygems-update on\nCentOS or Redhat use:

\n\n
class { 'ruby':\n  gems_version  => 'latest'\n}\n
\n\n

On Redhat this is equivilant to

\n\n
$ yum install ruby rubygems\n$ gem update --system\n
\n\n

To install a specific version of ruby and rubygems but not use\nrubygems-update use:

\n\n
class { 'ruby':\n  version         => '1.8.7',\n  gems_version    => '1.8.24',\n  rubygems_update => false\n}\n
\n\n

On Redhat this is equivilent to

\n\n
$ yum install ruby-1.8.7 rubygems-1.8.24\n
\n
", "changelog": null, "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-07-18 20:52:00 -0700", "updated_at": "2013-03-04 14:57:28 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.4", "module": { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.4", "metadata": { "version": "0.0.4", "checksums": { "spec/spec_helper.rb": "5ddfa068aaf6e85afdea6d8401b890fb", "spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "spec/unit/puppet/type/firewall_spec.rb": "427294f441bf0376d41caa43312868c6", "lib/puppet/provider/firewall/ip6tables.rb": "37ccb43da0c5950d33213a1082bde094", "examples/iptables/run.sh": "564f117a8cd0fefe32c9f0edd90fa95b", "examples/iptables/readme.pp": "3a2200300611d42e89f9961b7b7ce919", "spec/unit/puppet/util/firewall_spec.rb": "09556195135a05b0901b673ceca0e7d1", "spec/puppet_spec/matchers.rb": "8e77dc7317de7fc2ff289fb716623b6c", "examples/iptables/test.pp": "3706d2fda31da0264576cbc4a1d7fea7", "spec/puppet_spec/verbose.rb": "2e0e0e74f2c5ec0408d455e773755bf9", "LICENSE": "d6d36a81bf5fdfc7b582b3968e12794d", "spec/puppet_spec/files.rb": "34e40f4dcdc90d1138a471d883c33d79", "lib/puppet/util/firewall.rb": "0adc814705c4f92a8191ff274801f708", "lib/puppet/type/firewall.rb": "babcbf3938183329b6b78795f8abaf2b", "lib/facter/iptables.rb": "47bbd812e6fd7a7bdff3435c50b4687d", "spec/puppet_spec/fixtures.rb": "147446d18612c8395ac65be10b1cd9ab", "spec/fixtures/iptables/conversion_hash.rb": "ae664f8b54179940e9d9e2c2c1c143b4", "Rakefile": "17ab6da1866351b9ece1ddef91627697", "examples/ip6tables/test.pp": "7e4fa8c1f994fa41fd6988981092cbf3", "spec/unit/facter/iptables_spec.rb": "bdbb21c03badad420a5cdafd301a6e14", "CHANGELOG.md": "e87877cc22f0c0edff065764bbb44ba2", "lib/puppet/util/ipcidr.rb": "225adf61f5de40fa04b4e936e388b801", "lib/puppet/provider/firewall/iptables.rb": "09095f4df985ff6beea50e8db5c36fb7", "CONTRIBUTING.md": "346969b756bc432a2a2fab4307ebb93a", "spec/unit/puppet/util/ipcidr_spec.rb": "d36380e92b40f3afda5de3cfe4a62a10", "spec/monkey_patches/publicize_methods.rb": "1b03a4af94f7dac35f7c2809caf372ca", "README.markdown": "d3483c8f0cbd41446c7c9c0d69443d73", "lib/puppet/provider/firewall.rb": "f4c747685c2c8ef97fe78732c8153c75", "spec/unit/puppet/provider/iptables_spec.rb": "c4f234d10805dda2265413a44148fbdf", "Modulefile": "40f947a769cca5c2846ba83ea7b624ef" }, "source": "git://github.com/puppetlabs/puppetlabs-firewall.git", "dependencies": [ ], "summary": "Firewall Module", "author": "puppetlabs", "name": "puppetlabs-firewall", "types": [ { "providers": [ { "doc": "Ip6tables type provider Required binaries: `/sbin/ip6tables`, `/sbin/ip6tables-save`. Supported features: `dnat`, `icmp_match`, `interface_match`, `iptables`, `log_level`, `log_prefix`, `owner`, `rate_limiting`, `reject_type`, `snat`, `state_match`.", "name": "ip6tables" }, { "doc": "Iptables type provider Required binaries: `/sbin/iptables`, `/sbin/iptables-save`. Default for `kernel` == `linux`. Supported features: `dnat`, `icmp_match`, `interface_match`, `iptables`, `log_level`, `log_prefix`, `owner`, `rate_limiting`, `reject_type`, `snat`, `state_match`.", "name": "iptables" } ], "parameters": [ { "doc": " The canonical name of the rule. This name is also used for ordering\n so make sure you prefix the rule with a number:\n\n 000 this runs first\n 999 this runs last\n\n Depending on the provider, the name of the rule can be stored using\n the comment feature of the underlying firewall subsystem.\n Values can match `/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`.", "name": "name" }, { "doc": " Read-only property for caching the rule line.\n", "name": "line" } ], "doc": " This type provides the capability to manage firewall rules within\n puppet.\n", "name": "firewall", "properties": [ { "doc": " Manage the state of this rule. The default action is *present*.\n Valid values are `present`, `absent`.", "name": "ensure" }, { "doc": " This is the action to perform on a match. Can be one of:\n\n * accept - the packet is accepted\n * reject - the packet is rejected with a suitable ICMP response\n * drop - the packet is dropped\n\n If you specify no value it will simply match the rule but perform no\n action unless you provide a provider specific parameter (such as *jump*).\n Valid values are `accept`, `reject`, `drop`.", "name": "action" }, { "doc": " An array of source addresses. For example:\n\n source => '192.168.2.0/24'\n\n The source can also be an IPv6 address if your provider supports it.\n", "name": "source" }, { "doc": " An array of destination addresses to match. For example:\n\n destination => '192.168.1.0/24'\n\n The destination can also be an IPv6 address if your provider supports it.\n", "name": "destination" }, { "doc": " The source port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n", "name": "sport" }, { "doc": " The destination port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n", "name": "dport" }, { "doc": " The destination or source port to match for this filter (if the protocol\n supports ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n", "name": "port" }, { "doc": " The specific protocol to match for this rule. By default this is\n *tcp*.\n Valid values are `tcp`, `udp`, `icmp`, `ipv6-icmp`, `esp`, `ah`, `vrrp`, `igmp`, `ipencap`, `all`.", "name": "proto" }, { "doc": " Name of the chain to use. Can be one of the built-ins:\n\n * INPUT\n * FORWARD\n * OUTPUT\n * PREROUTING\n * POSTROUTING\n\n Or you can provide a user-based chain.\n\n The default value is 'INPUT'.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features iptables.", "name": "chain" }, { "doc": " Table to use. Can be one of:\n\n * nat\n * mangle\n * filter\n * raw\n * rawpost\n\n By default the setting is 'filter'.\n Valid values are `nat`, `mangle`, `filter`, `raw`, `rawpost`. Requires features iptables.", "name": "table" }, { "doc": " The value for the iptables --jump parameter. Normal values are:\n\n * QUEUE\n * RETURN\n * DNAT\n * SNAT\n * LOG\n * MASQUERADE\n * REDIRECT\n\n But any valid chain name is allowed.\n\n For the values ACCEPT, DROP and REJECT you must use the generic\n 'action' parameter. This is to enfore the use of generic parameters where\n possible for maximum cross-platform modelling.\n\n If you set both 'accept' and 'jump' parameters, you will get an error as\n only one of the options should be set.\n Requires features iptables.", "name": "jump" }, { "doc": " Input interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features interface_match.", "name": "iniface" }, { "doc": " Output interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features interface_match.", "name": "outiface" }, { "doc": " When using jump => \"SNAT\" you can specify the new source address using\n this parameter.\n Requires features snat.", "name": "tosource" }, { "doc": " When using jump => \"DNAT\" you can specify the new destination address\n using this paramter.\n Requires features dnat.", "name": "todest" }, { "doc": " For DNAT this is the port that will replace the destination port.\n Requires features dnat.", "name": "toports" }, { "doc": " When combined with jump => \"REJECT\" you can specify a different icmp\n response to be sent back to the packet sender.\n Requires features reject_type.", "name": "reject" }, { "doc": " When combined with jump => \"LOG\" specifies the system log level to log\n to.\n Requires features log_level.", "name": "log_level" }, { "doc": " When combined with jump => \"LOG\" specifies the log prefix to use when\n logging.\n Requires features log_prefix.", "name": "log_prefix" }, { "doc": " When matching ICMP packets, this is the type of ICMP packet to match.\n Requires features icmp_match.", "name": "icmp" }, { "doc": " Matches a packet based on its state in the firewall stateful inspection\n table. Values can be:\n\n * INVALID\n * ESTABLISHED\n * NEW\n * RELATED\n Valid values are `INVALID`, `ESTABLISHED`, `NEW`, `RELATED`. Requires features state_match.", "name": "state" }, { "doc": " Rate limiting value for matched packets. The format is:\n rate/[/second/|/minute|/hour|/day].\n\n Example values are: '50/sec', '40/min', '30/hour', '10/day'.\"\n Requires features rate_limiting.", "name": "limit" }, { "doc": " Rate limiting burst value (per second) before limit checks apply.\n Values can match `/^\\d+$/`. Requires features rate_limiting.", "name": "burst" }, { "doc": " UID or Username owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple uid in a single\n statement.\n Requires features owner.", "name": "uid" }, { "doc": " GID or Group owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple gid in a single\n statement.\n Requires features owner.", "name": "gid" } ] } ], "description": "Manages Firewalls such as iptables", "license": "ASL 2.0", "project_page": "http://forge.puppetlabs.com/puppetlabs/firewall" }, "tags": [ "iptables", "security", "firewall", "ip6tables", "archlinux", "redhat", "centos", "debian", "ubuntu" ], "file_uri": "/v3/files/puppetlabs-firewall-0.0.4.tar.gz", "file_size": 29805, "file_md5": "2556a9f30a3d817dc5f486a7eec7a9be", "downloads": 21894, "readme": "

puppetlabs-firewall module

\n\n

User Guide

\n\n

Overview

\n\n

This type provides the capability to manage firewall rules within \npuppet.

\n\n

Current support includes:

\n\n
    \n
  • iptables
  • \n
  • ip6tables
  • \n
\n\n

Disclaimer

\n\n

Warning! While this software is written in the best interest of quality it has\nnot been formally tested by our QA teams. Use at your own risk, but feel free\nto enjoy and perhaps improve it while you do.

\n\n

Please see the included Apache Software License for more legal details\nregarding warranty.

\n\n

Also as this is a 0.x release the API is still in flux and may change. Make sure\nyou read the release notes before upgrading.

\n\n

Downloading

\n\n

If you are intending to use this module it is recommended you obtain this from the\nforge and not Github:

\n\n
http://forge.puppetlabs.com/puppetlabs/firewall\n
\n\n

The forge releases are vetted releases. Using code from Github means you are\naccessing a development version or early release of the code.

\n\n

Installation

\n\n

Using the puppet-module gem, you can install it into your Puppet's \nmodule path. If you are not sure where your module path is try \nthis command:

\n\n
puppet --configprint modulepath\n
\n\n

Firstly change into that directory. For example:

\n\n
cd /etc/puppet/modules\n
\n\n

Then run the module tool:

\n\n
puppet-module install puppetlabs-firewall\n
\n\n

This module uses both Ruby based providers so your Puppet configuration\n(ie. puppet.conf) must include the following items:

\n\n
[agent]\npluginsync = true\n
\n\n

The module will not operate normally without these features enabled for the\nclient.

\n\n

If you are using environments or with certain versions of Puppet you may\nneed to run Puppet on the primary Puppet server first:

\n\n
puppet agent -t --pluginsync --environment production\n
\n\n

You may also need to restart Apache, although this shouldn't always be the\ncase.

\n\n

Examples

\n\n

Basic accept ICMP request example:

\n\n
firewall { "000 accept all icmp requests":\n  proto => "icmp",\n  action => "accept",\n}\n
\n\n

Drop all:

\n\n
firewall { "999 drop all other requests":\n  action => "drop",\n}\n
\n\n

Source NAT example (perfect for a virtualization host):

\n\n
firewall { '100 snat for network foo2':\n  chain  => 'POSTROUTING',\n  jump   => 'MASQUERADE',\n  proto  => 'all',\n  outiface => "eth0",\n  source => ['10.1.2.0/24'],\n  table  => 'nat',\n}\n
\n\n

You can make firewall rules persistent with the following iptables example:

\n\n
exec { "persist-firewall":\n  command => $operatingsystem ? {\n    "debian" => "/sbin/iptables-save > /etc/iptables/rules.v4",\n    /(RedHat|CentOS)/ => "/sbin/iptables-save > /etc/sysconfig/iptables",\n  }\n  refreshonly => true,\n}\nFirewall {\n  notify => Exec["persist-firewall"]\n}\n
\n\n

If you wish to ensure any reject rules are executed last, try using stages.\nThe following example shows the creation of a class which is where your\nlast rules should run, this however should belong in a puppet module.

\n\n
class my_fw::drop {\n  iptables { "999 drop all":\n    action => "drop"\n  }\n}\n\nstage { pre: before => Stage[main] }\nstage { post: require => Stage[main] }\n\nclass { "my_fw::drop": stage => "post" }\n
\n\n

By placing the 'my_fw::drop' class in the post stage it will always be inserted\nlast thereby avoiding locking you out before the accept rules are inserted.

\n\n

Further documentation

\n\n

More documentation is available from the forge for each release:

\n\n
<http://forge.puppetlabs.com/puppetlabs/firewall>\n
\n\n

Or you can access the inline documentation:

\n\n
puppet describe firewall\n
\n\n

Or:

\n\n
puppet doc -r type\n
\n\n

(and search for firewall).

\n\n

Bugs

\n\n

Bugs can be reported in the Puppetlabs Redmine project:

\n\n
<http://projects.puppetlabs.com/projects/modules/>\n
\n\n

Developer Guide

\n\n

Contributing

\n\n

Make sure you read CONTRIBUTING.md before contributing.

\n\n

Currently we support:

\n\n
    \n
  • iptables
  • \n
  • ip6tables
  • \n
\n\n

But plans are to support lots of other firewall implementations:

\n\n
    \n
  • FreeBSD (ipf)
  • \n
  • Mac OS X (ipfw)
  • \n
  • OpenBSD (pf)
  • \n
  • Cisco (ASA and basic access lists)
  • \n
\n\n

If you have knowledge in these technology, know how to code and wish to contribute \nto this project we would welcome the help.

\n\n

Testing

\n\n

Make sure you have:

\n\n
rake\n
\n\n

Install the necessary gems:

\n\n
gem install rspec\n
\n\n

And run the tests from the root of the source code:

\n\n
rake test\n
\n
", "changelog": null, "license": "
Puppet Firewall Module - Puppet module for managing Firewalls\n\nCopyright (C) 2011 Puppet Labs, Inc.\nCopyright (C) 2011 Jonathan Boyett\n\nSome of the iptables code was taken from puppet-iptables which was:\n\nCopyright (C) 2011 Bob.sh Limited\nCopyright (C) 2008 Camptocamp Association\nCopyright (C) 2007 Dmitri Priimak\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2011-12-05 22:56:20 -0800", "updated_at": "2011-12-05 22:56:20 -0800", "deleted_at": null }, { "uri": "/v3/releases/example42-puppi-2.1.7", "module": { "uri": "/v3/modules/example42-puppi", "name": "puppi", "owner": { "uri": "/v3/users/example42", "username": "example42", "gravatar_id": "3b9afc574837c445c9550f035135f043" } }, "version": "2.1.7", "metadata": { "name": "example42-puppi", "version": "2.1.7", "source": "git://github.com/example42/puppi", "author": "lab42", "license": "Apache", "summary": "Installs and configures Puppi", "description": "This module provides the Puppi libraries required by Example42 modules and, if explicitely included, the puppi command, its working environment, the defines and procedures to deploy applications", "project_page": "http://www.example42.com", "dependencies": [ ], "types": [ ], "checksums": { "LICENSE": "a300b604c66de62cf6e923cca89c9d83", "Modulefile": "ff6f1455c4544414ddb250529123839f", "README.md": "841eaaae1b8eb0fd3bbe06917ddd31de", "README_check.md": "70d0a35d81249b140da94b1d9605a944", "README_deploy.md": "ebcd455453309277bcc278773336a7c9", "README_info.md": "1166c439d71f86e92f21a0879a492e15", "README_log.md": "7423f9bc977faee3cf5e01de9970995b", "Rakefile": "f6c685620eb850c579e290caeb550255", "composer.json": "7ff570e65ab8ab39d8f5598fe6488812", "files/info/readme/readme": "06bf19257e085da580d16ccdd2eebcbe", "files/info/readme/readme-default": "e616e48f90bf4b3fc3310f0152b7d5f8", "files/mailpuppicheck": "84695eb34ff03140deb6cb852f8c4748", "files/mcollective/mc-puppi": "9a2b7f95beafd634da2c4676fbaf405a", "files/mcollective/puppi.ddl": "6c1c486c599d44e2a23ae3cb81340389", "files/mcollective/puppi.rb": "ef6a3f59b86a3e87c2ae680b67d028bb", "files/mcollective/puppicheck": "7ed29b684b0304888594d536505ecf4f", "files/mcollective/puppideploy": "c56d5b12f370edf69f2f6557987cc0cc", "files/scripts/archive.sh": "ca8db4924a4a0837bb65c163afd37974", "files/scripts/check_project.sh": "27b135bcb519fac089ca99c0c6d2d2db", "files/scripts/checkwardir.sh": "dc75eb521c56b3c8310b16d3446e004e", "files/scripts/clean_filelist.sh": "d6dcfead938cc02daa696fa11ca6837d", "files/scripts/database.sh": "adaa39d289ed0d5624d58f0452509df6", "files/scripts/delete.sh": "bae2b996773ffc73635b990e33c05417", "files/scripts/deploy.sh": "b4bdcc74f92e6038ff25b89f109ed8c0", "files/scripts/deploy_files.sh": "147bf6b2d474056e8b75ada19de1fe81", "files/scripts/execute.sh": "5cbec7f5a82a877c0d156a6c0182df9e", "files/scripts/firewall.sh": "4d1cce1a3e5f12b40b442374868090ea", "files/scripts/functions": "27ca12a2ce15eceba874ae7628484949", "files/scripts/get_file.sh": "2e0015ace17adf33fa6f943bac005d1d", "files/scripts/get_filesfromlist.sh": "055bd95fa3a9882fbd3032e074f86f42", "files/scripts/get_maven_files.sh": "26f62cd4c6ad2942ab9bd3c9feba5609", "files/scripts/get_metadata.sh": "f67a2bdbf5113b15f15c3361988dd8c7", "files/scripts/git.sh": "9276bb790bf1e35266b20e30a6418ea9", "files/scripts/header": "f1ab14362a6f161ea2688def9b6a46ee", "files/scripts/predeploy.sh": "04104f7d21719568a9b356b980e024ed", "files/scripts/predeploy_tar.sh": "42a27d4defbc8bb2e8625a66c604cb76", "files/scripts/report_mail.sh": "5d5a3809f125b6db0a9382fb08e39ae5", "files/scripts/report_mongo.sh": "da2885f654b751b282fec08f4507d26e", "files/scripts/service.sh": "b4311afb8700afee1d893d5c6fcb6867", "files/scripts/svn.sh": "962a730fb7fa8b335aa932ace975aba2", "files/scripts/wait.sh": "5862b4df7916deb044444260cf5ac19b", "files/scripts/yant.sh": "b715c2ea21000f0d73e89f0d70e90e76", "files/scripts/yum.sh": "64ed8c7d79d89376ea86cf06aa4cb6eb", "lib/facter/last_run.rb": "75c871bd5262d1830c6a64d0ba3d8153", "lib/facter/puppi_projects.rb": "52c607131dc7a65db70d52f60e19bd09", "lib/puppet/parser/functions/any2bool.rb": "9a33c68686b26701e2289f553bed78e5", "lib/puppet/parser/functions/bool2ensure.rb": "7ed40cbdcb65556f5c9295a4088422a8", "lib/puppet/parser/functions/get_class_args.rb": "3a830d0d3af0f7c30002fa0213ccf555", "lib/puppet/parser/functions/get_magicvar.rb": "24c1abf9c43e7cf7290efeda7d5dd403", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "lib/puppet/parser/functions/is_array.rb": "11696f865c1e4ada60769b033bdb88c8", "lib/puppet/parser/functions/nslookup.rb": "976cfe36eec535d97a17139c7408f0bd", "lib/puppet/parser/functions/options_lookup.rb": "5b5f8291e4b20c2aa31488b0ffe680b2", "lib/puppet/parser/functions/params_lookup.rb": "926e9ce38835bb63a9307b48d03d1495", "lib/puppet/parser/functions/url_parse.rb": "71d6f11070d1dc00f3dcad71a23f570a", "manifests/check.pp": "6e7cee7085a4e96a8e3a35fa0363bf9a", "manifests/configure.pp": "a14babd82aa428e0c5dc2b953797411f", "manifests/dependencies.pp": "91b2f9861af686f2860dc50e5b808c00", "manifests/deploy.pp": "1026044e262d37d195b085da68f4f28d", "manifests/extras.pp": "61dbacd5d1b5ce76f0f06f7298fa2fcc", "manifests/helper.pp": "79e26cc44408258cec33af1dad16d626", "manifests/helpers.pp": "87725d1e0325807b457d2eb818bf9f9f", "manifests/info/instance.pp": "6aba3dd55088f807ac29c7a25d5aa36f", "manifests/info/module.pp": "0ef6b568271ed5ed7abea8e818326e55", "manifests/info/readme.pp": "429cdfb835d74d6281cfa05da664aebd", "manifests/info.pp": "485dbbd21c0c7f170db82389007dc8bd", "manifests/init.pp": "277a01514ae936729280b04cfa00e490", "manifests/initialize.pp": "23b915dca649b37536bbdd67b7f7a71b", "manifests/install_packages.pp": "3bd7b1aadcd5b39f3a4c4da273e1bc4b", "manifests/log.pp": "8cf0a7411cee99d597b61087deaca99c", "manifests/mcollective/client.pp": "1636138a9fe14bb39e8208ce50934d17", "manifests/mcollective/server.pp": "b3720c6a73a867ca89f586593fd68201", "manifests/netinstall.pp": "3b367da40b530aa213da596d7cc9df02", "manifests/one.pp": "49cad03455a2518a2c1f322acd131c8f", "manifests/params.pp": "80b072f18f54fafbf07ea39b06869421", "manifests/project/README": "fdce58e91a1e10b3550f74ccbdbed6db", "manifests/project/archive.pp": "d084317057d8c4c5957ba39795909729", "manifests/project/builder.pp": "a8c8ccbf8f5af6072f29b3d7c5006af0", "manifests/project/dir.pp": "f255690d962445227ede91206bccb32b", "manifests/project/files.pp": "4b57a2bf78a7849ba910761f9132ab23", "manifests/project/git.pp": "35556cc52c9c24d95989190b2f6b623e", "manifests/project/maven.pp": "73429125f5ab07a9ae6e85f7e5032f03", "manifests/project/mysql.pp": "9756330d69d02272f04441292c6a5d36", "manifests/project/service.pp": "a9da84e72e0b3b135cd1f5b869bee1d5", "manifests/project/svn.pp": "691031e70b3a2a6414488e855d11118c", "manifests/project/tar.pp": "212045756022bf0c788611a765acfb07", "manifests/project/war.pp": "587796927ade79f63dde9495f99977a5", "manifests/project/y4maven.pp": "2b833923fd7be1d1022c55d3b98638be", "manifests/project/yum.pp": "7be17b59b039d97b9525a8cb50734768", "manifests/project.pp": "16bc44ff117859cf56b0cbbd1e64f722", "manifests/report.pp": "a612afd476da3810adbe62d357a1aa3b", "manifests/rollback.pp": "4a120841f544ebf490edc7d7952dcb0e", "manifests/run.pp": "c3c582c1f65c055b42da62dbb6fa3b1f", "manifests/runscript.pp": "05c536e2467d46d2e9b27cc3281662ee", "manifests/skel.pp": "8554eb98ec88920cbda289cfecd2d17b", "manifests/todo.pp": "d15e28813a53db8f1a71f7af89ae36d8", "manifests/two.pp": "09eb667da8dae6a01375eb87cad056ef", "manifests/ze.pp": "48636f3ce7bde860ab8767ac234b6bb7", "spec/classes/puppi_spec.rb": "cee8cf5b5c215fb5332570daec9dd8eb", "spec/defines/puppi_check_spec.rb": "ab5ec71f8d9b31ba6221f28a2c663c57", "spec/defines/puppi_deploy_spec.rb": "c5ced8a1a24d8ad828bcef911f2c01af", "spec/defines/puppi_helper_spec.rb": "62c110560da853ddd933af253d7b8590", "spec/defines/puppi_info_spec.rb": "e8cd4f1dd7f7b57fcd68cc751e5180a6", "spec/defines/puppi_initialize_spec.rb": "3349c9bb1addfcb2a98626247af2e57c", "spec/defines/puppi_log_spec.rb": "08617c3632ede09d78032b0382f5d782", "spec/defines/puppi_project_spec.rb": "793e2f06b7358db2c17c40d2c9c80e47", "spec/defines/puppi_report_spec.rb": "793e2f06b7358db2c17c40d2c9c80e47", "spec/defines/puppi_rollback_spec.rb": "42e19b4b726967bd652a8130999bedb8", "spec/defines/puppi_run_spec.rb": "388b0fd66b8c5a9b097e05160f777c04", "spec/defines/puppi_todo_spec.rb": "7582ba7af6fc2ec52c6cccdd0080ce6c", "spec/defines/puppi_ze_spec.rb": "d6c2723cf8a2cb8cab6668144eef7404", "spec/functions/any2bool_spec.rb": "6cd6e460c38949804bd69705e436308e", "spec/functions/bool2ensure_spec.rb": "6cc4be146c1e99662b6c0705ddfb67ec", "spec/functions/url_parse_spec.rb": "81085d9352473e1e778a93eae9b8ad8c", "spec/spec_helper.rb": "cf39b83c5f7bc1bdae838a28ba4e60ec", "templates/helpers/standard.yml.erb": "548abd81aee56803c73ac41c60f97289", "templates/info/instance.erb": "19811cc8627f126fc023aee28fb2b686", "templates/info/module.erb": "6758701c75644dee8c18cc4ec4ec9585", "templates/info/puppet.erb": "33beab27bb7b1d3421b8f3beb9fc1c08", "templates/info/readme.erb": "605015edea7317a1ba5b6ff54bf3eb6c", "templates/info.erb": "b70d4c4e728ac7a293b1f4c986917f92", "templates/install_packages.erb": "76187b63993a22d0c4edd62282c56dbb", "templates/log.erb": "3a2054a7e1b708cdfdbceb1c1d40b748", "templates/project/config.erb": "a19ac67182d1f7e9252e3a024ca3f20b", "templates/puppi.conf.erb": "c43466feb6d69c1adaafd7c6b595c4e9", "templates/puppi.erb": "379dd5d25e63d6e0f62035b9406b249a", "templates/puppi_clean.erb": "a45148cbeda335c150fbd3714ad33f6c", "templates/todo.erb": "745d64345b8d7614f251d2f65d883335" } }, "tags": [ "application", "deployment", "example42", "cli", "puppi" ], "file_uri": "/v3/files/example42-puppi-2.1.7.tar.gz", "file_size": 71372, "file_md5": "e26c6e5cf9f7af3bc96eb45c2a2db609", "downloads": 20981, "readme": "

Puppi: Puppet Knowledge to the CLI

\n\n

Puppi One and Puppi module written by Alessandro Franceschi / al @ lab42.it

\n\n

Puppi Gem by Celso Fernandez / Zertico

\n\n

Source: http://www.example42.com

\n\n

Licence: Apache 2

\n\n

Puppi is a Puppet module and a CLI command.\nIt's data is entirely driven by Puppet code.\nIt can be used to standardize and automate the deployment of web applications\nor to provides quick and standard commands to query and check your system's resources

\n\n

Its structure provides FULL flexibility on the actions required for virtually any kind of\napplication deployment and information gathering.

\n\n

The module provides:

\n\n
    \n
  • Old-Gen and Next-Gen Puppi implementation

  • \n
  • A set of scripts that can be used in chain to automate any kind of deployment

  • \n
  • Puppet defines that make it easy to prepare a puppi set of commands for a project deployment

  • \n
  • Puppet defines to populate the output of the different actions

  • \n
\n\n

HOW TO INSTALL

\n\n

Download Puppi from GitHub and place it in your modules directory:

\n\n
   git clone https://github.com/example42/puppi.git /etc/puppet/modules/puppi\n
\n\n

To use the Puppi "Original, old and widely tested" version, just declare or include the puppi class

\n\n
   class { 'puppi': }\n
\n\n

To test the Next-Gen version you can perform the following command. Please note that this module is\nnot stable yet:\n class { 'puppi':\n version => '2',\n }

\n\n

If you have resources conflicts, do not install automatically the Puppi dependencies (commands and packages)

\n\n
    class { 'puppi':\n      install_dependencies => false,\n    }\n
\n\n

HOW TO USE

\n\n

Once Puppi is installed you can use it to:

\n\n
    \n
  • Easily define in Puppet manifests Web Applications deploy procedures. For example:

    \n\n
    puppi::project::war { "myapp":\n    source           => "http://repo.example42.com/deploy/prod/myapp.war",\n    deploy_root      => "/opt/tomcat/myapp/webapps",\n}\n
  • \n
  • Integrate with your modules for puppi check, info and log

  • \n
  • Enable Example42 modules integration

  • \n
\n\n

HOW TO USE WITH EXAMPLE42 MODULES

\n\n

The Example42 modules provide (optional) Puppi integration.\nOnce enabled for each module you have puppi check, info and log commands.

\n\n

To eanble Puppi in OldGen Modules, set in the scope these variables:

\n\n
    $puppi = yes   # Enables puppi integration.\n    $monitor = yes # Enables automatic monitoring \n    $monitor_tool = "puppi" # Sets puppi as monitoring tool\n
\n\n

For the NextGen modules set the same parameters via Hiera, at Top Scope or as class arguments:

\n\n
    class { 'openssh':\n      puppi        => yes, \n      monitor      => yes,\n      monitor_tool => 'puppi', \n    }\n
\n\n

USAGE OF THE PUPPI COMMAND (OLD GEN)

\n\n
    puppi <action> <project_name> [ -options ]\n
\n\n

The puppi command has these possibile actions:

\n\n

First time initialization of the defined project (if available)\n puppi init

\n\n

Deploy the specified project\n puppi deploy

\n\n

Rollback to a previous deploy state\n puppi rollback

\n\n

Run local checks on system and applications\n puppi check

\n\n

Tail system or application logs\n puppi log

\n\n

Show system information (for all or only the specified topic)\n puppi info [topic]

\n\n

Show things to do (or done) manually on the system (not done via Puppet)\n puppi todo

\n\n

In the deploy/rollback/init actions, puppi runs the commands in /etc/puppi/projects/$project/$action, logs their status and then run the commands in /etc/puppi/projects/$project/report to provide reporting, in whatever, pluggable, way.

\n\n

You can also provide some options:

\n\n
    \n
  • -f : Force puppi commands execution also on CRITICAL errors

  • \n
  • -i : Interactively ask confirmation for every command

  • \n
  • -t : Test mode. Just show the commands that should be executed without doing anything

  • \n
  • -d : Debug mode. Show debugging info during execution

  • \n
  • -o "parameter=value parameter2=value2" : Set manual options to override defaults. The options must be in parameter=value syntax, separated by spaces and inside double quotes.

  • \n
\n\n

Some common puppi commnds when you log for an application deployment:

\n\n
    puppi check\n    puppi log &    # (More readable if done on another window)\n    puppi deploy myapp\n    puppi check\n    puppi info myapp\n
\n\n

THE PUPPI MODULE

\n\n

The set of commands needed for each of these actions are entirely managed with specific\nPuppet "basic defines":

\n\n

Create the main project structure. One or more different deployment projects can exist on a node.\n puppi::project

\n\n

Create a single command to be placed in the init sequence. It's not required for every project.\n puppi::initialize

\n\n

Create a single command to be placed in the deploy sequence. More than one is generally needed for each project.\n puppi::deploy

\n\n

Create a single command to be placed in the rollback sequence. More than one is generally needed for each project.\n puppi::rollback

\n\n

Create a single check (based on Nagios plugins) for a project or for the whole host (host wide checks are auto generated by Example42 monitor module)\n puppi::check

\n\n

Create a reporting command to be placed in the report sequence.\n puppi::report

\n\n

Create a log filename entry for a project or the whole hosts.\n puppi::log

\n\n

Create an info entry with the commands used to provide info on a topic\n puppi::info

\n\n

Read details in the relevant READMEs

\n\n

FILE PATHS (all of them are provided, and can be configured, in the puppi module):

\n\n

A link to the actual version of puppi enabled\n /usr/sbin/puppi

\n\n

The original puppi bash command.\n /usr/sbin/puppi.one

\n\n

Puppi (one) main config file. Various puppi wide paths are defined here.\n /etc/puppi/puppi.conf

\n\n

Directory where by default all the host wide checks can be placed. If you use the Example42 monitor module and have "puppi" as $monitor_tool, this directory is automatically filled with Nagios plugins based checks.\n /etc/puppi/checks/ ($checksdir)

\n\n

Directory that containts projects subdirs, with the commands to be run for deploy, rollback and check actions. They are completely built (and purged) by the Puppet module.\n /etc/puppi/projects/ ($projectsdir)

\n\n

The general-use scripts directory, these are used by the above commands and may require one or more arguments.\n /etc/puppi/scripts/ ($scriptsdir)

\n\n

The general-use directory where files are placed which contain the log paths to be used by puppi log\n /etc/puppi/logs/ ($logssdir)

\n\n

The general-use directory where files are placed which contain the log paths to be used by puppi log\n /etc/puppi/info/ ($infodir)

\n\n

Where all data to rollback is placed.\n /var/lib/puppi/archive/ ($archivedir)

\n\n

Where logs and reports of the different commands are placed.\n /var/log/puppi/ ($logdir)

\n\n

Temporary, scratchable, directory where Puppi places temporary files.\n /tmp/puppi/ ($workdir)

\n\n

A runtime configuration file, which is used by all all the the scripts invoked by puppi to read and write dynamic variables at runtime. This is necessary to mantain "state" information that changes on every puppi run (such as the deploy datetime, used for backups).\n /tmp/puppi/$project/config

\n\n

HOW TO CUSTOMIZE

\n\n

It should be clear that with puppi you have full flexibility in the definition of a deployment \nprocedure, since the puppi command is basically a wrapper that executes arbitrary scripts with\na given sequence, in pure KISS logic.

\n\n

The advantanges though, are various:

\n\n
    \n
  • You have a common syntax to manage deploys and rollbacks on an host

  • \n
  • In your Puppet manifests, you can set in simple, coherent and still flexible and customizable\ndefines all the elements, you need for your application deployments. \nThink about it: with just a Puppet define you build the whole deploy logic

  • \n
  • Reporting for each deploy/rollback is built-in and extensible

  • \n
  • Automatic checks can be built in the deploy procedure

  • \n
  • You have a common, growing, set of general-use scripts for typical actions

  • \n
  • You have quick and useful command to see what's happening on the system (puppi check, log, info)

  • \n
\n\n

There are different parts where you can customize the behaviour of puppi:

\n\n
    \n
  • The set of general-use scripts in /etc/puppi/scripts/ ( this directory is filled with the content\nof puppi/files/scripts/ ) can/should be enhanced. These can be arbitrary scripts in whatever\nlanguage. If you want to follow puppi's logic, though, consider that they should import the\ncommon and runtime configuration files and have an exit code logic similar to the one of\nNagios plugins: 0 is OK, 1 is WARNING, 2 is CRITICAL. Note that by default a script that \nexits with WARNING doesn't block the deploy procedure, on the other hand, if a script exits\nwith CRITICAL (exit 2) by default it blocks the procedure.\nTake a second, also, to explore the runtime config file created by the puppi command that\ncontains variables that can be set and used by the scripts invoked by puppi.

  • \n
  • The custom project defines that describe deploy templates. These are placed in\npuppi/manifests/project/ and can request all the arguments you want to feed your scripts with.\nGenerally is a good idea to design a standard enough template that can be used for all the \ncases where the deployment procedure involves similar steps. Consider also that you can handle\nexceptions with variables (see the $loadbalancer_ip usage in puppi/manifests/project/maven.pp)

  • \n
\n\n

(NO) DEPENDENCIES AND CONFLICTS

\n\n

Puppi is self contained. It doesn't require other modules.\n(And is required by all Example42 modules).

\n\n

For correct functionality by default some extra packages are installed.\nIf you have conflicts with your existing modules, set the argument:\n install_dependencies => false

\n
", "changelog": null, "license": "
Copyright (C) 2013 Alessandro Franceschi / Lab42\n\nfor the relevant commits Copyright (C) by the respective authors.\n\nContact Lab42 at: info@lab42.it\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-11-22 01:10:30 -0800", "updated_at": "2013-11-22 01:18:19 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.1", "module": { "uri": "/v3/modules/puppetlabs-ntp", "name": "ntp", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "2.0.1", "metadata": { "name": "puppetlabs-ntp", "version": "2.0.1", "summary": "NTP Module", "author": "Puppet Labs", "description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 0.1.6" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "909729694bab62c1e36001512b68a8fd", ".nodeset.yml": "8d1b7762d4125ce53379966a1daf355c", ".travis.yml": "193ec2b14cc9644c88f4249422580da2", "CHANGELOG": "1ef0e3fa661bd1b8cb8e1233343dd81c", "CONTRIBUTING.md": "2ef1d6f4417dde9af6c7f46f5c8a864b", "Gemfile": "779e8b104b94622ac8c7d1d7bcf32c5a", "Gemfile.lock": "1abd1da36ca6957b6d456ddd75e2a665", "LICENSE": "f0b6fdc310531526f257378d7bad0044", "Modulefile": "c806ff020129ab4a367a502be3f1be75", "README.markdown": "74a9a19e7866998e5a594845b15b0e57", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/config.pp": "8d9afb6e4327277c96c5617ad687043a", "manifests/init.pp": "8883844f75084d31b4e5a9a50c900d87", "manifests/install.pp": "ac33c5733f4321a9af7a4735265c1986", "manifests/params.pp": "2fe94c599d794811d950bd48879439d7", "manifests/service.pp": "350238b50e9cb896d270a2c76a64334f", "spec/classes/ntp_spec.rb": "ec9345d2bb9976c012b117b8c7f8f052", "spec/fixtures/modules/my_ntp/templates/ntp.conf.erb": "566e373728e9b13eda516115ff0a9fb0", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "4c85f6e43892c45ce75ade44a32f45f8", "spec/system/basic_spec.rb": "f0fa6706b1011be24759dc06ccbd91e2", "spec/system/class_spec.rb": "83dcabc0e04432b52939ae8a5df992ca", "spec/system/ntp_config_spec.rb": "d60bc7ba907c080d891245d6f13da307", "spec/system/ntp_install_spec.rb": "9b3796bb71472daa3a52aa01b0592656", "spec/system/ntp_service_spec.rb": "fbeec08f5489ce8ef82f2225f7107b9e", "spec/system/preferred_servers_spec.rb": "379fe9b56c10903178f03d4d87002a14", "spec/system/restrict_spec.rb": "eb9d8deb680830f78e0041bb3c7d2326", "spec/unit/puppet/provider/README.markdown": "e52668944ee6af2fb5d5b9e798342645", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94", "templates/ntp.conf.erb": "262e0a58bcd88d0cb65369081db30b32", "tests/init.pp": "d398e7687ec1d893ef23d1b7d2afc094" }, "source": "git://github.com/puppetlabs/puppetlabs-ntp", "project_page": "http://github.com/puppetlabs/puppetlabs-ntp", "license": "Apache Version 2.0" }, "tags": [ "ntp", "time", "archlinux", "gentoo", "aix", "debian", "ubuntu", "rhel", "centos", "ntpd", "ntpserver" ], "file_uri": "/v3/files/puppetlabs-ntp-2.0.1.tar.gz", "file_size": 15859, "file_md5": "b81986b29785677f6f83f37422af25d0", "downloads": 19948, "readme": "

ntp

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with ntp\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

The NTP module installs, configures, and manages the ntp service.

\n\n

Module Description

\n\n

The NTP module handles running NTP across a range of operating systems and\ndistributions. Where possible we use the upstream ntp templates so that the\nresults closely match what you'd get if you modified the package default conf\nfiles.

\n\n

Setup

\n\n

What ntp affects

\n\n
    \n
  • ntp package.
  • \n
  • ntp configuration file.
  • \n
  • ntp service.
  • \n
\n\n

Beginning with ntp

\n\n

include '::ntp' is enough to get you up and running. If you wish to pass in\nparameters like which servers to use then you can use:

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

Usage

\n\n

All interaction with the ntp module can do be done through the main ntp class.\nThis means you can simply toggle the options in the ntp class to get at the\nfull functionality.

\n\n

I just want NTP, what's the minimum I need?

\n\n
include '::ntp'\n
\n\n

I just want to tweak the servers, nothing else.

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

I'd like to make sure I restrict who can connect as well.

\n\n
class { '::ntp':\n  servers  => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict => 'restrict 127.0.0.1',\n}\n
\n\n

I'd like to opt out of having the service controlled, we use another tool for that.

\n\n
class { '::ntp':\n  servers        => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict       => 'restrict 127.0.0.1',\n  manage_service => false,\n}\n
\n\n

Looks great! But I'd like a different template, we need to do something unique here.

\n\n
class { '::ntp':\n  servers         => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict        => 'restrict 127.0.0.1',\n  manage_service  => false,\n  config_template => 'different/module/custom.template.erb',\n}\n
\n\n

Reference

\n\n

Classes

\n\n
    \n
  • ntp: Main class, includes all the rest.
  • \n
  • ntp::install: Handles the packages.
  • \n
  • ntp::config: Handles the configuration file.
  • \n
  • ntp::service: Handles the service.
  • \n
\n\n

Parameters

\n\n

The following parameters are available in the ntp module

\n\n

autoupdate

\n\n

Deprecated: This parameter previously determined if the ntp module should be\nautomatically updated to the latest version available. Replaced by package_\nensure.

\n\n

config

\n\n

This sets the file to write ntp configuration into.

\n\n

config_template

\n\n

This determines which template puppet should use for the ntp configuration.

\n\n

driftfile

\n\n

This sets the location of the driftfile for ntp.

\n\n

keys_controlkey

\n\n

Which of the keys is used as the control key.

\n\n

keys_enable

\n\n

Should the ntp keys functionality be enabled.

\n\n

keys_file

\n\n

Location of the keys file.

\n\n

keys_requestkey

\n\n

Which of the keys is used as the request key.

\n\n

package_ensure

\n\n

This can be set to 'present' or 'latest' or a specific version to choose the\nntp package to be installed.

\n\n

package_name

\n\n

This determines the name of the package to install.

\n\n

panic

\n\n

This determines if ntp should 'panic' in the event of a very large clock skew.\nWe set this to false if you're on a virtual machine by default as they don't\ndo a great job with keeping time.

\n\n

preferred_servers

\n\n

List of ntp servers to prefer. Will append prefer for any server in this list\nthat also appears in the servers list.

\n\n

restrict

\n\n

This sets the restrict options in the ntp configuration.

\n\n

servers

\n\n

This selects the servers to use for ntp peers.

\n\n

service_enable

\n\n

This determines if the service should be enabled at boot.

\n\n

service_ensure

\n\n

This determines if the service should be running or not.

\n\n

service_manage

\n\n

This selects if puppet should manage the service in the first place.

\n\n

service_name

\n\n

This selects the name of the ntp service for puppet to manage.

\n\n

Limitations

\n\n

This module has been built on and tested against Puppet 2.7 and higher.

\n\n

The module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
  • Gentoo
  • \n
  • Arch Linux
  • \n
  • FreeBSD
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": null, "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [2013] [Puppet Labs]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-09-05 13:11:35 -0700", "updated_at": "2013-09-05 13:11:35 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.2", "module": { "uri": "/v3/modules/puppetlabs-vcsrepo", "name": "vcsrepo", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.2", "metadata": { "name": "puppetlabs/vcsrepo", "version": "0.1.2", "source": "UNKNOWN", "author": "puppetlabs", "license": "Apache License, Version 2.0", "summary": "UNKNOWN", "description": "UNKNOWN", "project_page": "UNKNOWN", "dependencies": [ ], "types": [ { "name": "vcsrepo", "doc": "A local version control repository", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `bare`, `absent`, `latest`." }, { "name": "revision", "doc": "The revision of the repository Values can match `/^\\S+$/`." } ], "parameters": [ { "name": "path", "doc": "Absolute path to repository" }, { "name": "source", "doc": "The source URI for the repository" }, { "name": "fstype", "doc": "Filesystem type Requires features filesystem_types." }, { "name": "owner", "doc": "The user/uid that owns the repository files" }, { "name": "group", "doc": "The group/gid that owns the repository files" }, { "name": "user", "doc": "The user to run for repository operations" }, { "name": "excludes", "doc": "Files to be excluded from the repository" }, { "name": "force", "doc": "Force repository creation, destroying any files on the path in the process. Valid values are `true`, `false`." }, { "name": "compression", "doc": "Compression level Requires features gzip_compression." }, { "name": "basic_auth_username", "doc": "HTTP Basic Auth username Requires features basic_auth." }, { "name": "basic_auth_password", "doc": "HTTP Basic Auth password Requires features basic_auth." }, { "name": "identity", "doc": "SSH identity file Requires features ssh_identity." }, { "name": "module", "doc": "The repository module to manage Requires features modules." }, { "name": "remote", "doc": "The remote repository to track Requires features multiple_remotes." } ], "providers": [ { "name": "bzr", "doc": "Supports Bazaar repositories\n\nRequired binaries: `bzr`. Supported features: `reference_tracking`." }, { "name": "cvs", "doc": "Supports CVS repositories/workspaces\n\nRequired binaries: `cvs`. Supported features: `gzip_compression`, `modules`, `reference_tracking`." }, { "name": "dummy", "doc": "Dummy default provider\n\nDefault for `vcsrepo` == `dummy`." }, { "name": "git", "doc": "Supports Git repositories\n\nRequired binaries: `git`, `su`. Supported features: `bare_repositories`, `multiple_remotes`, `reference_tracking`, `ssh_identity`, `user`." }, { "name": "hg", "doc": "Supports Mercurial repositories\n\nRequired binaries: `hg`. Supported features: `reference_tracking`." }, { "name": "svn", "doc": "Supports Subversion repositories\n\nRequired binaries: `svn`, `svnadmin`. Supported features: `basic_auth`, `filesystem_types`, `reference_tracking`." } ] } ], "checksums": { "Gemfile": "5267cfa2cd3ba585074266d1953d8c03", "Gemfile.lock": "fd2fec7051e81117a8e58479730797a2", "LICENSE": "b8d96fef1f55096f9d39326408122136", "Modulefile": "fb14134bceb39eedff322332fab7ea34", "README.BZR.markdown": "97f638d169a1c39d461c3f2c0e2ec32f", "README.CVS.markdown": "720eeee9129c1c474086444efd825de4", "README.GIT.markdown": "7ee485d38000553a28e2d539b0a1860a", "README.HG.markdown": "ef123968ea2c29275a6c914515798e2d", "README.SVN.markdown": "daee8377e9dc1f27224f145452d2e3f4", "README.markdown": "e031416a5be95d1fbe9947732e7ee9eb", "Rakefile": "cc0e9a5225430b6a13c74ae74032ed33", "examples/bzr/branch.pp": "05c66419324a576b9b28df876673580d", "examples/bzr/init_repo.pp": "fadd2321866ffb0aacff698d2dc1f0ca", "examples/cvs/local.pp": "7fbde03a5c71edf168267ae42d0bbcbc", "examples/cvs/remote.pp": "491f18f752752bec6133a88de242c44d", "examples/git/bare_init.pp": "7cf56abffdf99f379153166f18f961f8", "examples/git/clone.pp": "0e3181990c095efee1498ccfca5897fb", "examples/git/working_copy_init.pp": "99d92d9957e78a0c03f9cbed989c79ca", "examples/hg/clone.pp": "c92bbd704a4c2da55fff5f45955ce6d1", "examples/hg/init_repo.pp": "bf5fa0ab48a2f5a1ccb63768d961413d", "examples/svn/checkout.pp": "9ef7a8fbd3a763fa3894efa864047023", "examples/svn/server.pp": "94b26f6e50d5e411b33b1ded1bc2138a", "lib/puppet/provider/vcsrepo/bzr.rb": "99dd23d88e88f3cfd4c610d7eef0531f", "lib/puppet/provider/vcsrepo/cvs.rb": "60525f5be2bbbae7916cd09895309ede", "lib/puppet/provider/vcsrepo/dummy.rb": "2f8159468d6ecc8087debde858a80dd6", "lib/puppet/provider/vcsrepo/git.rb": "897973e79c87f852ae4d98f5b722096f", "lib/puppet/provider/vcsrepo/hg.rb": "ea7524cd71732abb3e8670eeaaf37ac6", "lib/puppet/provider/vcsrepo/svn.rb": "8533be9aaa1c632d9be9e46d3e35c2f6", "lib/puppet/provider/vcsrepo.rb": "f5b8a90080b8c27e2656af8605148928", "lib/puppet/type/vcsrepo.rb": "83b3f41d92989fa7ca80d8b6fb8f7db9", "spec/fixtures/bzr_version_info.txt": "5edb13429faf2f0b9964b4326ef49a65", "spec/fixtures/git_branch_a.txt": "2371229e7c1706c5ab8f90f0cd57230f", "spec/fixtures/hg_parents.txt": "efc28a1bd3f1ce7fb4481f76feed3f6e", "spec/fixtures/hg_tags.txt": "8383048b15adb3d58a92ea0c8b887537", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/svn_info.txt": "978db25720a098e5de48388fe600c062", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "a35385c068516f356cf6667b82f83db7", "spec/support/filesystem_helpers.rb": "eb2a8eb3769865004c84e971ccb1396c", "spec/support/fixture_helpers.rb": "61781d99ea201e9da6d23c64a25cc285", "spec/support/provider_example_group.rb": "fab04f82b6531fbb127445345ce6c50c", "spec/unit/puppet/provider/vcsrepo/bzr_spec.rb": "b112a7ae4769eff1da41db7867f06fff", "spec/unit/puppet/provider/vcsrepo/cvs_spec.rb": "ea38bf0b060adcf7c9e43e5ed245c132", "spec/unit/puppet/provider/vcsrepo/dummy_spec.rb": "52ce05ffc829113dc5e74cb4a51c0a71", "spec/unit/puppet/provider/vcsrepo/git_spec.rb": "0713fa3542bace46c15bff00914c3630", "spec/unit/puppet/provider/vcsrepo/hg_spec.rb": "cb4e25597dca41fb75a8d82ac409a14c", "spec/unit/puppet/provider/vcsrepo/svn_spec.rb": "67a40762923bf7cbe8199c3f1d14e943", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94" } }, "tags": [ "vcs", "repo", "svn", "subversion", "git", "hg", "bzr", "CVS" ], "file_uri": "/v3/files/puppetlabs-vcsrepo-0.1.2.tar.gz", "file_size": 17120, "file_md5": "2a5d25f9361e00626d31c88a19b33317", "downloads": 19095, "readme": "

vcsrepo

\n\n

Purpose

\n\n

This provides a single type, vcsrepo.

\n\n

This type can be used to describe:

\n\n
    \n
  • A working copy checked out from a (remote or local) source, at an\narbitrary revision
  • \n
  • A "blank" working copy not associated with a source (when it makes\nsense for the VCS being used)
  • \n
  • A "blank" central repository (when the distinction makes sense for the VCS\nbeing used)
  • \n
\n\n

Supported Version Control Systems

\n\n

This module supports a wide range of VCS types, each represented by a\nseparate provider.

\n\n

For information on how to use this module with a specific VCS, see\nREADME.<VCS>.markdown.

\n\n

License

\n\n

See LICENSE.

\n
", "changelog": null, "license": "
Copyright (C) 2010-2012 Puppet Labs Inc.\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nThis program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software\nFoundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n
", "created_at": "2013-05-24 13:43:55 -0700", "updated_at": "2013-05-24 13:43:55 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-mysql-0.6.1", "module": { "uri": "/v3/modules/puppetlabs-mysql", "name": "mysql", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.6.1", "metadata": { "name": "puppetlabs-mysql", "version": "0.6.1", "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", "author": "Puppet Labs", "license": "Apache 2.0", "summary": "Mysql module", "description": "Mysql module", "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ { "name": "database", "doc": "Manage databases.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "charset", "doc": "The characterset to use for a database Values can match `/^\\S+$/`." } ], "parameters": [ { "name": "name", "doc": "The name of the database." } ], "providers": [ { "name": "mysql", "doc": "Manages MySQL database.\n\nRequired binaries: `mysql`, `mysqladmin`. Default for `kernel` == `Linux`." } ] }, { "name": "database_grant", "doc": "Manage a database user's rights.", "properties": [ { "name": "privileges", "doc": "The privileges the user should have. The possible values are implementation dependent." } ], "parameters": [ { "name": "name", "doc": "The primary key: either user@host for global privilges or user@host/database for database specific privileges" } ], "providers": [ { "name": "mysql", "doc": "Uses mysql as database.\n\nRequired binaries: `mysql`, `mysqladmin`. Default for `kernel` == `Linux`." } ] }, { "name": "database_user", "doc": "Manage a database user. This includes management of users password as well as priveleges", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "password_hash", "doc": "The password hash of the user. Use mysql_password() for creating such a hash. Values can match `/\\w+/`." } ], "parameters": [ { "name": "name", "doc": "The name of the user. This uses the 'username@hostname' or username@hostname." } ], "providers": [ { "name": "mysql", "doc": "manage users for a mysql database.\n\nRequired binaries: `mysql`, `mysqladmin`. Default for `kernel` == `Linux`." } ] } ], "checksums": { "CHANGELOG": "9b152f68e3dd6457f6b14335315d3fe5", "LICENSE": "0e5ccf641e613489e66aa98271dbe798", "Modulefile": "87054e414cd3a5ba50a7668ac715dbfa", "README.md": "b081cd1fe09ca6783c72dea1b521107e", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "TODO": "88ca4024a37992b46c34cb46e4ac39e6", "files/mysqltuner.pl": "7e6fcb6d010c85cec68cffa90e6cc5b6", "lib/puppet/parser/functions/mysql_password.rb": "3c375e08f7372795ad25d51d43995f96", "lib/puppet/provider/database/mysql.rb": "5ca8a2fd43b8e9b8fd87779017b94486", "lib/puppet/provider/database_grant/mysql.rb": "1836e5466a1425d03f853af6f2acbaa7", "lib/puppet/provider/database_user/mysql.rb": "daf038e7ce0adea94fdcb2536a7b13ea", "lib/puppet/type/database.rb": "a5e9e5edb5aa67bbddd17fb9096c9eae", "lib/puppet/type/database_grant.rb": "8a9d41da37ab8450f656b0e50c0f3c1e", "lib/puppet/type/database_user.rb": "3c1569f97f0b2c76437503e3d47d520b", "manifests/backup.pp": "1a386c8f6db5d84716bcfe005e80c6d0", "manifests/config.pp": "df2bb008feb1d2227d71d5a5b7cbf69b", "manifests/db.pp": "7b4c8960a07c67d18e98e42c2f8680e5", "manifests/init.pp": "596a25f0aa546af4b781cecd48ecb71e", "manifests/java.pp": "178f7ab9a42f8bf713a3a95cca1c7e44", "manifests/params.pp": "cbea411a626e8b9cc41991328421db4c", "manifests/php.pp": "f944a7b6046f28efb899a1200c525430", "manifests/python.pp": "8ae864b0c2dce0947990ec1f24256758", "manifests/ruby.pp": "5b841e919ca1eae91e46cf8f0118fb56", "manifests/server/account_security.pp": "03e02441f63a8aa7deb25994f9d89116", "manifests/server/config.pp": "079a38b6cf73673f6e8c90318ef783c0", "manifests/server/monitor.pp": "9ed5b5801e63f9075be26c7b2a5b2caf", "manifests/server/mysqltuner.pp": "178a1e5f8e24d7a52c175577edad7510", "manifests/server.pp": "000b4bafab4d82c3879a91b613744167", "spec/classes/mysql_backup_spec.rb": "1046f5e7d9e62534f9298172fdee2e0e", "spec/classes/mysql_config_spec.rb": "64b860ec0bba3a1a7851ea80d7607893", "spec/classes/mysql_init_spec.rb": "3f9a457a0aca6e6daa09a500929cebc8", "spec/classes/mysql_java_spec.rb": "b8bb5edbe8dff978a80a6b9623ef532f", "spec/classes/mysql_php_spec.rb": "643cb7da5c7fb217c5b059ed6870dfe4", "spec/classes/mysql_python_spec.rb": "13f5bedda4d314c1e3017a69615f2a38", "spec/classes/mysql_ruby_spec.rb": "4ecdad4a24edbcf06dd4855afdd07806", "spec/classes/mysql_server_account_security_spec.rb": "4e7ef3e14d7fdd401dfc1c6a12df2ef5", "spec/classes/mysql_server_monitor_spec.rb": "f75d008a06c167414ea04a82554887be", "spec/classes/mysql_server_spec.rb": "4746897ec3a63fe2a409f8b148c47f0c", "spec/defines/mysql_db_spec.rb": "a0b430b5d8c18bba2e673a83687bed84", "spec/defines/mysql_server_config_spec.rb": "18e6e1ef1483e347a5297820ae37f9c0", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/unit/mysql_password_spec.rb": "c5480e7abb7deb50a3c3e6466721a69d", "spec/unit/puppet/provider/database_grant/mysql_spec.rb": "d625c815046828896d5d9ef89d9a3060", "templates/my.cnf.erb": "e85ddbf49172c6db73d8ce17756c0d3b", "templates/my.cnf.pass.erb": "a4952e72bb8aea85a07274c2c1c0334f", "templates/my.conf.cnf.erb": "58c030db04b5f4064f0ca58a353c95c9", "templates/mysqlbackup.sh.erb": "9230c77262e026871fe8db1de6356822", "tests/backup.pp": "caae4da564c1f663341bbe50915a5f7d", "tests/init.pp": "6b34827ac4731829c8a117f0b3fb8167", "tests/java.pp": "0ad9de4f9f2c049642bcf08124757085", "tests/mysql_database.pp": "2a85cd95a9952e3d93aa05f8f236551e", "tests/mysql_grant.pp": "106e1671b1f68701778401e4a3fc8d05", "tests/mysql_user.pp": "7aa29740f3b6cd8a7041d59af2d595cc", "tests/python.pp": "b093828acfed9c14e25ebdd60d90c282", "tests/ruby.pp": "6c5071fcaf731995c9b8e31e00eaffa0", "tests/server/account_security.pp": "47f79d7ae9eac2bf2134db27abf1db37", "tests/server/config.pp": "619b4220138a12c6cb5f10af9867d8a1", "tests/server.pp": "dc12e116371af9d102a7cb2d9d06da0d" } }, "tags": [ "mysql", "database", "percona", "mariadb", "centos", "rhel", "ubuntu", "debian", "mysql_grant", "mysql_user", "mysql_database", "providers" ], "file_uri": "/v3/files/puppetlabs-mysql-0.6.1.tar.gz", "file_size": 39044, "file_md5": "6c8a35b59029443eec7bde3abc295a77", "downloads": 18715, "readme": "

Mysql module for Puppet

\n\n

This module manages mysql on Linux (RedHat/Debian) distros. A native mysql provider implements database resource type to handle database, database user, and database permission.

\n\n

Pluginsync needs to be enabled for this module to function properly.\nRead more about pluginsync in our docs

\n\n

Description

\n\n

This module uses the fact osfamily which is supported by Facter 1.6.1+. If you do not have facter 1.6.1 in your environment, the following manifests will provide the same functionality in site.pp (before declaring any node):

\n\n
if ! $::osfamily {\n  case $::operatingsystem {\n    'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL': {\n      $osfamily = 'RedHat'\n    }\n    'ubuntu', 'debian': {\n      $osfamily = 'Debian'\n    }\n    'SLES', 'SLED', 'OpenSuSE', 'SuSE': {\n      $osfamily = 'Suse'\n    }\n    'Solaris', 'Nexenta': {\n      $osfamily = 'Solaris'\n    }\n    default: {\n      $osfamily = $::operatingsystem\n    }\n  }\n}\n
\n\n

This module depends on creates_resources function which is introduced in Puppet 2.7. Users on puppet 2.6 can use the following module which provides this functionality:

\n\n

http://github.com/puppetlabs/puppetlabs-create_resources

\n\n

This module is based on work by David Schmitt. The following contributor have contributed patches to this module (beyond Puppet Labs):

\n\n
    \n
  • Christian G. Warden
  • \n
  • Daniel Black
  • \n
  • Justin Ellison
  • \n
  • Lowe Schmidt
  • \n
  • Matthias Pigulla
  • \n
  • William Van Hevelingen
  • \n
  • Michael Arnold
  • \n
\n\n

Usage

\n\n

mysql

\n\n

Installs the mysql-client package.

\n\n
class { 'mysql': }\n
\n\n

mysql::java

\n\n

Installs mysql bindings for java.

\n\n
class { 'mysql::java': }\n
\n\n

mysql::python

\n\n

Installs mysql bindings for python.

\n\n
class { 'mysql::python': }\n
\n\n

mysql::ruby

\n\n

Installs mysql bindings for ruby.

\n\n
class { 'mysql::ruby': }\n
\n\n

mysql::server

\n\n

Installs mysql-server packages, configures my.cnf and starts mysqld service:

\n\n
class { 'mysql::server':\n  config_hash => { 'root_password' => 'foo' }\n}\n
\n\n

Database login information stored in /root/.my.cnf.

\n\n

mysql::db

\n\n

Creates a database with a user and assign some privileges.

\n\n
mysql::db { 'mydb':\n  user     => 'myuser',\n  password => 'mypass',\n  host     => 'localhost',\n  grant    => ['all'],\n}\n
\n\n

mysql::backup

\n\n

Installs a mysql backup script, cronjob, and priviledged backup user.

\n\n
class { 'mysql::backup':\n  backupuser     => 'myuser',\n  backuppassword => 'mypassword',\n  backupdir      => '/tmp/backups',\n}\n
\n\n

Providers for database types:

\n\n

MySQL provider supports puppet resources command:

\n\n
$ puppet resource database\ndatabase { 'information_schema':\n  ensure  => 'present',\n  charset => 'utf8',\n}\ndatabase { 'mysql':\n  ensure  => 'present',\n  charset => 'latin1',\n}\n
\n\n

The custom resources can be used in any other manifests:

\n\n
database { 'mydb':\n  charset => 'latin1',\n}\n\ndatabase_user { 'bob@localhost':\n  password_hash => mysql_password('foo')\n}\n\ndatabase_grant { 'user@localhost/database':\n  privileges => ['all'] ,\n  # Or specify individual privileges with columns from the mysql.db table:\n  # privileges => ['Select_priv', 'Insert_priv', 'Update_priv', 'Delete_priv']\n}\n
\n\n

A resource default can be specified to handle dependency:

\n\n
Database {\n  require => Class['mysql::server'],\n}\n
\n
", "changelog": "
2013-01-11 - Version 0.6.1\n* Fix providers when /root/.my.cnf is absent\n\n2013-01-09 - Version 0.6.0\n* Add `mysql::server::config` define for specific config directives\n* Add `mysql::php` class for php support\n* Add `backupcompress` parameter to `mysql::backup`\n* Add `restart` parameter to `mysql::config`\n* Add `purge_conf_dir` parameter to `mysql::config`\n* Add `manage_service` parameter to `mysql::server`\n* Add syslog logging support via the `log_error` parameter\n* Add initial SuSE support\n* Fix remove non-localhost root user when fqdn != hostname\n* Fix dependency in `mysql::server::monitor`\n* Fix .my.cnf path for root user and root password\n* Fix ipv6 support for users\n* Fix / update various spec tests\n* Fix typos\n* Fix lint warnings\n\n2012-08-23 - Version 0.5.0\n* Add puppetlabs/stdlib as requirement\n* Add validation for mysql privs in provider\n* Add `pidfile` parameter to mysql::config\n* Add `ensure` parameter to mysql::db\n* Add Amazon linux support\n* Change `bind_address` parameter to be optional in my.cnf template\n* Fix quoting root passwords\n\n2012-07-24 - Version 0.4.0\n* Fix various bugs regarding database names\n* FreeBSD support\n* Allow specifying the storage engine\n* Add a backup class\n* Add a security class to purge default accounts\n\n2012-05-03 - Version 0.3.0\n* #14218 Query the database for available privileges\n* Add mysql::java class for java connector installation\n* Use correct error log location on different distros\n* Fix set_mysql_rootpw to properly depend on my.cnf\n\n2012-04-11 - Version 0.2.0\n\n2012-03-19 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13203) Add ssl support (f7e0ea5)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Travis ci before script needs success exit code. (0ea463b)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Fix Puppet 2.6 compilation issues. (9ebbbc4)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Add travis.ci for testing multiple puppet versions. (33c72ef)\n\n2012-03-15 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13163) Datadir should be configurable (f353fc6)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Document create_resources dependency. (558a59c)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix spec test issues related to error message. (eff79b5)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix mysql service on Ubuntu. (72da2c5)\n\n2012-03-16 - Dan Bode <dan@puppetlabs.com>\n* Add more spec test coverage (55e399d)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* (#11963) Fix spec test due to path changes. (1700349)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Add a test to check path for 'mysqld-restart' (b14c7d1)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Fix path for 'mysqld-restart' (1a9ae6b)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Add rspec-puppet tests for mysql::config (907331a)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Moved class dependency between sever and config to server (da62ad6)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Notify mysql restart from set_mysql_rootpw exec (0832a2c)\n\n2012-03-15 - Nan Liu <nan@puppetlabs.com>\n* Add documentation related to osfamily fact. (8265d28)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Mention osfamily value in failure message (e472d3b)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Fix bug when querying for all database users (015490c)\n\n2012-02-09 - Nan Liu <nan@puppetlabs.com>\n* Major refactor of mysql module. (b1f90fd)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Per @ghoneycutt, we should fail explicitly and explain why. (09af083)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Removing duplicate declaration (7513d03)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Use socket value from params class instead of hardcoding. (663e97c)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Instead of hardcoding the config file target, pull it from mysql::params (031a47d)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Moved $socket to within the case to toggle between distros.  Added a $config_file variable to allow per-distro config file destinations. (360eacd)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b)\n\n2012-02-09 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* Changed the README to use markdown (3b7dfeb)\n\n2012-02-04 - Daniel Black <grooverdan@users.sourceforge.net>\n* (#12412) mysqltuner.pl update (b809e6f)\n\n2011-11-17 - Matthias Pigulla <mp@webfactory.de>\n* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1)\n\n2011-12-20 - Jeff McCune <jeff@puppetlabs.com>\n* (minor) Fixup typos in Modulefile metadata (a0ed6a1)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* Only notify Exec to import sql if sql is given (0783c74)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* (#11508) Only load sql_scripts on DB creation (e3b9fd9)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Require not needed due to implicit dependencies (3058feb)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d)\n\n2011-06-03 - Dan Bode <dan@puppetlabs.com> - 0.0.1\n* initial commit\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-01-11 15:27:51 -0800", "updated_at": "2013-01-11 15:27:51 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.9.0", "metadata": { "name": "puppetlabs-apache", "version": "0.9.0", "summary": "Puppet module for Apache", "author": "puppetlabs", "description": "Module for Apache configuration", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo" }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs" }, { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" } ], "name": "a2mod", "doc": "Manage Apache 2 modules" } ], "checksums": { ".bundle/config": "b898efea5e8783d6593fcdabec67e925", ".fixtures.yml": "b67781fff881cf708d92df4851cf0e70", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "d0bd592680200f18b2ef4088c2569701", "CHANGELOG.md": "483202a1f4f08294d798c0685c518108", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "74613ef355389b668fc4b51a0f9eac39", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "fef4b236b7d7885250ca64dbe6074e0a", "README.md": "d3cb59220928734b6d41a6f3a0302c64", "README.passenger.md": "9007ae9e57138bed0c01ae58607ec2aa", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/default_mods.pp": "8493f16440d3eb7b9d392049dfef680b", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/dev.pp": "606c3cbe27f32b61cfcbd15fb211890c", "manifests/init.pp": "b0d1433c1848ee81f18d528fcdf5abec", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod.pp": "fc66b79d9086d8d296c372d605d31890", "manifests/mod/alias.pp": "f5d65ca4755f5464b32c5f95fd42a052", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "63bd38d692ec78f351a6f234f29c2f16", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "93fce4f45e7a85e9d6eb2b745390eaba", "manifests/mod/dav_svn.pp": "85a9a3efe5cce6096d89cf29195e6dc1", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "da3b7f47ce079f20db2d20e2d6539c11", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "852588a26f2635979abf24fd33f1a9ff", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "c9ff4215f9308fd729e96a8d76d3fe1d", "manifests/mod/mime_magic.pp": "9c3a73f877de39c1db2178b827c4a86d", "manifests/mod/mpm_event.pp": "c1540d87cfb2b4a4631c4cc5d3e191f5", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/passenger.pp": "29fca0851862aaaa836acf25718c08cc", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/php.pp": "247915331ce4ee815a0c032897a83157", "manifests/mod/prefork.pp": "2eb8a29fa3a81b4b8ade96989ef06742", "manifests/mod/proxy.pp": "e0e9f9963f720501d9b53ab9fb35f256", "manifests/mod/proxy_balancer.pp": "c71c8ae1eb91d29ec26e19899db2bfec", "manifests/mod/proxy_html.pp": "25cbac9bc2553bc3a18ede060a1a14fd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "80ee4f522104719f07aa2be33d320973", "manifests/mod/status.pp": "1619d96a0d9b9534145209c98c683cbe", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "36bdeaa252d3ba3c14296bbcf2acb9b0", "manifests/mod/wsgi.pp": "092d35c267e671444d42e2243606bc99", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/params.pp": "525b2ac104a0a4922f6be584bc5c6e9d", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "8e5145ad7866adb9b1f26494559ba6a7", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost.pp": "2242685bed5db4a4fa08ebfe1f836084", "spec/classes/apache_spec.rb": "dbeb82d859d03037b86c754d2e9437b9", "spec/classes/dev_spec.rb": "ecc212316f7801f427fa4c30ca65e259", "spec/classes/mod/auth_kerb_spec.rb": "70e2d94d84724a1b54aff6a9dede1ca6", "spec/classes/mod/dav_svn_spec.rb": "6b014a30e017a6cf30bdc4221e4a15b9", "spec/classes/mod/dev_spec.rb": "27a9d92460a3e62842b5e64f7154f893", "spec/classes/mod/dir_spec.rb": "e462dbea87eb1211e496f60e40538370", "spec/classes/mod/fcgid_spec.rb": "3bd6c0638347b763a88e44d5d7216cb0", "spec/classes/mod/info_spec.rb": "3921a934a1d41c6e1cce328a45b3cc1d", "spec/classes/mod/itk_spec.rb": "e9edc7ebebeda4cea0bf896c597c2267", "spec/classes/mod/passenger_spec.rb": "959b0a3235999e5201980871ea2b862a", "spec/classes/mod/perl_spec.rb": "0ba258605762d1fa25398a08e90157e4", "spec/classes/mod/php_spec.rb": "c4050e546d010f0dcb5a8bd580b5f3ed", "spec/classes/mod/prefork_spec.rb": "0f7de99f1fb58670f11fde4f7280e99e", "spec/classes/mod/proxy_html_spec.rb": "bf313b5dfdd2c9f3054f4b791c32a84c", "spec/classes/mod/python_spec.rb": "2b8079e833cbe6313435a72d9fc00cb9", "spec/classes/mod/ssl_spec.rb": "53b8ecefa9ce0af2562d8183c063167d", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "f3324663e5f93d1b73911276bd984e79", "spec/classes/mod/wsgi_spec.rb": "c41bc8e4cc95a87d1448e06b7d8001eb", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "3448d0a4256bd806902c45f2c13bf5a6", "spec/defines/mod_spec.rb": "d82643d472be88a65cd202381099ed6f", "spec/defines/vhost_spec.rb": "4535046a2cf7d7f9745020b92503f2e4", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "ada9b7ebb090d6b4e62db22b3c82b330", "spec/system/default_mods_spec.rb": "b57b9deb89c3905a7a7d9ca9e573f62f", "spec/system/itk_spec.rb": "cbce8cac9e311b2cfce48eb2369ced7b", "spec/system/mod_php_spec.rb": "9bc01054af24b981fa1c49ac723469fc", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "d7b05867fd73464971919fd4393b3719", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "2e3c1fa5ab5a6e4f8513c68904e52269", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/httpd.conf.erb": "154af1419ad44722c9f33bd1eb9a9637", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "669fc0a80839be3a81e2f4d4150c3ad6", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "2fa646fe615e44d137a5d629f868c107", "templates/mod/mime_magic.conf.erb": "8a4f61bd7539871cb507cc95f5dbd205", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/passenger.conf.erb": "6e0c2d796b5e67aa366eadc53c963a5e", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "ae1cd187ffbd5cc9b74f8711e313e96b", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "2567261763976c62a4388abb62ae1e03", "templates/mod/status.conf.erb": "da061291068f8e20cf33812373319c40", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "7e098b0013f6e64e935bf244f7efcd67", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost.conf.erb": "bc0f0bae3b149c8b78d9127714f2d28c", "templates/vhost/_aliases.erb": "319183dd74f4b231747fffa7b4a939f3", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "5131331896f3839221e1231e28b6e509", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "8faa613a00584432f99956f4b0ac1fbd", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "0373372000ca3198594f32ac637a9462", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "5451565f3c34abdd50024af607ed9dc1", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/vhost.pp": "70ce947e12f9b344a24f95a08e622c6c", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" }, "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.9.0.tar.gz", "file_size": 62433, "file_md5": "97ab32e19f65dbe6d7f42b3e5c3ada8e", "downloads": 18449, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to 'true', meaning the service is enabled/running.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'false'.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended concequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::prefork, apache::mod::worker and apache::mod::itk classes. Must be set to false to explicitly declare apache::mod::worker, apache::mod::worker or apache::mod::itk classes with parameters. Valid values are worker, prefork, itk (Debian), or the boolean false. Defaults to prefork on RedHat and worker on Debian.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • deflate
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • fcgid
  • \n
  • info
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template

\n\n
    class { 'apache::mod::ssl': }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [ { alias => '/alias', path => '/path/to/directory' } ],\n
\n\n

For Alias to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

The directives will be embedded within the Directory directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow, Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
sslproxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": null, "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-09-06 14:49:24 -0700", "updated_at": "2013-09-06 14:49:24 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-inifile-1.0.0", "module": { "uri": "/v3/modules/puppetlabs-inifile", "name": "inifile", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.0", "metadata": { "name": "puppetlabs-inifile", "version": "1.0.0", "source": "git://github.com/puppetlabs/puppetlabs-inifile.git", "author": "Puppetlabs", "license": "Apache", "summary": "Resource types for managing settings in INI files", "description": "Resource types for managing settings in INI files", "project_page": "https://github.com/puppetlabs/puppetlabs-inifile", "dependencies": [ ], "types": [ { "name": "ini_setting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the setting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] }, { "name": "ini_subsetting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the subsetting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "subsetting", "doc": "The name of the subsetting to be defined." }, { "name": "subsetting_separator", "doc": "The separator string between subsettings. Defaults to \" \"" }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] } ], "checksums": { "CHANGELOG": "1d2ab7d31e0fa7b96ff2e62a59890585", "Gemfile": "144b186b7315b993411af56fd3fe17ba", "Gemfile.lock": "805305e11bd3eb3ccf93779e06dec330", "LICENSE": "519b25a3992e0598a9855e4ccd7f66a1", "Modulefile": "db6005147c078f60dd4d33819941ffd0", "README.markdown": "a373118f66eed7b342fad96bc3885584", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/puppet/provider/ini_setting/ruby.rb": "19174eb75e2efa2f1e5935cd694ee87a", "lib/puppet/provider/ini_subsetting/ruby.rb": "99991c9d3ccf54c2aa1fcacf491d0cfc", "lib/puppet/type/ini_setting.rb": "afcd3f28b946b08db1b48fb189e6d8cf", "lib/puppet/type/ini_subsetting.rb": "b4e6a659f461bcd274dcdf1b1c39db65", "lib/puppet/util/external_iterator.rb": "69ad1eb930ca6d8d6b6faea343b4a22e", "lib/puppet/util/ini_file/section.rb": "77757399ed9b9ce352ddcc8b8f9273c4", "lib/puppet/util/ini_file.rb": "911c2fabc08bded5e364158eb49e97c4", "lib/puppet/util/setting_value.rb": "a9db550b94d66164b8643612dbf7cbb2", "spec/classes/inherit_test1_spec.rb": "56bbfd63e770b180abc3fd7e331de2fb", "spec/fixtures/modules/inherit_ini_setting/lib/puppet/provider/inherit_ini_setting/ini_setting.rb": "15949e27a64f4768a65fc01ca8d0c90d", "spec/fixtures/modules/inherit_ini_setting/lib/puppet/type/inherit_ini_setting.rb": "90f25ea0e389688a0df74f23a5ad18e7", "spec/fixtures/modules/inherit_test1/manifests/init.pp": "ece5099a0da66d65a05055d22485756c", "spec/spec_helper.rb": "3a33176450601775fcc0932340df9f74", "spec/unit/puppet/provider/ini_setting/inheritance_spec.rb": "bbe2fb9d6805ae8cae85271e48f646b3", "spec/unit/puppet/provider/ini_setting/ruby_spec.rb": "1c82228947d3d7bd32ee333068aff7f0", "spec/unit/puppet/provider/ini_subsetting/ruby_spec.rb": "b05cf15a5830feb249ad7177f7d966ca", "spec/unit/puppet/util/external_iterator_spec.rb": "35cc6e56e0064e496e9151dd778f751f", "spec/unit/puppet/util/ini_file_spec.rb": "9090ada5867eb0333f3c543a7fd11a53", "spec/unit/puppet/util/setting_value_spec.rb": "64db9b766063db958e73e713a3e584fa", "tests/ini_setting.pp": "9c8a9d2c453901cedb106cada253f1f6", "tests/ini_subsetting.pp": "71c82234fa8bb8cb442ff01436ce2cf3" } }, "tags": [ "inifile", "ini", "settings", "file", "subsettings" ], "file_uri": "/v3/files/puppetlabs-inifile-1.0.0.tar.gz", "file_size": 20568, "file_md5": "7cf55f8c280c1f4cb9abb5d40c8f0986", "downloads": 18255, "readme": "

\"Build

\n\n

INI-file module

\n\n

This module provides resource types for use in managing INI-style configuration\nfiles. The main resource type is ini_setting, which is used to manage an\nindividual setting in an INI file. Here's an example usage:

\n\n
ini_setting { "sample setting":\n  path    => '/tmp/foo.ini',\n  section => 'foo',\n  setting => 'foosetting',\n  value   => 'FOO!',\n  ensure  => present,\n}\n
\n\n

A supplementary resource type is ini_subsetting, which is used to manage\nsettings that consist of several arguments such as

\n\n
JAVA_ARGS="-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof "\n\nini_subsetting {'sample subsetting':\n  ensure  => present,\n  section => '',\n  key_val_separator => '=',\n  path => '/etc/default/pe-puppetdb',\n  setting => 'JAVA_ARGS',\n  subsetting => '-Xmx',\n  value   => '512m',\n}\n
\n\n

implementing child providers:

\n\n

The ini_setting class can be overridden by child providers in order to implement the management of ini settings for a specific configuration file.

\n\n

In order to implement this, you will need to specify your own Type (as shown below). This type needs to implement a namevar (name), and a property called value:

\n\n

example:

\n\n
#my_module/lib/puppet/type/glance_api_config.rb\nPuppet::Type.newtype(:glance_api_config) do\n  ensurable\n  newparam(:name, :namevar => true) do\n    desc 'Section/setting name to manage from glance-api.conf'\n    # namevar should be of the form section/setting\n    newvalues(/\\S+\\/\\S+/)\n  end\n  newproperty(:value) do\n    desc 'The value of the setting to be defined.'\n    munge do |v|\n      v.to_s.strip\n    end\n  end\nend\n
\n\n

This type also must have a provider that utilizes the ini_setting provider as its parent:

\n\n

example:

\n\n
# my_module/lib/puppet/provider/glance_api_config/ini_setting.rb\nPuppet::Type.type(:glance_api_config).provide(\n  :ini_setting,\n  # set ini_setting as the parent provider\n  :parent => Puppet::Type.type(:ini_setting).provider(:ruby)\n) do\n  # implement section as the first part of the namevar\n  def section\n    resource[:name].split('/', 2).first\n  end\n  def setting\n    # implement setting as the second part of the namevar\n    resource[:name].split('/', 2).last\n  end\n  # hard code the file path (this allows purging)\n  def self.file_path\n    '/etc/glance/glance-api.conf'\n  end\nend\n
\n\n

Now, the individual settings of the /etc/glance/glance-api.conf file can be managed as individual resources:

\n\n
glance_api_config { 'HEADER/important_config':\n  value => 'secret_value',\n}\n
\n\n

Provided that self.file_path has been implemented, you can purge with the following puppet syntax:

\n\n
resources { 'glance_api_config'\n  purge => true,\n}\n
\n\n

If the above code is added, then the resulting configured file will only contain lines implemented as Puppet resources

\n\n

A few noteworthy features:

\n\n
    \n
  • The module tries hard not to manipulate your file any more than it needs to.\nIn most cases, it should leave the original whitespace, comments, ordering,\netc. perfectly intact.
  • \n
  • Supports comments starting with either '#' or ';'.
  • \n
  • Will add missing sections if they don't exist.
  • \n
  • Supports a "global" section (settings that go at the beginning of the file,\nbefore any named sections) by specifying a section name of "".
  • \n
\n
", "changelog": "
2013-07-16 - Version 1.0.0\nFeatures:\n- Handle empty values.\n- Handle whitespace in settings names (aka: server role = something)\n- Add mechanism for allowing ini_setting subclasses to override the\nformation of the namevar during .instances, to allow for ini_setting\nderived types that manage flat ini-file-like files and still purge\nthem.\n\n2013-05-28 - Chris Price <chris@puppetlabs.com> - 0.10.3\n * Fix bug in subsetting handling for new settings (cbea5dc)\n\n2013-05-22 - Chris Price <chris@puppetlabs.com> - 0.10.2\n * Better handling of quotes for subsettings (1aa7e60)\n\n2013-05-21 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Change constants to class variables to avoid ruby warnings (6b19864)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 0.10.1\n * Style fixes (c4af8c3)\n\n2013-04-02 - Dan Bode <dan@puppetlabs.com> - 0.10.1\n * Add travisfile and Gemfile (c2052b3)\n\n2013-04-02 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Update README.markdown (ad38a08)\n\n2013-02-15 - Karel Brezina <karel.brezina@gmail.com> - 0.10.0\n * Added 'ini_subsetting' custom resource type (4351d8b)\n\n2013-03-11 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * guard against nil indentation values (5f71d7f)\n\n2013-01-07 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * Add purging support to ini file (2f22483)\n\n2013-02-05 - James Sweeny <james.sweeny@puppetlabs.com> - 0.10.0\n * Fix test to use correct key_val_parameter (b1aff63)\n\n2012-11-06 - Chris Price <chris@puppetlabs.com> - 0.10.0\n * Added license file w/Apache 2.0 license (5e1d203)\n\n2012-11-02 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Version 0.9.0 released\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add detection for commented versions of settings (a45ab65)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Refactor to clarify implementation of `save` (f0d443f)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add example for `ensure=absent` (e517148)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Better handling of whitespace lines at ends of sections (845fa70)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Respect indentation / spacing for existing sections and settings (c2c26de)\n\n2012-10-17 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Minor tweaks to handling of removing settings (cda30a6)\n\n2012-10-10 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Add support for removing lines (1106d70)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make value a property (cbc90d3)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make ruby provider a better parent. (1564c47)\n\n2012-09-29 - Reid Vandewiele <reid@puppetlabs.com> - 0.9.0\n * Allow values with spaces to be parsed and set (3829e20)\n\n2012-09-24 - Chris Price <chris@pupppetlabs.com> - 0.0.3\n * Version 0.0.3 released\n\n2012-09-20 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Add validation for key_val_separator (e527908)\n\n2012-09-19 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Allow overriding separator string between key/val pairs (8d1fdc5)\n\n2012-08-20 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Version 0.0.2 released\n\n2012-08-17 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Add support for "global" section at beginning of file (c57dab4)\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2012 Chris Price\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-07-17 05:26:51 -0700", "updated_at": "2013-07-17 05:26:51 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-mongodb-0.1.0", "module": { "uri": "/v3/modules/puppetlabs-mongodb", "name": "mongodb", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.0", "metadata": { "checksums": { "Modulefile": "5fc5f4dc58d95e1eda99915db1c7958a", "manifests/sources/yum.pp": "1705a4bbf4403d0ecdd0ed786aa8e20f", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/init.pp": "c48460e24a2ce1b8a31b2fc54552852b", "tests/sources/yum.pp": "1daacf2de2c2d718345010fc5ce73245", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "tests/init.pp": "c29e4762855114f0111961d495abcf65", "README.md": "0f38e45f2d429354d71a12cf488a03bf", "manifests/params.pp": "546588b8fcec2505809ffa6b090b3ceb", "CHANGELOG": "5ad3778c792b1a1de5440577057f8090", "tests/sources/apt.pp": "bcd51d9fcb2cef9af29f0acc08e36c85", "manifests/sources/apt.pp": "43f39c1438902fd1735a9f1e81eb91e9", "templates/mongod.conf.erb": "8798b9c0f386ad75e9b0f0c277deff55", "spec/fixtures/hiera.yaml": "5c6a20f757d1c94c1233af257b97d3c3", "spec/classes/mongodb_spec.rb": "aa53243aad016d53d46fbff023352693", "LICENSE": "b3f8a01d8699078d82e8c3c992307517" }, "license": "Apache License Version 2.0", "version": "0.1.0", "types": [ ], "dependencies": [ { "version_requirement": ">= 0.0.2", "name": "puppetlabs/apt" } ], "summary": "mongodb puppet module", "source": "git@github.com:puppetlabs/puppetlabs-mongodb.git", "project_page": "https://github.com/puppetlabs/puppetlabs-mongodb", "description": "10gen mongodb puppet module", "author": "puppetlabs", "name": "puppetlabs-mongodb" }, "tags": [ "mongodb" ], "file_uri": "/v3/files/puppetlabs-mongodb-0.1.0.tar.gz", "file_size": 5148, "file_md5": "ffe6895b48238da59fa195fe86e04c21", "downloads": 18113, "readme": "

mongodb puppet module

\n\n

Overview

\n\n

Installs mongodb on Ubuntu/Debian from OS repo, or alternatively per 10gen installation documentation.

\n\n

Usage

\n\n

class mongodb

\n\n

Parameters:

\n\n
    \n
  • enable_10gen (default: false) - Whether or not to set up 10gen software repositories
  • \n
  • init (auto discovered) - override init (sysv or upstart) for Debian derivatives
  • \n
  • location - override apt location configuration for Debian derivatives
  • \n
  • packagename (auto discovered) - override the package name
  • \n
  • servicename (auto discovered) - override the service name
  • \n
\n\n

By default ubuntu is upstart and debian uses sysv.

\n\n

Examples:

\n\n
class mongodb {\n  init => 'sysv',\n}\n\nclass mongodb {\n  enable_10gen => true,\n}\n
\n\n

Supported Platforms

\n\n
    \n
  • Debian Wheezy
  • \n
  • Ubuntu 12.04 (precise)
  • \n
  • RHEL 6
  • \n
\n
", "changelog": "
2012-07-13 Puppet Labs <info@puppetlabs.com> - 0.1.0\n* Add support for RHEL/CentOS\n* Change default mongodb install location to OS repo\n\n2012-05-29 Puppet Labs <info@puppetlabs.com> - 0.0.2\n* Fix Modulefile typo.\n* Remove repo pin.\n* Update spec tests and add travis support.\n\n2012-05-03 Puppet Labs <info@puppetlabs.com> - 0.0.1\n* Initial Release.\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-07-13 22:42:04 -0700", "updated_at": "2012-07-13 22:42:04 -0700", "deleted_at": null }, { "uri": "/v3/releases/jamtur01-httpauth-0.0.2", "module": { "uri": "/v3/modules/jamtur01-httpauth", "name": "httpauth", "owner": { "uri": "/v3/users/jamtur01", "username": "jamtur01", "gravatar_id": "31cc2100279326dd6148a7e163692097" } }, "version": "0.0.2", "metadata": { "types": [ { "providers": [ { "doc": "Manage HTTP Basic and Digest authentication files", "name": "httpauth" } ], "properties": [ { "doc": " Valid values are `present`, `absent`.", "name": "ensure" } ], "doc": "Manage HTTP Basic or Digest password files. httpauth { 'user': file => '/path/to/password/file', password => 'password', mechanism => basic, ensure => present, } ", "name": "httpauth", "parameters": [ { "doc": "The name of the user to be managed.", "name": "name" }, { "doc": "The HTTP password file to be managed. If it doesn't exist it is created.", "name": "file" }, { "doc": "The password in plaintext.", "name": "password" }, { "doc": "The realm - defaults to nil and mainly used for Digest authentication.", "name": "realm" }, { "doc": "The authentication mechanism to use - either basic or digest. Default to basic. Valid values are `basic`, `digest`.", "name": "mechanism" } ] } ], "author": "puppet", "dependencies": [ ], "license": "Apache 2.0", "summary": "Puppet type for managing HTTP Basic and Digest auth files, a la htpasswd.", "project_page": "https://github.com/jamtur01/puppet-httpauth", "description": "UNKNOWN", "source": "UNKNOWN", "checksums": { "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "lib/puppet/type/httpauth.rb": "beab42ad1086202db040c72bc6783494", "lib/puppet/provider/httpauth/httpauth.rb": "c71417aa66ca270ffa501f779f87de62", "spec/unit/type/httpauth.rb": "a42a6d3b57debd7fca90d832ba7094a7", "Rakefile": "871849fbd09bcc076f4ab87ff750ddf6", "README.markdown": "1a4288364496bddee1cbd102099fecf1", "Modulefile": "eaba4cd27b76a1c9787f56d86d5305a5", "spec/spec_helper.rb": "f6e809f57723ea8a2bd121ad99bfce4c" }, "version": "0.0.2", "name": "puppet-httpauth" }, "tags": [ "apache", "HTTP", "basic", "digest", "authentication", "auth", "htpasswd", "htdigest" ], "file_uri": "/v3/files/jamtur01-httpauth-0.0.2.tar.gz", "file_size": 3411, "file_md5": "b3868fcbcf52e3740cb4becf93838072", "downloads": 18072, "readme": "

Puppet HTTP Authentication type

\n\n

This provides a HTTP Authentication type for Puppet that support Basic and Digest authentication.

\n\n

Copyright - James Turnbull james@lovedthanlost.net

\n\n

License: GPLv3

\n\n

Thanks to John Ferlito and JKur (https://github.com/jkur) for patches.

\n\n

Requirements

\n\n
    \n
  • webrick
  • \n
\n\n

Usage

\n\n
httpauth { 'user':\n  file     => '/path/to/password/file',\n  password => 'password',\n  realm => 'realm',\n  mechanism => basic,\n  ensure => present,\n}\n
\n
", "changelog": null, "license": null, "created_at": "2012-06-06 01:07:36 -0700", "updated_at": "2013-03-04 14:57:26 -0800", "deleted_at": null } ] } puppet_forge-5.0.3/spec/fixtures/v3/releases.headers0000644000004100000410000000062314515571425022553 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 510801 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 06 Jan 2014 21:27:38 GMT X-Node: forgeapi03 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/users/0000755000004100000410000000000014515571425020553 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/users/puppetlabs.headers0000644000004100000410000000062014515571425024265 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 285 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 12 Nov 2012 14:51:00 GMT X-Node: forgeapi02 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/users/puppetlabs.json0000644000004100000410000000043514515571425023627 0ustar www-datawww-data{ "uri": "/v3/users/puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec", "username": "puppetlabs", "display_name": "Puppet Labs", "release_count": 422, "module_count": 81, "created_at": "2010-05-19 05:46:26 -0700", "updated_at": "2012-11-12 06:51:00 -0800" }puppet_forge-5.0.3/spec/fixtures/v3/releases/0000755000004100000410000000000014515571425021215 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.2.json0000644000004100000410000000551414515571425026146 0ustar www-datawww-data{ "uri": "/v3/releases/puppetlabs-apache-0.0.2", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.2", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.2", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "f137ab035e6cd5bdbbd50beeac4c68b0", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "8a5ca4035b1c22892923f3fde55e3d5e", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "bc54a5af648cb04b7b3bb0e3f7be6543", "manifests/ssl.pp": "11ed1861298c72cca3a706480bb0b67c", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "b43a4d6efb4563341efe8092677aac6f", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "9055aed946e1111c30ab81fedac2c8b0", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "86f48ebf97e079cf0dc395881d87ecef", "manifests/init.pp": "168dfe06fb9ad8d67a2effeea4477f57" }, "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.2.tar.gz", "file_size": 4006, "file_md5": "e6bca59ddbe26ae653611935d1f24e70", "downloads": 436, "readme": null, "changelog": null, "license": null, "created_at": "2010-05-23 09:52:55 -0700", "updated_at": "2010-05-23 09:52:55 -0700", "deleted_at": null }puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.3.headers0000644000004100000410000000062114515571425026603 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 2892 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Sat, 26 Jun 2010 23:19:57 GMT X-Node: forgeapi01 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.1.1.headers0000644000004100000410000000062214515571425026603 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 10852 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Wed, 08 Aug 2012 07:23:44 GMT X-Node: forgeapi01 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.2.headers0000644000004100000410000000062114515571425026602 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 2892 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Sun, 23 May 2010 16:52:55 GMT X-Node: forgeapi03 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.1.headers0000644000004100000410000000062114515571425026601 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 2892 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Fri, 21 May 2010 05:43:44 GMT X-Node: forgeapi01 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.4.headers0000644000004100000410000000062114515571425026604 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 7586 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Tue, 08 May 2012 23:43:59 GMT X-Node: forgeapi02 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.3.json0000644000004100000410000000551414515571425026147 0ustar www-datawww-data{ "uri": "/v3/releases/puppetlabs-apache-0.0.3", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.3", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.3", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "8728cf041cdd94bb0899170eb2b417d9", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "8a5ca4035b1c22892923f3fde55e3d5e", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "bc54a5af648cb04b7b3bb0e3f7be6543", "manifests/ssl.pp": "11ed1861298c72cca3a706480bb0b67c", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "7806a6c098e217da046d0555314756c4", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "ed64a53af0d7bad762176a98c9ea3e62", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "9b7a414bf15b06afe2f011068fcaff52", "manifests/init.pp": "9ef7e081c832bca8f861c3a9feb9949d" }, "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.3.tar.gz", "file_size": 3929, "file_md5": "cad6c53e9e79698253187610ae8382fc", "downloads": 798, "readme": null, "changelog": null, "license": null, "created_at": "2010-06-26 16:19:57 -0700", "updated_at": "2010-06-26 16:19:57 -0700", "deleted_at": null }puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.1.json0000644000004100000410000000565714515571425026155 0ustar www-datawww-data{ "uri": "/v3/releases/puppetlabs-apache-0.0.1", "slug": "puppetlabs-apache-0.0.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "slug": "puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "slug": "puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.1", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.1", "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "71734796921dbdbfd58f503622527616", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "b78cc593f1c4cd800c906e0891c9b11f", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "510813942246cc9a7786d8f2d8874a35", "manifests/ssl.pp": "b4334a161a2ba5fa8a62cf7b38f352c8", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "cbc4657b0cce5cd432057393d5f6b0c2", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "9055aed946e1111c30ab81fedac2c8b0", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "a627da3a70651c38fc6578a4f4e100a8", "manifests/init.pp": "dc503e26e8021351078813b541c4bd3d" }, "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.1.tar.gz", "file_size": 3435, "file_md5": "95abc51e9b772421c1c254ba467ea02b", "downloads": 173, "readme": null, "changelog": null, "license": null, "created_at": "2010-05-20 22:43:44 -0700", "updated_at": "2010-05-20 22:43:44 -0700", "deleted_at": null } puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.0.4.json0000644000004100000410000001664214515571425026154 0ustar www-datawww-data{ "uri": "/v3/releases/puppetlabs-apache-0.0.4", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.4", "metadata": { "description": "Module for Apache configuration", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "manifests/python.pp": "daa8000b529be1fd931538516373afcd", "manifests/params.pp": "27f043698624d6ff5f92f7a220ed8c39", "tests/vhost.pp": "1f627c432582a8fc91b8375460d9794e", "spec/classes/ssl_spec.rb": "d93e4f61548ce6b077bb8947daaae651", "spec/defines/vhost/proxy_spec.rb": "9d3a5a9361d1d49eb82dcbdc51edea80", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "lib/puppet/provider/a2mod/a2mod.rb": "0acf42d3d670a9915c5a3f46ae7335f1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/defines/vhost_spec.rb": "c5d180e4c1db180b296cdcf6e167af6e", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "manifests/ssl.pp": "00d85958c17bc62f27df8e4ca86043a0", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-proxy.conf.erb": "4b67009e57758dcb0ef06fcbda89515c", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/vhost.pp": "b4f3cd713a95ead5ad2c7fcdbd8a64c8", "lib/puppet/type/a2mod.rb": "8b3005913ca51cb51e94d568f249880e", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-default.conf.erb": "e30ec34eabb2e7a8d57c9842f74cb059", "templates/test.vhost.erb": "2c0ae13f2a32177e128e3ff49c37ffbd", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "Modulefile": "cb1e5a87875ad86a43d6cfdba04eb45b", "manifests/vhost/proxy.pp": "1c774f8370d418b86a6ee08e530305d7", "manifests/init.pp": "cb62a3aba1af2eebb7a08e45ee399065" }, "summary": "Puppet module for Apache", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" } ], "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "author": "puppetlabs", "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " } ], "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" } ], "version": "0.0.4", "name": "puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.4.tar.gz", "file_size": 9707, "file_md5": "5d1d4ec6ce20986d4be3a4bd0ecba07a", "downloads": 6249, "readme": null, "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-05-08 16:43:59 -0700", "updated_at": "2012-05-08 16:43:59 -0700", "deleted_at": null }puppet_forge-5.0.3/spec/fixtures/v3/releases/puppetlabs-apache-0.1.1.json0000644000004100000410000002513714515571425026151 0ustar www-datawww-data{ "uri": "/v3/releases/puppetlabs-apache-0.1.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.1", "metadata": { "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "checksums": { "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "manifests/vhost/proxy.pp": "39a7983c5be0db66dde1d2f47f883321", "manifests/proxy.pp": "03db2be400cc08939b3566063bc58789", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "manifests/ssl.pp": "af7b58dbaf198b74f4b3785ceacb44c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "lib/puppet/type/a2mod.rb": "8b3005913ca51cb51e94d568f249880e", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/params.pp": "c1a03be37c7e2bcd0030442553488589", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "manifests/python.pp": "5f00d0b2f5fc916fdabff20d35e11846", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "Modulefile": "458789fa5a3035e3e094c128f53c4624", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/a2mod.rb": "0acf42d3d670a9915c5a3f46ae7335f1", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "README.md": "9576bc9c836ef349cc62f78c635db815", "manifests/vhost.pp": "56daed888b554900d5694625da74b012", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "manifests/init.pp": "cb62a3aba1af2eebb7a08e45ee399065", "tests/ssl.pp": "191912535199531fd631f911c6329e56", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9" }, "author": "puppetlabs", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "types": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" } ], "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" } ] } ], "version": "0.1.1", "license": "Apache 2.0", "name": "puppetlabs-apache", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ] }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.1.1.tar.gz", "file_size": 13280, "file_md5": "b00db93a5ee05c20207bbadcf85af2d6", "downloads": 308, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-08 00:23:44 -0700", "updated_at": "2012-08-08 00:23:44 -0700", "deleted_at": null } puppet_forge-5.0.3/spec/fixtures/v3/modules.json0000644000004100000410000243743614515571425022000 0ustar www-datawww-data{ "pagination": { "limit": 20, "offset": 0, "first": "/v3/modules?limit=20&offset=0", "previous": null, "current": "/v3/modules?limit=20&offset=0", "next": "/v3/modules?limit=20&offset=20", "total": 1921 }, "results": [ { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "downloads": 710089, "created_at": "2011-05-24 18:34:58 -0700", "updated_at": "2014-01-06 14:41:25 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-stdlib-4.1.0", "module": { "uri": "/v3/modules/puppetlabs-stdlib", "name": "stdlib", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "4.1.0", "metadata": { "types": [ { "doc": " A simple resource type intended to be used as an anchor in a composite class.\n\n In Puppet 2.6, when a class declares another class, the resources in the\n interior class are not contained by the exterior class. This interacts badly\n with the pattern of composing complex modules from smaller classes, as it\n makes it impossible for end users to specify order relationships between the\n exterior class and other modules.\n\n The anchor type lets you work around this. By sandwiching any interior\n classes between two no-op resources that _are_ contained by the exterior\n class, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\n This allows the end user of the ntp module to establish require and before\n relationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }\n\n", "parameters": [ { "doc": "The name of the anchor resource.", "name": "name" } ], "name": "anchor", "properties": [ ] }, { "doc": " Ensures that a given line is contained within a file. The implementation\n matches the full line, including whitespace at the beginning and end. If\n the line is not contained in the given file, Puppet will add the line to\n ensure the desired state. Multiple resources may be declared to manage\n multiple lines in the same file.\n\n Example:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\n In this example, Puppet will ensure both of the specified lines are\n contained in the file /etc/sudoers.\n\n", "providers": [ { "doc": "", "name": "ruby" } ], "parameters": [ { "doc": "An arbitrary name used as the identity of the resource.", "name": "name" }, { "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.", "name": "match" }, { "doc": "The line to be appended to the file located by the path parameter.", "name": "line" }, { "doc": "The file Puppet will ensure contains the line specified by the line parameter.", "name": "path" } ], "name": "file_line", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "license": "Apache 2.0", "checksums": { "spec/unit/puppet/parser/functions/uriescape_spec.rb": "8d9e15156d93fe29bfe91a2e83352ff4", "Gemfile": "a7144ac8fdb2255ed7badb6b54f6c342", "spec/unit/facter/root_home_spec.rb": "4f4c4236ac2368d2e27fd2f3eb606a19", "spec/unit/puppet/parser/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", "spec/unit/puppet/parser/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", "spec/unit/puppet/parser/functions/validate_re_spec.rb": "b21292ad2f30c0d43ab2f0c2df0ba7d5", "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a", "lib/puppet/parser/functions/ensure_packages.rb": "ca852b2441ca44b91a984094de4e3afc", "lib/puppet/parser/functions/validate_augeas.rb": "d4acca7b8a9fdada9ae39e5101902cc1", "spec/unit/puppet/parser/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", "tests/has_ip_network.pp": "abc05686797a776ea8c054657e6f7456", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", "spec/unit/puppet/parser/functions/any2array_spec.rb": "167e114cfa222de971bf8be141766b6a", "spec/unit/facter/pe_required_facts_spec.rb": "0ec83db2a004a0d7f6395b34939c53b9", "spec/unit/puppet/parser/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", "lib/facter/root_home.rb": "f559294cceafcf70799339627d94871d", "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", "spec/unit/puppet/parser/functions/is_float_spec.rb": "171fc0e382d9856c2d8db2b70c9ec9cd", "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", "lib/facter/facter_dot_d.rb": "b35b8b59ec579901444f984127f0b833", "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", "spec/spec_helper.rb": "4449b0cafd8f7b2fb440c0cdb0a1f2b3", "lib/puppet/parser/functions/merge.rb": "52281fe881b762e2adfef20f58dc4180", "lib/puppet/parser/functions/validate_slength.rb": "0ca530d1d3b45c3fe2d604c69acfc22f", "spec/unit/puppet/parser/functions/suffix_spec.rb": "c3eed8e40066f2ad56264405c4192f2e", "spec/unit/puppet/parser/functions/validate_bool_spec.rb": "32a580f280ba62bf17ccd30460d357bd", "spec/unit/puppet/parser/functions/str2bool_spec.rb": "60e3eaea48b0f6efccc97010df7d912c", "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", "lib/puppet/parser/functions/delete.rb": "9b17b9f7f820adf02360147c1a2f4279", "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", "LICENSE": "38a048b9d82e713d4e1b2573e370a756", "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", "spec/unit/puppet/parser/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", "spec/unit/puppet/parser/functions/validate_array_spec.rb": "bcd231229554785c4270ca92ef99cb60", "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", "lib/puppet/parser/functions/is_numeric.rb": "0a9bcc49e8f57af81bdfbb7e7c3a575c", "spec/unit/puppet/parser/functions/merge_spec.rb": "a63c0bc2f812e27fbef570d834ef61ce", "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba", "spec/unit/puppet/parser/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", "spec/monkey_patches/publicize_methods.rb": "ce2c98f38b683138c5ac649344a39276", "spec/unit/puppet/parser/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", "lib/puppet/parser/functions/chop.rb": "4691a56e6064b792ed4575e4ad3f3d20", "spec/unit/puppet/parser/functions/validate_cmd_spec.rb": "538db08292a0ecc4cd902a14aaa55d74", "spec/unit/puppet/parser/functions/is_integer_spec.rb": "a302cf1de5ccb494ca9614d2fc2b53c5", "spec/functions/ensure_resource_spec.rb": "3423a445e13efc7663a71c6641d49d07", "spec/unit/puppet/parser/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", "lib/puppet/parser/functions/dirname.rb": "bef7214eb89db3eb8f7ee5fc9dca0233", "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", "spec/unit/puppet/parser/functions/delete_spec.rb": "0d84186ea618523b4b2a4ca0b5a09c9e", "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", "spec/unit/puppet/parser/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", "spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb": "c67b71737bee9936f5261d41a37bad46", "spec/unit/puppet/parser/functions/concat_spec.rb": "c21aaa84609f92290d5ffb2ce8ea4bf5", "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", "CHANGELOG": "344383410cb78409f0c59ecf38e8c21a", "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", "spec/unit/puppet/parser/functions/validate_string_spec.rb": "64a4f681084cba55775a070f7fab5e0c", "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", "lib/puppet/parser/functions/pick.rb": "2bede116a0651405c47e650bbf942abe", "spec/unit/puppet/parser/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", "lib/puppet/parser/functions/ensure_resource.rb": "3f68b8e17a16bfd01455cd73f8e324ba", "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce", "spec/unit/puppet/parser/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", "spec/unit/puppet/parser/functions/num2bool_spec.rb": "8cd5b46b7c8e612dfae3362e3a68a5f9", "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", "lib/puppet/parser/functions/join.rb": "b28087823456ca5cf943de4a233ac77f", "spec/unit/puppet/parser/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", "spec/unit/puppet/parser/functions/validate_augeas_spec.rb": "1d5bcfbf97dc56b45734248a14358d4f", "spec/unit/puppet/parser/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", "lib/puppet/parser/functions/is_function_available.rb": "88c63869cb5df3402bc9756a8d40c16d", "lib/puppet/parser/functions/prefix.rb": "21fd6a2c1ee8370964346b3bfe829d2b", "spec/watchr.rb": "b588ddf9ef1c19ab97aa892cc776da73", "spec/unit/puppet/parser/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", "spec/unit/puppet/parser/functions/validate_slength_spec.rb": "a1b4d805149dc0143e9a57e43e1f84bf", "spec/functions/ensure_packages_spec.rb": "935b4aec5ab36bdd0458c1a9b2a93ad5", "lib/puppet/parser/functions/suffix.rb": "109279db4180441e75545dbd5f273298", "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", "spec/unit/puppet/parser/functions/count_spec.rb": "db98ef89752a7112425f0aade10108e0", "lib/puppet/parser/functions/hash.rb": "9d072527dfc7354b69292e9302906530", "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", "spec/unit/puppet/parser/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", "spec/unit/puppet/parser/functions/get_module_path_spec.rb": "b7ea196f548b1a9a745ab6671295ab27", "lib/puppet/parser/functions/is_integer.rb": "a50ebc15c30bffd759e4a6f8ec6a0cf3", "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", "spec/unit/puppet/parser/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", "spec/unit/puppet/parser/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", "spec/unit/puppet/parser/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", "lib/puppet/parser/functions/chomp.rb": "719d46923d75251f7b6b68b6e015cccc", "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", "spec/unit/puppet/parser/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", "Modulefile": "351bba73290cd526ca7bacd4c7d250dc", "spec/unit/puppet/parser/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", "spec/unit/puppet/type/file_line_spec.rb": "d9f4e08e8b98e565a07f1b995593fa89", "spec/unit/puppet/parser/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", "lib/puppet/parser/functions/concat.rb": "f28a09811ff4d19bb5e7a540e767d65c", "spec/unit/puppet/parser/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", "tests/init.pp": "1d98070412c76824e66db4b7eb74d433", "lib/puppet/provider/file_line/ruby.rb": "a445a57f9b884037320ea37307dbc92b", "tests/has_ip_address.pp": "93ce02915f67ddfb43a049b2b84ef391", "spec/unit/puppet/parser/functions/min_spec.rb": "bf80bf58261117bb24392670b624a611", "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", "lib/puppet/type/file_line.rb": "3e8222cb58f3503b3ea7de3647c602a0", "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", "spec/functions/getparam_spec.rb": "122f37cf9ec7489f1dae10db39c871b5", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "spec/unit/puppet/parser/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", "spec/unit/puppet/parser/functions/max_spec.rb": "5562bccc643443af7e4fa7c9d1e52b8b", "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", "spec/unit/puppet/parser/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", "spec/unit/puppet/parser/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", "spec/unit/puppet/parser/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", "spec/unit/puppet/parser/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", "spec/unit/puppet/parser/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", "lib/puppet/parser/functions/is_domain_name.rb": "fba9f855df3bbf90d72dfd5201f65d2b", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e8cd7432739cb212d40a9148523bd4d7", "spec/unit/puppet/parser/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", "spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb": "1de174be8835ba6fef86b590887bb2cc", "spec/unit/puppet/parser/functions/prefix_spec.rb": "16a95b321d76e773812693c80edfbe36", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "lib/puppet/parser/functions/uriescape.rb": "9ebc34f1b2f319626512b8cd7cde604c", "lib/puppet/parser/functions/floor.rb": "c5a960e9714810ebb99198ff81a11a3b", "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", "spec/unit/puppet/parser/functions/range_spec.rb": "91d69115dea43f62a2dca9a10467d836", "tests/has_interface_with.pp": "59c98b4af0d39fc11d1ef4c7a6dc8f7a", "spec/unit/puppet/parser/functions/is_function_available.rb": "069ef7490eba66424cab75444f36828a", "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", "spec/unit/puppet/parser/functions/flatten_spec.rb": "583c9a70f93e492cfb22ffa1811f6aa0", "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", "lib/puppet/parser/functions/str2bool.rb": "c822a8944747f5624b13f2da0df8db21", "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", "spec/unit/puppet/parser/functions/validate_hash_spec.rb": "8529c74051ceb71e6b1b97c9cecdf625", "spec/unit/puppet/parser/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", "README.markdown": "b63097a958f22abf7999d475a6a4d32a", "spec/unit/puppet/parser/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", "lib/puppet/parser/functions/validate_cmd.rb": "0319a15d24fd077ebabc2f79969f6ab5", "lib/puppet/parser/functions/is_float.rb": "f1b0d333061d31bf0c25bd4c33dc134b", "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", "lib/puppet/parser/functions/validate_bool.rb": "4ddffdf5954b15863d18f392950b88f4", "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", "spec/unit/puppet/parser/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", "spec/unit/puppet/parser/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", "spec/unit/puppet/parser/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", "spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb": "07839082d24d5a7628fd5bce6c8b35c3", "spec/unit/puppet/parser/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", "spec/unit/puppet/type/anchor_spec.rb": "a5478a72a7fab2d215f39982a9230c18", "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", "spec/unit/puppet/parser/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", "spec/unit/puppet/parser/functions/floor_spec.rb": "d01ef7dfe0245d7a0a73d7df13cb02e3", "spec/unit/puppet/parser/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", "spec/unit/puppet/parser/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00", "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", "spec/classes/anchor_spec.rb": "695d65275c3ac310d7fa23b91f8bbb4a", "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", "spec/unit/puppet/parser/functions/pick_spec.rb": "aba6247d3925e373272fca6768fd5403", "spec/unit/puppet/parser/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", "spec/unit/puppet/parser/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", "spec/unit/puppet/parser/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", "spec/unit/facter/util/puppet_settings_spec.rb": "345bcbef720458e25be0190b7638e4d9", "spec/unit/puppet/parser/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", "spec/unit/puppet/parser/functions/dirname_spec.rb": "1d7cf70468c2cfa6dacfc75935322395", "spec/unit/puppet/parser/functions/delete_at_spec.rb": "5a4287356b5bd36a6e4c100421215b8e", "spec/unit/puppet/parser/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", "spec/unit/puppet/parser/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", "lib/puppet/parser/functions/range.rb": "033048bba333fe429e77e0f2e91db25f", "lib/puppet/parser/functions/parseyaml.rb": "00f10ec1e2b050e23d80c256061ebdd7", "spec/unit/puppet/parser/functions/is_numeric_spec.rb": "5f08148803b6088c27b211c446ad3658", "spec/unit/puppet/parser/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6", "CONTRIBUTING.md": "fdddc4606dc3b6949e981e6bf50bc8e5" }, "version": "4.1.0", "description": "Standard Library for Puppet Modules", "source": "git://github.com/puppetlabs/puppetlabs-stdlib.git", "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", "summary": "Puppet Module Standard Library", "dependencies": [ ], "author": "puppetlabs", "name": "puppetlabs-stdlib" }, "tags": [ "puppetlabs", "library", "stdlib", "standard", "stages" ], "file_uri": "/v3/files/puppetlabs-stdlib-4.1.0.tar.gz", "file_size": 67586, "file_md5": "bbf919d7ee9d278d2facf39c25578bf8", "downloads": 628084, "readme": "

Puppet Labs Standard Library

\n\n

\"Build

\n\n

This module provides a "standard library" of resources for developing Puppet\nModules. This modules will include the following additions to Puppet

\n\n
    \n
  • Stages
  • \n
  • Facts
  • \n
  • Functions
  • \n
  • Defined resource types
  • \n
  • Types
  • \n
  • Providers
  • \n
\n\n

This module is officially curated and provided by Puppet Labs. The modules\nPuppet Labs writes and distributes will make heavy use of this standard\nlibrary.

\n\n

To report or research a bug with any part of this module, please go to\nhttp://projects.puppetlabs.com/projects/stdlib

\n\n

Versions

\n\n

This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of Puppet\nEnterprise and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically "merged up" into main. The current\nlist of integration branches are:

\n\n
    \n
  • v2.1.x (v2.1.1 released in PE 1)
  • \n
  • v2.2.x (Never released as part of PE, only to the Forge)
  • \n
  • v2.3.x (Released in PE 2)
  • \n
  • v3.0.x (Never released as part of PE, only to the Forge)
  • \n
  • v4.0.x (Drops support for Puppet 2.7)
  • \n
  • main (mainline development branch)
  • \n
\n\n

The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.

\n\n

Compatibility

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Puppet Versions< 2.62.62.73.x
stdlib 2.xnoyesyesno
stdlib 3.xnonoyesyes
stdlib 4.xnononoyes
\n\n

The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.

\n\n

stdlib 2.x

\n\n

All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.

\n\n

stdlib 3.x

\n\n

The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2 and Puppet 3.

\n\n

stdlib 4.x

\n\n

The 4.0 major release of stdlib drops support for Puppet 2.7. Stdlib 4.x\nsupports Puppet 3. Notably, ruby 1.8.5 is no longer supported though ruby\n1.8.7, 1.9.3, and 2.0.0 are fully supported.

\n\n

Functions

\n\n

abs

\n\n

Returns the absolute value of a number, for example -34.56 becomes\n34.56. Takes a single integer and float value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

any2array

\n\n

This converts any object to an array containing that object. Empty argument\nlists are converted to an empty array. Arrays are left untouched. Hashes are\nconverted to arrays of alternating keys and values.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

bool2num

\n\n

Converts a boolean to a number. Converts the values:\nfalse, f, 0, n, and no to 0\ntrue, t, 1, y, and yes to 1\n Requires a single boolean or string as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

capitalize

\n\n

Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chomp

\n\n

Removes the record separator from the end of a string or an array of\nstrings, for example hello\\n becomes hello.\nRequires a single string or array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

chop

\n\n

Returns a new string with the last character removed. If the string ends\nwith \\r\\n, both characters are removed. Applying chop to an empty\nstring returns an empty string. If you wish to merely remove record\nseparators then you should use the chomp function.\nRequires a string or array of strings as input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

concat

\n\n

Appends the contents of array 2 onto array 1.

\n\n

Example:

\n\n
concat(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n

['1','2','3','4','5','6']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

count

\n\n

Takes an array as first argument and an optional second argument.\nCount the number of elements in array that matches second argument.\nIf called with only an array it counts the number of elements that are not nil/undef.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

defined_with_params

\n\n

Takes a resource reference and an optional hash of attributes.

\n\n

Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.

\n\n
user { 'dan':\n  ensure => present,\n}\n\nif ! defined_with_params(User[dan], {'ensure' => 'present' }) {\n  user { 'dan': ensure => present, }\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete

\n\n

Deletes all instances of a given element from an array, substring from a\nstring, or key from a hash.

\n\n

Examples:

\n\n
delete(['a','b','c','b'], 'b')\nWould return: ['a','c']\n\ndelete({'a'=>1,'b'=>2,'c'=>3}, 'b')\nWould return: {'a'=>1,'c'=>3}\n\ndelete('abracadabra', 'bra')\nWould return: 'acada'\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

delete_at

\n\n

Deletes a determined indexed value from an array.

\n\n

Examples:

\n\n
delete_at(['a','b','c'], 1)\n
\n\n

Would return: ['a','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

dirname

\n\n

Returns the dirname of a path.

\n\n

Examples:

\n\n
dirname('/path/to/a/file.ext')\n
\n\n

Would return: '/path/to/a'

\n\n

downcase

\n\n

Converts the case of a string or all strings in an array to lower case.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

empty

\n\n

Returns true if the variable is empty.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

ensure_packages

\n\n

Takes a list of packages and only installs them if they don't already exist.

\n\n
    \n
  • Type: statement
  • \n
\n\n

ensure_resource

\n\n

Takes a resource type, title, and a list of attributes that describe a\nresource.

\n\n
user { 'dan':\n  ensure => present,\n}\n
\n\n

This example only creates the resource if it does not already exist:

\n\n
ensure_resource('user, 'dan', {'ensure' => 'present' })\n
\n\n

If the resource already exists but does not match the specified parameters,\nthis function will attempt to recreate the resource leading to a duplicate\nresource definition error.

\n\n

An array of resources can also be passed in and each will be created with\nthe type and parameters specified if it doesn't already exist.

\n\n
ensure_resource('user', ['dan','alex'], {'ensure' => 'present'})\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

flatten

\n\n

This function flattens any deeply nested arrays and returns a single flat array\nas a result.

\n\n

Examples:

\n\n
flatten(['a', ['b', ['c']]])\n
\n\n

Would return: ['a','b','c']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

floor

\n\n

Returns the largest integer less or equal to the argument.\nTakes a single numeric value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

fqdn_rotate

\n\n

Rotates an array a random number of times based on a nodes fqdn.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

get_module_path

\n\n

Returns the absolute path of the specified module for the current\nenvironment.

\n\n

Example:\n $module_path = get_module_path('stdlib')

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getparam

\n\n

Takes a resource reference and name of the parameter and\nreturns value of resource's parameter.

\n\n

Examples:

\n\n
define example_resource($param) {\n}\n\nexample_resource { "example_resource_instance":\n    param => "param_value"\n}\n\ngetparam(Example_resource["example_resource_instance"], "param")\n
\n\n

Would return: param_value

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

getvar

\n\n

Lookup a variable in a remote namespace.

\n\n

For example:

\n\n
$foo = getvar('site::data::foo')\n# Equivalent to $foo = $site::data::foo\n
\n\n

This is useful if the namespace itself is stored in a string:

\n\n
$datalocation = 'site::data'\n$bar = getvar("${datalocation}::bar")\n# Equivalent to $bar = $site::data::bar\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

grep

\n\n

This function searches through an array and returns any elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
grep(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['aaa','aaaddd']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_interface_with

\n\n

Returns boolean based on kind and value:

\n\n
    \n
  • macaddress
  • \n
  • netmask
  • \n
  • ipaddress
  • \n
  • network
  • \n
\n\n

has_interface_with("macaddress", "x:x:x:x:x:x")\nhas_interface_with("ipaddress", "127.0.0.1") => true\netc.

\n\n

If no "kind" is given, then the presence of the interface is checked:\nhas_interface_with("lo") => true

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_address

\n\n

Returns true if the client has the requested IP address on some interface.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'ipaddress_IFACE' facts, performing a simple string comparison.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_ip_network

\n\n

Returns true if the client has an IP address within the requested network.

\n\n

This function iterates through the 'interfaces' fact and checks the\n'network_IFACE' facts, performing a simple string comparision.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

has_key

\n\n

Determine if a hash has a certain key value.

\n\n

Example:

\n\n
$my_hash = {'key_one' => 'value_one'}\nif has_key($my_hash, 'key_two') {\n  notice('we will not reach here')\n}\nif has_key($my_hash, 'key_one') {\n  notice('this will be printed')\n}\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

hash

\n\n

This function converts an array into a hash.

\n\n

Examples:

\n\n
hash(['a',1,'b',2,'c',3])\n
\n\n

Would return: {'a'=>1,'b'=>2,'c'=>3}

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_array

\n\n

Returns true if the variable passed to this function is an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_domain_name

\n\n

Returns true if the string passed to this function is a syntactically correct domain name.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_float

\n\n

Returns true if the variable passed to this function is a float.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_function_available

\n\n

This function accepts a string as an argument, determines whether the\nPuppet runtime has access to a function by that name. It returns a\ntrue if the function exists, false if not.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_hash

\n\n

Returns true if the variable passed to this function is a hash.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_integer

\n\n

Returns true if the variable returned to this string is an integer.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_ip_address

\n\n

Returns true if the string passed to this function is a valid IP address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_mac_address

\n\n

Returns true if the string passed to this function is a valid mac address.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_numeric

\n\n

Returns true if the variable passed to this function is a number.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

is_string

\n\n

Returns true if the variable passed to this function is a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join

\n\n

This function joins an array into a string using a seperator.

\n\n

Examples:

\n\n
join(['a','b','c'], ",")\n
\n\n

Would result in: "a,b,c"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

join_keys_to_values

\n\n

This function joins each key of a hash to that key's corresponding value with a\nseparator. Keys and values are cast to strings. The return value is an array in\nwhich each element is one joined key/value pair.

\n\n

Examples:

\n\n
join_keys_to_values({'a'=>1,'b'=>2}, " is ")\n
\n\n

Would result in: ["a is 1","b is 2"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

keys

\n\n

Returns the keys of a hash as an array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

loadyaml

\n\n

Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.

\n\n

For example:

\n\n
$myhash = loadyaml('/etc/puppet/data/myhash.yaml')\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

lstrip

\n\n

Strips leading spaces to the left of a string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

max

\n\n

Returns the highest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

member

\n\n

This function determines if a variable is a member of an array.

\n\n

Examples:

\n\n
member(['a','b'], 'b')\n
\n\n

Would return: true

\n\n
member(['a','b'], 'c')\n
\n\n

Would return: false

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

merge

\n\n

Merges two or more hashes together and returns the resulting hash.

\n\n

For example:

\n\n
$hash1 = {'one' => 1, 'two', => 2}\n$hash2 = {'two' => 'dos', 'three', => 'tres'}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash =  {'one' => 1, 'two' => 'dos', 'three' => 'tres'}\n
\n\n

When there is a duplicate key, the key in the rightmost hash will "win."

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

min

\n\n

Returns the lowest value of all arguments.\nRequires at least one argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

num2bool

\n\n

This function converts a number or a string representation of a number into a\ntrue boolean. Zero or anything non-numeric becomes false. Numbers higher then 0\nbecome true.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parsejson

\n\n

This function accepts JSON as a string and converts into the correct Puppet\nstructure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

parseyaml

\n\n

This function accepts YAML as a string and converts it into the correct\nPuppet structure.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

pick

\n\n

This function is similar to a coalesce function in SQL in that it will return\nthe first value in a list of values that is not undefined or an empty string\n(two things in Puppet that will return a boolean false value). Typically,\nthis function is used to check for a value in the Puppet Dashboard/Enterprise\nConsole, and failover to a default value like the following:

\n\n
$real_jenkins_version = pick($::jenkins_version, '1.449')\n
\n\n

The value of $real_jenkins_version will first look for a top-scope variable\ncalled 'jenkins_version' (note that parameters set in the Puppet Dashboard/\nEnterprise Console are brought into Puppet as top-scope variables), and,\nfailing that, will use a default value of 1.449.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

prefix

\n\n

This function applies a prefix to all elements in an array.

\n\n

Examples:

\n\n
prefix(['a','b','c'], 'p')\n
\n\n

Will return: ['pa','pb','pc']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

range

\n\n

When given range in the form of (start, stop) it will extrapolate a range as\nan array.

\n\n

Examples:

\n\n
range("0", "9")\n
\n\n

Will return: [0,1,2,3,4,5,6,7,8,9]

\n\n
range("00", "09")\n
\n\n

Will return: 0,1,2,3,4,5,6,7,8,9

\n\n
range("a", "c")\n
\n\n

Will return: ["a","b","c"]

\n\n
range("host01", "host10")\n
\n\n

Will return: ["host01", "host02", ..., "host09", "host10"]

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reject

\n\n

This function searches through an array and rejects all elements that match\nthe provided regular expression.

\n\n

Examples:

\n\n
reject(['aaa','bbb','ccc','aaaddd'], 'aaa')\n
\n\n

Would return:

\n\n
['bbb','ccc']\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

reverse

\n\n

Reverses the order of a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

rstrip

\n\n

Strips leading spaces to the right of the string.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

shuffle

\n\n

Randomizes the order of a string or array elements.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

size

\n\n

Returns the number of elements in a string or array.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

sort

\n\n

Sorts strings and arrays lexically.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

squeeze

\n\n

Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2bool

\n\n

This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to 'true' and strings that contain things\nlike: 0, f, n, false, no to 'false'.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

str2saltedsha512

\n\n

This converts a string to a salted-SHA512 password hash (which is used for\nOS X versions >= 10.7). Given any simple string, you will get a hex version\nof a salted-SHA512 password hash that can be inserted into your Puppet\nmanifests as a valid password attribute.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strftime

\n\n

This function returns formatted time.

\n\n

Examples:

\n\n

To return the time since epoch:

\n\n
strftime("%s")\n
\n\n

To return the date:

\n\n
strftime("%Y-%m-%d")\n
\n\n

Format meaning:

\n\n
%a - The abbreviated weekday name (``Sun'')\n%A - The  full  weekday  name (``Sunday'')\n%b - The abbreviated month name (``Jan'')\n%B - The  full  month  name (``January'')\n%c - The preferred local date and time representation\n%C - Century (20 in 2009)\n%d - Day of the month (01..31)\n%D - Date (%m/%d/%y)\n%e - Day of the month, blank-padded ( 1..31)\n%F - Equivalent to %Y-%m-%d (the ISO 8601 date format)\n%h - Equivalent to %b\n%H - Hour of the day, 24-hour clock (00..23)\n%I - Hour of the day, 12-hour clock (01..12)\n%j - Day of the year (001..366)\n%k - hour, 24-hour clock, blank-padded ( 0..23)\n%l - hour, 12-hour clock, blank-padded ( 0..12)\n%L - Millisecond of the second (000..999)\n%m - Month of the year (01..12)\n%M - Minute of the hour (00..59)\n%n - Newline (\n
\n\n

)\n %N - Fractional seconds digits, default is 9 digits (nanosecond)\n %3N millisecond (3 digits)\n %6N microsecond (6 digits)\n %9N nanosecond (9 digits)\n %p - Meridian indicator (AM'' orPM'')\n %P - Meridian indicator (am'' orpm'')\n %r - time, 12-hour (same as %I:%M:%S %p)\n %R - time, 24-hour (%H:%M)\n %s - Number of seconds since 1970-01-01 00:00:00 UTC.\n %S - Second of the minute (00..60)\n %t - Tab character ( )\n %T - time, 24-hour (%H:%M:%S)\n %u - Day of the week as a decimal, Monday being 1. (1..7)\n %U - Week number of the current year,\n starting with the first Sunday as the first\n day of the first week (00..53)\n %v - VMS date (%e-%b-%Y)\n %V - Week number of year according to ISO 8601 (01..53)\n %W - Week number of the current year,\n starting with the first Monday as the first\n day of the first week (00..53)\n %w - Day of the week (Sunday is 0, 0..6)\n %x - Preferred representation for the date alone, no time\n %X - Preferred representation for the time alone, no date\n %y - Year without a century (00..99)\n %Y - Year with century\n %z - Time zone as hour offset from UTC (e.g. +0900)\n %Z - Time zone name\n %% - Literal ``%'' character

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

strip

\n\n

This function removes leading and trailing whitespace from a string or from\nevery string inside an array.

\n\n

Examples:

\n\n
strip("    aaa   ")\n
\n\n

Would result in: "aaa"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

suffix

\n\n

This function applies a suffix to all elements in an array.

\n\n

Examples:

\n\n
suffix(['a','b','c'], 'p')\n
\n\n

Will return: ['ap','bp','cp']

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

swapcase

\n\n

This function will swap the existing case of a string.

\n\n

Examples:

\n\n
swapcase("aBcD")\n
\n\n

Would result in: "AbCd"

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

time

\n\n

This function will return the current time since epoch as an integer.

\n\n

Examples:

\n\n
time()\n
\n\n

Will return something like: 1311972653

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

to_bytes

\n\n

Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

type

\n\n

Returns the type when passed a variable. Type can be one of:

\n\n
    \n
  • string
  • \n
  • array
  • \n
  • hash
  • \n
  • float
  • \n
  • integer
  • \n
  • boolean

  • \n
  • Type: rvalue

  • \n
\n\n

unique

\n\n

This function will remove duplicates from strings and arrays.

\n\n

Examples:

\n\n
unique("aabbcc")\n
\n\n

Will return:

\n\n
abc\n
\n\n

You can also use this with arrays:

\n\n
unique(["a","a","b","b","c","c"])\n
\n\n

This returns:

\n\n
["a","b","c"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

upcase

\n\n

Converts a string or an array of strings to uppercase.

\n\n

Examples:

\n\n
upcase("abcd")\n
\n\n

Will return:

\n\n
ASDF\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

uriescape

\n\n

Urlencodes a string or array of strings.\nRequires either a single string or an array as an input.

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

validate_absolute_path

\n\n

Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.

\n\n

The following values will pass:

\n\n
$my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"\nvalidate_absolute_path($my_path)\n$my_path2 = "/var/lib/puppet"\nvalidate_absolute_path($my_path2)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_absolute_path(true)\nvalidate_absolute_path([ 'var/lib/puppet', '/var/foo' ])\nvalidate_absolute_path([ '/var/lib/puppet', 'var/foo' ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_array

\n\n

Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_array = [ 'one', 'two' ]\nvalidate_array($my_array)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_array(true)\nvalidate_array('some_string')\n$undefined = undef\nvalidate_array($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_augeas

\n\n

Perform validation of a string using an Augeas lens\nThe first argument of this function should be a string to\ntest, and the second argument should be the name of the Augeas lens to use.\nIf Augeas fails to parse the string with the lens, the compilation will\nabort with a parse error.

\n\n

A third argument can be specified, listing paths which should\nnot be found in the file. The $file variable points to the location\nof the temporary file being tested in the Augeas tree.

\n\n

For example, if you want to make sure your passwd content never contains\na user foo, you could write:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo'])\n
\n\n

Or if you wanted to ensure that no users used the '/bin/barsh' shell,\nyou could use:

\n\n
validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]']\n
\n\n

If a fourth argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n
validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_bool

\n\n

Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
$some_array = [ true ]\nvalidate_bool("false")\nvalidate_bool("true")\nvalidate_bool($some_array)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_cmd

\n\n

Perform validation of a string with an external command.\nThe first argument of this function should be a string to\ntest, and the second argument should be a path to a test command\ntaking a file as last argument. If the command, launched against\na tempfile containing the passed string, returns a non-null value,\ncompilation will abort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

A helpful error message can be returned like this:

\n\n

Example:

\n\n
validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_hash

\n\n

Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_hash = { 'one' => 'two' }\nvalidate_hash($my_hash)\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_hash(true)\nvalidate_hash('some_string')\n$undefined = undef\nvalidate_hash($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_re

\n\n

Perform simple validation of a string against one or more regular\nexpressions. The first argument of this function should be a string to\ntest, and the second argument should be a stringified regular expression\n(without the // delimiters) or an array of regular expressions. If none\nof the regular expressions match the string passed in, compilation will\nabort with a parse error.

\n\n

If a third argument is specified, this will be the error message raised and\nseen by the user.

\n\n

The following strings will validate against the regular expressions:

\n\n
validate_re('one', '^one$')\nvalidate_re('one', [ '^one', '^two' ])\n
\n\n

The following strings will fail to validate, causing compilation to abort:

\n\n
validate_re('one', [ '^two', '^three' ])\n
\n\n

A helpful error message can be returned like this:

\n\n
validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7')\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_slength

\n\n

Validate that the first argument is a string (or an array of strings), and\nless/equal to than the length of the second argument. It fails if the first\nargument is not a string or array of strings, and if arg 2 is not convertable\nto a number.

\n\n

The following values will pass:

\n\n

validate_slength("discombobulate",17)\n validate_slength(["discombobulate","moo"],17)

\n\n

The following valueis will not:

\n\n

validate_slength("discombobulate",1)\n validate_slength(["discombobulate","thermometer"],5)

\n\n
    \n
  • Type: statement
  • \n
\n\n

validate_string

\n\n

Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.

\n\n

The following values will pass:

\n\n
$my_string = "one two"\nvalidate_string($my_string, 'three')\n
\n\n

The following values will fail, causing compilation to abort:

\n\n
validate_string(true)\nvalidate_string([ 'some', 'array' ])\n$undefined = undef\nvalidate_string($undefined)\n
\n\n
    \n
  • Type: statement
  • \n
\n\n

values

\n\n

When given a hash this function will return the values of that hash.

\n\n

Examples:

\n\n
$hash = {\n  'a' => 1,\n  'b' => 2,\n  'c' => 3,\n}\nvalues($hash)\n
\n\n

This example would return:

\n\n
[1,2,3]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

values_at

\n\n

Finds value inside an array based on location.

\n\n

The first argument is the array you want to analyze, and the second element can\nbe a combination of:

\n\n
    \n
  • A single numeric index
  • \n
  • A range in the form of 'start-stop' (eg. 4-9)
  • \n
  • An array combining the above
  • \n
\n\n

Examples:

\n\n
values_at(['a','b','c'], 2)\n
\n\n

Would return ['c'].

\n\n
values_at(['a','b','c'], ["0-1"])\n
\n\n

Would return ['a','b'].

\n\n
values_at(['a','b','c','d','e'], [0, "2-3"])\n
\n\n

Would return ['a','c','d'].

\n\n
    \n
  • Type: rvalue
  • \n
\n\n

zip

\n\n

Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.

\n\n

Example:

\n\n
zip(['1','2','3'],['4','5','6'])\n
\n\n

Would result in:

\n\n
["1", "4"], ["2", "5"], ["3", "6"]\n
\n\n
    \n
  • Type: rvalue
  • \n
\n\n

This page autogenerated on 2013-04-11 13:54:25 -0700

\n
", "changelog": "
2013-05-06 - Jeff McCune <jeff@puppetlabs.com> - 4.1.0\n * (#20582) Restore facter_dot_d to stdlib for PE users (3b887c8)\n * (maint) Update Gemfile with GEM_FACTER_VERSION (f44d535)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> - 4.1.0\n * Terser method of string to array conversion courtesy of ethooz. (d38bce0)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Refactor ensure_resource expectations (b33cc24)\n\n2013-05-06 - Alex Cline <acline@us.ibm.com> 4.1.0\n * Changed str-to-array conversion and removed abbreviation. (de253db)\n\n2013-05-03 - Alex Cline <acline@us.ibm.com> 4.1.0\n * (#20548) Allow an array of resource titles to be passed into the ensure_resource function (e08734a)\n\n2013-05-02 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.1.0\n * Add a dirname function (2ba9e47)\n\n2013-04-29 - Mark Smith-Guerrero <msmithgu@gmail.com> - 4.1.0\n * (maint) Fix a small typo in hash() description (928036a)\n\n2013-04-12 - Jeff McCune <jeff@puppetlabs.com> - 4.0.2\n * Update user information in gemspec to make the intent of the Gem clear.\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.1\n * Fix README function documentation (ab3e30c)\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * stdlib 4.0 drops support with Puppet 2.7\n * stdlib 4.0 preserves support with Puppet 3\n\n2013-04-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add ability to use puppet from git via bundler (9c5805f)\n\n2013-04-10 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Make stdlib usable as a Ruby GEM (e81a45e)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Add a count function (f28550e)\n\n2013-03-31 - Amos Shapira <ashapira@atlassian.com> - 4.0.0\n * (#19998) Implement any2array (7a2fb80)\n\n2013-03-29 - Steve Huff <shuff@vecna.org> - 4.0.0\n * (19864) num2bool match fix (8d217f0)\n\n2013-03-20 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * Allow comparisons of Numeric and number as String (ff5dd5d)\n\n2013-03-26 - Richard Soderberg <rsoderberg@mozilla.com> - 4.0.0\n * add suffix function to accompany the prefix function (88a93ac)\n\n2013-03-19 - Kristof Willaert <kristof.willaert@gmail.com> - 4.0.0\n * Add floor function implementation and unit tests (0527341)\n\n2012-04-03 - Eric Shamow <eric@puppetlabs.com> - 4.0.0\n * (#13610) Add is_function_available to stdlib (961dcab)\n\n2012-12-17 - Justin Lambert <jlambert@eml.cc> - 4.0.0\n * str2bool should return a boolean if called with a boolean (5d5a4d4)\n\n2012-10-23 - Uwe Stuehler <ustuehler@team.mobile.de> - 4.0.0\n * Fix number of arguments check in flatten() (e80207b)\n\n2013-03-11 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Add contributing document (96e19d0)\n\n2013-03-04 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)\n\n2013-02-14 - Joshua Hoblitt <jhoblitt@cpan.org> - 4.0.0\n * (#19272) Add has_element() function (95cf3fe)\n\n2013-02-07 - Raphaël Pinson <raphael.pinson@camptocamp.com> - 4.0.0\n * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_augeas function (3a97c23)\n\n2012-12-06 - Raphaël Pinson <raphink@gmail.com> - 4.0.0\n * Add validate_cmd function (6902cc5)\n\n2013-01-14 - David Schmitt <david@dasz.at> - 4.0.0\n * Add geppetto project definition (b3fc0a3)\n\n2013-01-02 - Jaka Hudoklin <jakahudoklin@gmail.com> - 4.0.0\n * Add getparam function to get defined resource parameters (20e0e07)\n\n2013-01-05 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * (maint) Add Travis CI Support (d082046)\n\n2012-12-04 - Jeff McCune <jeff@puppetlabs.com> - 4.0.0\n * Clarify that stdlib 3 supports Puppet 3 (3a6085f)\n\n2012-11-30 - Erik Dalén <dalen@spotify.com> - 4.0.0\n * maint: style guideline fixes (7742e5f)\n\n2012-11-09 - James Fryman <james@frymanet.com> - 4.0.0\n * puppet-lint cleanup (88acc52)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 4.0.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)\n\n2012-09-18 - Chad Metcalf <chad@wibidata.com> - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén <dalen@spotify.com> - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier <peter.meier@immerda.ch> - 3.2.0\n * (#14670) autorequire a file_line resource's path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton <lifton@puppetlabs.com> - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza <gary@puppetlabs.com> - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley <wcooley@pdx.edu> - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian <me@joejulian.name> - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune <jeff@puppetlabs.com> - 3.0.0\n * stdlib 3.0 drops support with Puppet 2.6\n * stdlib 3.0 preserves support with Puppet 2.7\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price <chris@puppetlabs.com> - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune <jeff@puppetlabs.com> - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens <matthaus@puppetlabs.com> - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode <dan@puppetlabs.com> - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune <jeff@puppetlabs.com> - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price <chris@puppetlabs.com> - 2.4.0\n * Add support for a 'match' parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén <dalen@spotify.com> - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune <jeff@puppetlabs.com> - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney <hailee@puppetlabs.com> - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen <steve.traylen@cern.ch> - 2.4.0\n * (#13205) Rotate array/string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier <peter.meier@immerda.ch> - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune <jeff@puppetlabs.com> - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs <support@puppetlabs.com> - 2.3.2\n * Make file_line default to ensure => present (1373e70)\n * Memoize file_line spec instance variables (20aacc5)\n * Fix spec tests using the new spec_helper (1ebfa5d)\n * (#13595) initialize_everything_for_tests couples modules Puppet ver (3222f35)\n * (#13439) Fix MRI 1.9 issue with spec_helper (15c5fd1)\n * (#13439) Fix test failures with Puppet 2.6.x (665610b)\n * (#13439) refactor spec helper for compatibility with both puppet 2.7 and main (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs <support@puppetlabs.com> - 2.1.3\n* (#11607) Add Rakefile to enable spec testing\n* (#12377) Avoid infinite loop when retrying require json\n\n2012-03-13 Puppet Labs <support@puppetlabs.com> - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs <support@puppetlabs.com> - 2.3.0\n* Add a large number of new Puppet functions\n* Backwards compatibility preserved with 2.2.x\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs <support@puppetlabs.com> - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs <support@puppetlabs.com> - 2.2.0\n* #10285 - Refactor json to use pson instead.\n* Maint  - Add watchr autotest script\n* Maint  - Make rspec tests work with Puppet 2.6.4\n* #9859  - Add root_home fact and tests\n\n2011-08-18 Puppet Labs <support@puppetlabs.com> - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* /etc/facter/facts.d\n* /etc/puppetlabs/facter/facts.d\n\n2011-08-17 Puppet Labs <support@puppetlabs.com> - 2.1.0\n* Add R.I. Pienaar's facts.d custom facter fact\n* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are\n  automatically loaded now.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 2.0.0\n* Rename whole_line to file_line\n* This is an API change and as such motivating a 2.0.0 release according to semver.org.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.1.0\n* Rename append_line to whole_line\n* This is an API change and as such motivating a 1.1.0 release.\n\n2011-08-04 Puppet Labs <support@puppetlabs.com> - 1.0.0\n* Initial stable release\n* Add validate_array and validate_string functions\n* Make merge() function work with Ruby 1.8.5\n* Add hash merging function\n* Add has_key function\n* Add loadyaml() function\n* Add append_line native\n\n2011-06-21 Jeff McCune <jeff@puppetlabs.com> - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune <jeff@puppetlabs.com> - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune <jeff@puppetlabs.com>\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune <jeff@puppetlabs.com>\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune <jeff@puppetlabs.com>\n* Add stdlib::stages class with a standard set of stages\n
", "license": "
Copyright (C) 2011 Puppet Labs Inc\n\nand some parts:\n\nCopyright (C) 2011 Krzysztof Wilczynski\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-05-13 08:31:19 -0700", "updated_at": "2013-05-13 08:31:19 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-stdlib-4.1.0", "version": "4.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.2.0", "version": "3.2.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.1.1", "version": "3.1.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.1.0", "version": "3.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.0.1", "version": "3.0.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.6.0", "version": "2.6.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.5.1", "version": "2.5.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.5.0", "version": "2.5.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.4.0", "version": "2.4.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.3", "version": "2.3.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.2", "version": "2.3.2" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.1", "version": "2.3.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.3.0", "version": "2.3.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.2.1", "version": "2.2.1" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.2.0", "version": "2.2.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.1.3", "version": "2.1.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.7", "version": "0.1.7" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.6", "version": "0.1.6" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.5", "version": "0.1.5" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.4", "version": "0.1.4" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.3", "version": "0.1.3" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-stdlib-0.1.1", "version": "0.1.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-stdlib", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "downloads": 181047, "created_at": "2012-03-08 03:28:14 -0800", "updated_at": "2014-01-06 14:41:29 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-apt-1.4.0", "module": { "uri": "/v3/modules/puppetlabs-apt", "name": "apt", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.4.0", "metadata": { "name": "puppetlabs-apt", "version": "1.4.0", "summary": "Puppet Labs Apt Module", "author": "Evolving Web / Puppet Labs", "description": "APT Module for Puppet", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "0c43f56b0bb8e8d04e8051a0e7aa37a5", ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".nodeset.yml": "78d78c172336a387a1067464434ffbcb", ".travis.yml": "782420dcc9d6412c79c30f03b1f3613c", "CHANGELOG": "f5488e1e891a8f8c47143dac790ddab3", "Gemfile": "1bfa7eb6e30346c9ddb4a8b144b0d255", "Gemfile.lock": "8ff8bc3d32bb7412bd97e48190a93b2f", "LICENSE": "20bcc606fc61ffba2b8cea840e8dce4d", "Modulefile": "b34e93626fbc137cbb651952e7509839", "README.md": "65176b395f7202fe5d222ae7b0de4e05", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/backports.pp": "09f1d86603d0f44a2169acb3eeea2a70", "manifests/builddep.pp": "4f313b5140c84aa7d5793b5a073c30dd", "manifests/conf.pp": "5ddf258195d414d93284dfd281a8d6e3", "manifests/debian/testing.pp": "aeb625bacb6a8df46c864ee9ee1cb5a5", "manifests/debian/unstable.pp": "108038596b05dc1d28975884693f73f5", "manifests/force.pp": "cf871e869f4114f32ab164de2a67e7e2", "manifests/init.pp": "5ec106a7a03313c544159a9a1f6b78e6", "manifests/key.pp": "3cf082ed91a3933ab7218d1be3464f4f", "manifests/params.pp": "ca4ce3730a65c43f884ab3e6445f1661", "manifests/pin.pp": "dea8cbaabc37010ce25838080608802b", "manifests/ppa.pp": "754a83944ae79b5001fc0c0a8c775985", "manifests/release.pp": "427f3ee70a6a1e55fa291e58655bd5d9", "manifests/source.pp": "6eab8d33c173a066f5dec8474efdedb6", "manifests/unattended_upgrades.pp": "e97f908b42010ff9a85be4afd2c721ab", "manifests/update.pp": "436c79f160f2cb603710795a9ec71ac7", "spec/classes/apt_spec.rb": "54841b04b42026770ed6d744a82c55df", "spec/classes/backports_spec.rb": "7d2454a881cc26edd3dcd3acb7ffd20f", "spec/classes/debian_testing_spec.rb": "fad1384cb9d3c99b2663d7df4762dc0e", "spec/classes/debian_unstable_spec.rb": "11131efffd18db3c96e2bbe3d98a2fb7", "spec/classes/params_spec.rb": "a25396d3f0bbac784a7951f03ad7e8f4", "spec/classes/release_spec.rb": "d8f01a3cf0c2f6f6952b835196163ce4", "spec/classes/unattended_upgrades_spec.rb": "a2e206bda79d24cdb43312d035eff66f", "spec/defines/builddep_spec.rb": "e1300bb4f3abbd34029b11d8b733a6e5", "spec/defines/conf_spec.rb": "b7fc9fb6cb270c276aacbfa4a43f228c", "spec/defines/force_spec.rb": "97098c5b123be49e321e71cda288fe53", "spec/defines/key_spec.rb": "7800c30647b1ddf799b991110109cba0", "spec/defines/pin_spec.rb": "c912e59e9e3d1145280d659cccabe72b", "spec/defines/ppa_spec.rb": "72ce037a1d6ea0a33f369b1f3d98b3d6", "spec/defines/source_spec.rb": "e553bb9598dbe2becba6ae7f91d4deb0", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "e67d2574baae312f1095f90d78fdf5e9", "spec/system/apt_builddep_spec.rb": "97be5a48d2d16d96cb7c35ccdbcdcb69", "spec/system/apt_key_spec.rb": "098835d0c53c69390d4c3b6ea8ef3815", "spec/system/apt_ppa_spec.rb": "c96f6d0bbdafac39beaf0d5e6eba9010", "spec/system/apt_source_spec.rb": "df5aa98b03688884903c564bb507469f", "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6", "spec/system/class_spec.rb": "2ba4265236f00685c23cb00f908defc1", "templates/10periodic.erb": "2aeea866a39f19a62254abbb4f1bc59d", "templates/50unattended-upgrades.erb": "ae995ade214fdaefab51d335c85819ae", "templates/pin.pref.erb": "623249839cee7788fa0805a3474396db", "templates/source.list.erb": "65a016e60daf065c481f3d5f2c883324", "tests/builddep.pp": "4773f57072111e58f2ed833fa4489a88", "tests/debian/testing.pp": "1cbee56baddd6a91d981db8fddec70fb", "tests/debian/unstable.pp": "4b2a090afeb315752262386f4dbcd8ca", "tests/force.pp": "2bb6cf0b3d655cb51f95aeb79035e600", "tests/init.pp": "551138eb704e71ab3687932dda429a81", "tests/key.pp": "371a695e1332d51a38e283a87be52798", "tests/params.pp": "900db40f3fc84b0be173278df2ebff35", "tests/pin.pp": "4b4c3612d75a19dba8eb7227070fa4ab", "tests/ppa.pp": "b902cce8159128b5e8b21bed540743ff", "tests/release.pp": "53ce5debe6fa5bee42821767599cc768", "tests/source.pp": "9cecd9aa0dcde250fe49be9e26971a98", "tests/unattended-upgrades.pp": "cdc853f1b58e5206c5a538621ddca161" }, "source": "https://github.com/puppetlabs/puppetlabs-apt", "project_page": "https://github.com/puppetlabs/puppetlabs-apt", "license": "Apache License 2.0" }, "tags": [ "apt", "debian", "ubuntu", "dpkg", "apt-get", "aptitude", "ppa" ], "file_uri": "/v3/files/puppetlabs-apt-1.4.0.tar.gz", "file_size": 27238, "file_md5": "c483d6e375387d5e1fe780ee51ee512c", "downloads": 61047, "readme": "

apt

\n\n

\"Build

\n\n

Description

\n\n

Provides helpful definitions for dealing with Apt.

\n\n

Overview

\n\n

The APT module provides a simple interface for managing APT source, key, and definitions with Puppet.

\n\n

Module Description

\n\n

APT automates obtaining and installing software packages on *nix systems.

\n\n

Setup

\n\n

What APT affects:

\n\n
    \n
  • package/service/configuration files for APT
  • \n
  • your system's sources.list file and sources.list.d directory\n\n
      \n
    • NOTE: Setting the purge_sources_list and purge_sources_list_d parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'.
    • \n
  • \n
  • system repositories
  • \n
  • authentication keys
  • \n
  • wget (optional)
  • \n
\n\n

Beginning with APT

\n\n

To begin using the APT module with default parameters, declare the class

\n\n
class { 'apt': }\n
\n\n

Puppet code that uses anything from the APT module requires that the core apt class be declared.

\n\n

Usage

\n\n

Using the APT module consists predominantly in declaring classes that provide desired functionality and features.

\n\n

apt

\n\n

apt provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests.

\n\n

The parameters for apt are not required in general and are predominantly for development environment use-cases.

\n\n
class { 'apt':\n  always_apt_update    => false,\n  disable_keys         => undef,\n  proxy_host           => false,\n  proxy_port           => '8080',\n  purge_sources_list   => false,\n  purge_sources_list_d => false,\n  purge_preferences_d  => false,\n  update_timeout       => undef\n}\n
\n\n

Puppet will manage your system's sources.list file and sources.list.d directory but will do its best to respect existing content.

\n\n

If you declare your apt class with purge_sources_list and purge_sources_list_d set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet.

\n\n

apt::builddep

\n\n

Installs the build depends of a specified package.

\n\n
apt::builddep { 'glusterfs-server': }\n
\n\n

apt::force

\n\n

Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
apt::force { 'glusterfs-server':\n  release => 'unstable',\n  version => '3.0.3',\n  require => Apt::Source['debian_unstable'],\n}\n
\n\n

apt::key

\n\n

Adds a key to the list of keys used by APT to authenticate packages.

\n\n
apt::key { 'puppetlabs':\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n\napt::key { 'jenkins':\n  key        => 'D50582E6',\n  key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',\n}\n
\n\n

Note that use of key_source requires wget to be installed and working.

\n\n

apt::pin

\n\n

Adds an apt pin for a certain release.

\n\n
apt::pin { 'karmic': priority => 700 }\napt::pin { 'karmic-updates': priority => 700 }\napt::pin { 'karmic-security': priority => 700 }\n
\n\n

Note you can also specifying more complex pins using distribution properties.

\n\n
apt::pin { 'stable':\n  priority        => -10,\n  originator      => 'Debian',\n  release_version => '3.0',\n  component       => 'main',\n  label           => 'Debian'\n}\n
\n\n

apt::ppa

\n\n

Adds a ppa repository using add-apt-repository.

\n\n
apt::ppa { 'ppa:drizzle-developers/ppa': }\n
\n\n

apt::release

\n\n

Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.

\n\n
class { 'apt::release':\n  release_id => 'precise',\n}\n
\n\n

apt::source

\n\n

Adds an apt source to /etc/apt/sources.list.d/.

\n\n
apt::source { 'debian_unstable':\n  location          => 'http://debian.mirror.iweb.ca/debian/',\n  release           => 'unstable',\n  repos             => 'main contrib non-free',\n  required_packages => 'debian-keyring debian-archive-keyring',\n  key               => '55BE302B',\n  key_server        => 'subkeys.pgp.net',\n  pin               => '-10',\n  include_src       => true\n}\n
\n\n

If you would like to configure your system so the source is the Puppet Labs APT repository

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

Testing

\n\n

The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources.

\n\n

Example Test

\n\n

This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key

\n\n
apt::source { 'puppetlabs':\n  location   => 'http://apt.puppetlabs.com',\n  repos      => 'main',\n  key        => '4BD6EC30',\n  key_server => 'pgp.mit.edu',\n}\n
\n\n

This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type.

\n\n

Check your smoke test for syntax errors

\n\n
$ puppet parser validate tests/puppetlabs-apt.pp\n
\n\n

If you receive no output from that command, it means nothing is wrong. Then apply the code

\n\n
$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e'\ninfo: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update]\nnotice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events>\n
\n\n

The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed.

\n\n

Implementation

\n\n

apt::backports

\n\n

Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to $lsbdistcodename. Setting this manually can cause undefined behavior (read: universe exploding).

\n\n

Limitations

\n\n

This module should work across all versions of Debian/Ubuntu and support all major APT repository management features.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Contributors

\n\n

A lot of great people have contributed to this module. A somewhat current list follows:

\n\n\n
", "changelog": "
2013-10-08 1.4.0\n\nSummary:\n\nMinor bugfix and allow the timeout to be adjusted.\n\nFeatures:\n- Add an `updates_timeout` to apt::params\n\nFixes:\n- Ensure apt::ppa can readd a ppa removed by hand.\n\nSummary\n\n1.3.0\n=====\n\nSummary:\n\nThis major feature in this release is the new apt::unattended_upgrades class,\nallowing you to handle Ubuntu's unattended feature.  This allows you to select\nspecific packages to automatically upgrade without any further user\ninvolvement.\n\nIn addition we extend our Wheezy support, add proxy support to apt:ppa and do\nvarious cleanups and tweaks.\n\nFeatures:\n- Add apt::unattended_upgrades support for Ubuntu.\n- Add wheezy backports support.\n- Use the geoDNS http.debian.net instead of the main debian ftp server.\n- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command.\n- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt).\n\nBugfixes:\n- Fix regsubst() calls to quote single letters (for future parser).\n- Fix lint warnings and other misc cleanup.\n\n1.2.0\n=====\n\nFeatures:\n- Add geppetto `.project` natures\n- Add GH auto-release\n- Add `apt::key::key_options` parameter\n- Add complex pin support using distribution properties for `apt::pin` via new properties:\n  - `apt::pin::codename`\n  - `apt::pin::release_version`\n  - `apt::pin::component`\n  - `apt::pin::originator`\n  - `apt::pin::label`\n- Add source architecture support to `apt::source::architecture`\n\nBugfixes:\n- Use apt-get instead of aptitude in apt::force\n- Update default backports location\n- Add dependency for required packages before apt-get update\n\n\n1.1.1\n=====\n\nThis is a bug fix release that resolves a number of issues:\n\n* By changing template variable usage, we remove the deprecation warnings\n  for Puppet 3.2.x\n* Fixed proxy file removal, when proxy absent\n\nSome documentation, style and whitespaces changes were also merged. This\nrelease also introduced proper rspec-puppet unit testing on Travis-CI to help\nreduce regression.\n\nThanks to all the community contributors below that made this patch possible.\n\n#### Detail Changes\n\n* fix minor comment type (Chris Rutter)\n* whitespace fixes (Michael Moll)\n* Update travis config file (William Van Hevelingen)\n* Build all branches on travis (William Van Hevelingen)\n* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen)\n* Updated content to conform to README best practices template (Lauren Rother)\n* Fix apt::release example in readme (Brian Galey)\n* add @ to variables in template (Peter Hoeg)\n* Remove deprecation warnings for pin.pref.erb as well (Ken Barber)\n* Update travis.yml to latest versions of puppet (Ken Barber)\n* Fix proxy file removal (Scott Barber)\n* Add spec test for removing proxy configuration (Dean Reilly)\n* Fix apt::key listing longer than 8 chars (Benjamin Knofe)\n\n\n---------------------------------------\n\n1.1.0\n=====\n\nThis release includes Ubuntu 12.10 (Quantal) support for PPAs.\n\n---------------------------------------\n\n2012-05-25 Puppet Labs <info@puppetlabs.com> - 0.0.4\n * Fix ppa list filename when there is a period in the PPA name\n * Add .pref extension to apt preferences files\n * Allow preferences to be purged\n * Extend pin support\n\n2012-05-04 Puppet Labs <info@puppetlabs.com> - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support 'ensure => absent' for all defined types\n * add apt::conf\n * add apt::backports\n * fixed Modulefile for module tool dependency resolution\n * configure proxy before doing apt-get update\n * use apt-get update instead of aptitude for apt::ppa\n * add support to pin release\n\n\n2012-03-26 Puppet Labs <info@puppetlabs.com> - 0.0.2\n41cedbb (#13261) Add real examples to smoke tests.\nd159a78 (#13261) Add key.pp smoke test\n7116c7a (#13261) Replace foo source with puppetlabs source\n1ead0bf Ignore pkg directory.\n9c13872 (#13289) Fix some more style violations\n0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path\na758247 (#13289) Clean up style violations and fix corresponding tests\n99c3fd3 (#13289) Add puppet lint tests to Rakefile\n5148cbf (#13125) Apt keys should be case insensitive\nb9607a4 Convert apt::key to use anchors\n\n2012-03-07 Puppet Labs <info@puppetlabs.com> - 0.0.1\nd4fec56 Modify apt::source release parameter test\n1132a07 (#12917) Add contributors to README\n8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it\n7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input\nbe2cc3e (#12522) Adjust spec test for splitting purge\n7dc60ae (#12522) Split purge option to spare sources.list\n9059c4e Fix source specs to test all key permutations\n8acb202 Add test for python-software-properties package\na4af11f Check if python-software-properties is defined before attempting to define it.\n1dcbf3d Add tests for required_packages change\nf3735d2 Allow duplicate $required_packages\n74c8371 (#12430) Add tests for changes to apt module\n97ebb2d Test two sources with the same key\n1160bcd (#12526) Add ability to reverse apt { disable_keys => true }\n2842d73 Add Modulefile to puppet-apt\nc657742 Allow the use of the same key in multiple sources\n8c27963 (#12522) Adding purge option to apt class\n997c9fd (#12529) Add unit test for apt proxy settings\n50f3cca (#12529) Add parameter to support setting a proxy for apt\nd522877 (#12094) Replace chained .with_* with a hash\n8cf1bd0 (#12094) Remove deprecated spec.opts file\n2d688f4 (#12094) Add rspec-puppet tests for apt\n0fb5f78 (#12094) Replace name with path in file resources\nf759bc0 (#11953) Apt::force passes $version to aptitude\nf71db53 (#11413) Add spec test for apt::force to verify changes to unless\n2f5d317 (#11413) Update dpkg query used by apt::force\ncf6caa1 (#10451) Add test coverage to apt::ppa\n0dd697d include_src parameter in example; Whitespace cleanup\nb662eb8 fix typos in "repositories"\n1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added\n864302a Set the pin priority before adding the source (Fix #10449)\n1de4e0a Refactored as per mlitteken\n1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run!\n52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep\n5c05fa0 added builddep command.\na11af50 added the ability to specify the content of a key\nc42db0f Fixes ppa test.\n77d2b0d reformatted whitespace to match recommended style of 2 space indentation.\n27ebdfc ignore swap files.\n377d58a added smoke tests for module.\n18f614b reformatted apt::ppa according to recommended style.\nd8a1e4e Created a params class to hold global data.\n636ae85 Added two params for apt class\n148fc73 Update LICENSE.\ned2d19e Support ability to add more than one PPA\n420d537 Add call to apt-update after add-apt-repository in apt::ppa\n945be77 Add package definition for python-software-properties\n71fc425 Abs paths for all commands\n9d51cd1 Adding LICENSE\n71796e3 Heading fix in README\n87777d8 Typo in README\nf848bac First commit\n
", "license": "
Copyright (c) 2011 Evolving Web Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2013-10-15 11:06:03 -0700", "updated_at": "2013-10-15 11:06:03 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apt-1.4.0", "version": "1.4.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.1.1", "version": "1.1.1" }, { "uri": "/v3/releases/puppetlabs-apt-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-apt-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-apt-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apt-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apt", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "downloads": 120794, "created_at": "2011-10-18 22:14:41 -0700", "updated_at": "2014-01-06 14:40:35 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-firewall-0.4.2", "module": { "uri": "/v3/modules/puppetlabs-firewall", "name": "firewall", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.2", "metadata": { "name": "puppetlabs-firewall", "version": "0.4.2", "source": "git://github.com/puppetlabs/puppetlabs-firewall.git", "author": "puppetlabs", "license": "ASL 2.0", "summary": "Firewall Module", "description": "Manages Firewalls such as iptables", "project_page": "http://forge.puppetlabs.com/puppetlabs/firewall", "dependencies": [ ], "types": [ { "name": "firewall", "doc": " This type provides the capability to manage firewall rules within\n puppet.\n\n **Autorequires:**\n\n If Puppet is managing the iptables or ip6tables chains specified in the\n `chain` or `jump` parameters, the firewall resource will autorequire\n those firewallchain resources.\n\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables or ip6tables, the firewall resource will\n autorequire those packages to ensure that any required binaries are\n installed.\n", "properties": [ { "name": "ensure", "doc": " Manage the state of this rule. The default action is *present*.\n Valid values are `present`, `absent`." }, { "name": "action", "doc": " This is the action to perform on a match. Can be one of:\n\n * accept - the packet is accepted\n * reject - the packet is rejected with a suitable ICMP response\n * drop - the packet is dropped\n\n If you specify no value it will simply match the rule but perform no\n action unless you provide a provider specific parameter (such as *jump*).\n Valid values are `accept`, `reject`, `drop`." }, { "name": "source", "doc": " The source address. For example:\n\n source => '192.168.2.0/24'\n\n The source can also be an IPv6 address if your provider supports it.\n" }, { "name": "src_range", "doc": " The source IP range. For example:\n\n src_range => '192.168.1.1-192.168.1.10'\n\n The source IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "destination", "doc": " The destination address to match. For example:\n\n destination => '192.168.1.0/24'\n\n The destination can also be an IPv6 address if your provider supports it.\n" }, { "name": "dst_range", "doc": " The destination IP range. For example:\n\n dst_range => '192.168.1.1-192.168.1.10'\n\n The destination IP range is must in 'IP1-IP2' format.\n Values can match `/^((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)-((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)/`. Requires features iprange." }, { "name": "sport", "doc": " The source port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dport", "doc": " The destination port to match for this filter (if the protocol supports\n ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "port", "doc": " The destination or source port to match for this filter (if the protocol\n supports ports). Will accept a single element or an array.\n\n For some firewall providers you can pass a range of ports in the format:\n\n -\n\n For example:\n\n 1-1024\n\n This would cover ports 1 to 1024.\n" }, { "name": "dst_type", "doc": " The destination address type. For example:\n\n dst_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "src_type", "doc": " The source address type. For example:\n\n src_type => 'LOCAL'\n\n Can be one of:\n\n * UNSPEC - an unspecified address\n * UNICAST - a unicast address\n * LOCAL - a local address\n * BROADCAST - a broadcast address\n * ANYCAST - an anycast packet\n * MULTICAST - a multicast address\n * BLACKHOLE - a blackhole address\n * UNREACHABLE - an unreachable address\n * PROHIBIT - a prohibited address\n * THROW - undocumented\n * NAT - undocumented\n * XRESOLVE - undocumented\n Valid values are `UNSPEC`, `UNICAST`, `LOCAL`, `BROADCAST`, `ANYCAST`, `MULTICAST`, `BLACKHOLE`, `UNREACHABLE`, `PROHIBIT`, `THROW`, `NAT`, `XRESOLVE`. Requires features address_type." }, { "name": "proto", "doc": " The specific protocol to match for this rule. By default this is\n *tcp*.\n Valid values are `tcp`, `udp`, `icmp`, `ipv6-icmp`, `esp`, `ah`, `vrrp`, `igmp`, `ipencap`, `ospf`, `gre`, `all`." }, { "name": "tcp_flags", "doc": " Match when the TCP flags are as specified.\n Is a string with a list of comma-separated flag names for the mask,\n then a space, then a comma-separated list of flags that should be set.\n The flags are: SYN ACK FIN RST URG PSH ALL NONE\n Note that you specify them in the order that iptables --list-rules\n would list them to avoid having puppet think you changed the flags.\n Example: FIN,SYN,RST,ACK SYN matches packets with the SYN bit set and the\n\t ACK,RST and FIN bits cleared. Such packets are used to request\n TCP connection initiation.\n Requires features tcp_flags." }, { "name": "chain", "doc": " Name of the chain to use. Can be one of the built-ins:\n\n * INPUT\n * FORWARD\n * OUTPUT\n * PREROUTING\n * POSTROUTING\n\n Or you can provide a user-based chain.\n\n The default value is 'INPUT'.\n Values can match `/^[a-zA-Z0-9\\-_]+$/`. Requires features iptables." }, { "name": "table", "doc": " Table to use. Can be one of:\n\n * nat\n * mangle\n * filter\n * raw\n * rawpost\n\n By default the setting is 'filter'.\n Valid values are `nat`, `mangle`, `filter`, `raw`, `rawpost`. Requires features iptables." }, { "name": "jump", "doc": " The value for the iptables --jump parameter. Normal values are:\n\n * QUEUE\n * RETURN\n * DNAT\n * SNAT\n * LOG\n * MASQUERADE\n * REDIRECT\n * MARK\n\n But any valid chain name is allowed.\n\n For the values ACCEPT, DROP and REJECT you must use the generic\n 'action' parameter. This is to enfore the use of generic parameters where\n possible for maximum cross-platform modelling.\n\n If you set both 'accept' and 'jump' parameters, you will get an error as\n only one of the options should be set.\n Requires features iptables." }, { "name": "iniface", "doc": " Input interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "outiface", "doc": " Output interface to filter on.\n Values can match `/^[a-zA-Z0-9\\-\\._\\+]+$/`. Requires features interface_match." }, { "name": "tosource", "doc": " When using jump => \"SNAT\" you can specify the new source address using\n this parameter.\n Requires features snat." }, { "name": "todest", "doc": " When using jump => \"DNAT\" you can specify the new destination address\n using this paramter.\n Requires features dnat." }, { "name": "toports", "doc": " For DNAT this is the port that will replace the destination port.\n Requires features dnat." }, { "name": "reject", "doc": " When combined with jump => \"REJECT\" you can specify a different icmp\n response to be sent back to the packet sender.\n Requires features reject_type." }, { "name": "log_level", "doc": " When combined with jump => \"LOG\" specifies the system log level to log\n to.\n Requires features log_level." }, { "name": "log_prefix", "doc": " When combined with jump => \"LOG\" specifies the log prefix to use when\n logging.\n Requires features log_prefix." }, { "name": "icmp", "doc": " When matching ICMP packets, this is the type of ICMP packet to match.\n\n A value of \"any\" is not supported. To achieve this behaviour the\n parameter should simply be omitted or undefined.\n Requires features icmp_match." }, { "name": "state", "doc": " Matches a packet based on its state in the firewall stateful inspection\n table. Values can be:\n\n * INVALID\n * ESTABLISHED\n * NEW\n * RELATED\n Valid values are `INVALID`, `ESTABLISHED`, `NEW`, `RELATED`. Requires features state_match." }, { "name": "limit", "doc": " Rate limiting value for matched packets. The format is:\n rate/[/second/|/minute|/hour|/day].\n\n Example values are: '50/sec', '40/min', '30/hour', '10/day'.\"\n Requires features rate_limiting." }, { "name": "burst", "doc": " Rate limiting burst value (per second) before limit checks apply.\n Values can match `/^\\d+$/`. Requires features rate_limiting." }, { "name": "uid", "doc": " UID or Username owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple uid in a single\n statement.\n Requires features owner." }, { "name": "gid", "doc": " GID or Group owner matching rule. Accepts a string argument\n only, as iptables does not accept multiple gid in a single\n statement.\n Requires features owner." }, { "name": "set_mark", "doc": " Set the Netfilter mark value associated with the packet. Accepts either of:\n mark/mask or mark. These will be converted to hex if they are not already.\n Requires features mark." }, { "name": "pkttype", "doc": " Sets the packet type to match.\n Valid values are `unicast`, `broadcast`, `multicast`. Requires features pkttype." }, { "name": "isfragment", "doc": " Set to true to match tcp fragments (requires type to be set to tcp)\n Valid values are `true`, `false`. Requires features isfragment." }, { "name": "socket", "doc": " If true, matches if an open socket can be found by doing a coket lookup\n on the packet.\n Valid values are `true`, `false`. Requires features socket." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the rule. This name is also used for ordering\n so make sure you prefix the rule with a number:\n\n 000 this runs first\n 999 this runs last\n\n Depending on the provider, the name of the rule can be stored using\n the comment feature of the underlying firewall subsystem.\n Values can match `/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`." }, { "name": "line", "doc": " Read-only property for caching the rule line.\n" } ], "providers": [ { "name": "ip6tables", "doc": "Ip6tables type provider\n\nRequired binaries: `ip6tables`, `ip6tables-save`. Supported features: `dnat`, `icmp_match`, `interface_match`, `iptables`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `state_match`, `tcp_flags`." }, { "name": "iptables", "doc": "Iptables type provider\n\nRequired binaries: `iptables`, `iptables-save`. Default for `kernel` == `linux`. Supported features: `address_type`, `dnat`, `icmp_match`, `interface_match`, `iprange`, `iptables`, `isfragment`, `log_level`, `log_prefix`, `mark`, `owner`, `pkttype`, `rate_limiting`, `reject_type`, `snat`, `socket`, `state_match`, `tcp_flags`." } ] }, { "name": "firewallchain", "doc": " This type provides the capability to manage rule chains for firewalls.\n\n Currently this supports only iptables, ip6tables and ebtables on Linux. And\n provides support for setting the default policy on chains and tables that\n allow it.\n\n **Autorequires:**\n If Puppet is managing the iptables or iptables-persistent packages, and\n the provider is iptables_chain, the firewall resource will autorequire\n those packages to ensure that any required binaries are installed.\n", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "policy", "doc": " This is the action to when the end of the chain is reached.\n It can only be set on inbuilt chains (INPUT, FORWARD, OUTPUT,\n PREROUTING, POSTROUTING) and can be one of:\n\n * accept - the packet is accepted\n * drop - the packet is dropped\n * queue - the packet is passed userspace\n * return - the packet is returned to calling (jump) queue\n or the default of inbuilt chains\n Valid values are `accept`, `drop`, `queue`, `return`." } ], "parameters": [ { "name": "name", "doc": " The canonical name of the chain.\n\n For iptables the format must be {chain}:{table}:{protocol}.\n" } ], "providers": [ { "name": "iptables_chain", "doc": "Iptables chain provider\n\nRequired binaries: `iptables`, `iptables-save`, `ip6tables`, `ip6tables-save`, `ebtables`, `ebtables-save`. Default for `kernel` == `linux`. Supported features: `iptables_chain`, `policy`." } ] } ], "checksums": { "CONTRIBUTING.md": "346969b756bc432a2a2fab4307ebb93a", "Changelog": "1de1691b4ab10ee354f761a1f4c6f443", "Gemfile": "cbdce086f4dbabe5394121e2281b739f", "Gemfile.lock": "df949ce515d5c06d6ed31b9d7e5e3391", "LICENSE": "ade7f2bb88b5b4f034152822222ec314", "Modulefile": "5e06a785cd9bce7b53f95c23eba506d2", "README.markdown": "41df885b5286abc9ba27f054c5ff6dbf", "Rakefile": "35d0261289b65faa09bef45b888d40ae", "lib/facter/ip6tables_version.rb": "091123ad703f1706686bca4398c5b06f", "lib/facter/iptables_persistent_version.rb": "b7a47827cd3d3bb1acbd526a31da3acb", "lib/facter/iptables_version.rb": "facbd760223f236538b731c1d1f6cf8f", "lib/puppet/provider/firewall/ip6tables.rb": "e9579ae3afdf8b1392cbdc0335ef5464", "lib/puppet/provider/firewall/iptables.rb": "bb7ea2c54c60c1047e68745f3b370c6f", "lib/puppet/provider/firewall.rb": "32d2f5e5dcc082986b82ef26a119038b", "lib/puppet/provider/firewallchain/iptables_chain.rb": "e98592c22901792305e0d20376c9a281", "lib/puppet/type/firewall.rb": "2a591254b2df7528eafaa6dff5459ace", "lib/puppet/type/firewallchain.rb": "91ebccecff290a9ab2116867a74080c7", "lib/puppet/util/firewall.rb": "a9f0057c1b16a51a0bace5d4a8cc4ea4", "lib/puppet/util/ipcidr.rb": "e1160dfd6e73fc5ef2bb8abc291f6fd5", "manifests/init.pp": "ba3e697f00fc3d4e7e5b9c7fdbc6a89d", "manifests/linux/archlinux.pp": "1257fe335ecafa0629b285dc8621cf75", "manifests/linux/debian.pp": "626f0fd23f2f451ca14e2b7f690675fe", "manifests/linux/redhat.pp": "44ce25057ae8d814465260767b39c414", "manifests/linux.pp": "7380519131fa8daae0ef45f9a162aff7", "spec/fixtures/iptables/conversion_hash.rb": "012d92a358cc0c74304de14657bf9a23", "spec/spec_helper.rb": "faae8467928b93bd251a1a66e1eedbe5", "spec/spec_helper_system.rb": "4981e0b995c12996e628d004ffdcc9f4", "spec/system/basic_spec.rb": "34a22dedba01b8239024137bda8ab3f8", "spec/system/class_spec.rb": "04d89039312c3b9293dbb680878101c6", "spec/system/params_spec.rb": "f982f9eb6ecc8d6782b9267b59d321bf", "spec/system/purge_spec.rb": "a336e8a20d4c330606bf5955799a7e35", "spec/system/resource_cmd_spec.rb": "f991d2b7a3e2eb6d28471534cd38b0c8", "spec/system/standard_usage_spec.rb": "f80f86703843775ac14635464e9f7549", "spec/unit/classes/firewall_linux_archlinux_spec.rb": "1c600a9852ec328b14cb15b0630ed5ff", "spec/unit/classes/firewall_linux_debian_spec.rb": "6334936fb16223cf15f637083c67850e", "spec/unit/classes/firewall_linux_redhat_spec.rb": "f41b21caf6948f3ac08f42c1bc59ba1b", "spec/unit/classes/firewall_linux_spec.rb": "b934ab4e0a806f29bfdabd2369e41d0e", "spec/unit/classes/firewall_spec.rb": "14fc76eeb702913159661c01125baabb", "spec/unit/facter/iptables_persistent_version_spec.rb": "98aa337aae2ae8a2ac7f70586351e928", "spec/unit/facter/iptables_spec.rb": "ebb008f0e01530a49007228ca1a81097", "spec/unit/puppet/provider/iptables_chain_spec.rb": "6265dbb6be5af74f056d32c7e7236d0a", "spec/unit/puppet/provider/iptables_spec.rb": "b1e92084c8595b7e2ef21aa0800ea084", "spec/unit/puppet/type/firewall_spec.rb": "f229613c1bec34b6f84b544e021dc856", "spec/unit/puppet/type/firewallchain_spec.rb": "49157d8703daf8776e414ef9ea9e5cb3", "spec/unit/puppet/util/firewall_spec.rb": "3d7858f46ea3c97617311b7a5cebbae1", "spec/unit/puppet/util/ipcidr_spec.rb": "1a6eeb2dd7c9634fcfb60d8ead6e1d79" } }, "tags": [ "iptables", "security", "firewall", "ip6tables", "archlinux", "redhat", "centos", "debian", "ubuntu" ], "file_uri": "/v3/files/puppetlabs-firewall-0.4.2.tar.gz", "file_size": 51834, "file_md5": "7862ef0aa64d9a4b87152ef27302c9e4", "downloads": 53034, "readme": "

firewall

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Firewall module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Firewall\n\n
  6. \n
  7. Usage - Configuration and customization options\n\n
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module\n\n
  14. \n
\n\n

Overview

\n\n

The Firewall module lets you manage firewall rules with Puppet.

\n\n

Module Description

\n\n

PuppetLabs' Firewall introduces the resource firewall, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables.

\n\n

The module also introduces the resource firewallchain, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported.

\n\n

Setup

\n\n

What Firewall affects:

\n\n
    \n
  • every node running a firewall
  • \n
  • system's firewall settings
  • \n
  • connection settings for managed nodes
  • \n
  • unmanaged resources (get purged)
  • \n
  • site.pp
  • \n
\n\n

Setup Requirements

\n\n

Firewall uses Ruby-based providers, so you must have pluginsync enabled.

\n\n

Beginning with Firewall

\n\n

To begin, you need to provide some initial top-scope configuration to ensure your firewall configurations are ordered properly and you do not lock yourself out of your box or lose any configuration.

\n\n

Persistence of rules between reboots is handled automatically, although there are known issues with ip6tables on older Debian/Ubuntu, as well as known issues with ebtables.

\n\n

In your site.pp (or some similarly top-scope file), set up a metatype to purge unmanaged firewall resources. This will clear any existing rules and make sure that only rules defined in Puppet exist on the machine.

\n\n
resources { "firewall":\n  purge => true\n}\n
\n\n

Next, set up the default parameters for all of the firewall rules you will be establishing later. These defaults will ensure that the pre and post classes (you will be setting up in just a moment) are run in the correct order to avoid locking you out of your box during the first puppet run.

\n\n
Firewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\n
\n\n

You also need to declare the my_fw::pre & my_fw::post classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following

\n\n
class { ['my_fw::pre', 'my_fw::post']: }\n
\n\n

Finally, you should include the firewall class to ensure the correct packages are installed.

\n\n
class { 'firewall': }\n
\n\n

Now to create the my_fw::pre and my_fw::post classes. Firewall acts on your running firewall, making immediate changes as the catalog executes. Defining default pre and post rules allows you provide global defaults for your hosts before and after any custom rules; it is also required to avoid locking yourself out of your own boxes when Puppet runs. This approach employs a allowlist setup, so you can define what rules you want and everything else is ignored rather than removed.

\n\n

The pre class should be located in my_fw/manifests/pre.pp and should contain any default rules to be applied first.

\n\n
class my_fw::pre {\n  Firewall {\n    require => undef,\n  }\n\n  # Default firewall rules\n  firewall { '000 accept all icmp':\n    proto   => 'icmp',\n    action  => 'accept',\n  }->\n  firewall { '001 accept all to lo interface':\n    proto   => 'all',\n    iniface => 'lo',\n    action  => 'accept',\n  }->\n  firewall { '002 accept related established rules':\n    proto   => 'all',\n    state   => ['RELATED', 'ESTABLISHED'],\n    action  => 'accept',\n  }\n}\n
\n\n

The rules in pre should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed.

\n\n

The post class should be located in my_fw/manifests/post.pp and include any default rules to be applied last.

\n\n
class my_fw::post {\n  firewall { '999 drop all':\n    proto   => 'all',\n    action  => 'drop',\n    before  => undef,\n  }\n}\n
\n\n

To put it all together: the before parameter in Firewall {} ensures my_fw::post is run before any other rules and the the require parameter ensures my_fw::pre is run after any other rules. So the run order is:

\n\n
    \n
  • run the rules in my_fw::pre
  • \n
  • run your rules (defined in code)
  • \n
  • run the rules in my_fw::post
  • \n
\n\n

Upgrading

\n\n

Upgrading from version 0.2.0 and newer

\n\n

Upgrade the module with the puppet module tool as normal:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Upgrading from version 0.1.1 and older

\n\n

Start by upgrading the module using the puppet module tool:

\n\n
puppet module upgrade puppetlabs/firewall\n
\n\n

Previously, you would have required the following in your site.pp (or some other global location):

\n\n
# Always persist firewall rules\nexec { 'persist-firewall':\n  command     => $operatingsystem ? {\n    'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n    /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n  },\n  refreshonly => true,\n}\nFirewall {\n  notify  => Exec['persist-firewall'],\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nFirewallchain {\n  notify  => Exec['persist-firewall'],\n}\nresources { "firewall":\n  purge => true\n}\n
\n\n

With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre & post rules.

\n\n
resources { "firewall":\n  purge => true\n}\nFirewall {\n  before  => Class['my_fw::post'],\n  require => Class['my_fw::pre'],\n}\nclass { ['my_fw::pre', 'my_fw::post']: }\nclass { 'firewall': }\n
\n\n

Consult the the documentation below for more details around the classes my_fw::pre and my_fw::post.

\n\n

Usage

\n\n

There are two kinds of firewall rules you can use with Firewall: default rules and application-specific rules. Default rules apply to general firewall settings, whereas application-specific rules manage firewall settings of a specific application, node, etc.

\n\n

All rules employ a numbering system in the resource's title that is used for ordering. When titling your rules, make sure you prefix the rule with a number.

\n\n
  000 this runs first\n  999 this runs last\n
\n\n

Default rules

\n\n

You can place default rules in either my_fw::pre or my_fw::post, depending on when you would like them to run. Rules placed in the pre class will run first, rules in the post class, last.

\n\n

Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match /^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/.

\n\n

Examples of default rules

\n\n

Basic accept ICMP request example:

\n\n
firewall { "000 accept all icmp requests":\n  proto  => "icmp",\n  action => "accept",\n}\n
\n\n

Drop all:

\n\n
firewall { "999 drop all other requests":\n  action => "drop",\n}\n
\n\n

Application-specific rules

\n\n

Application-specific rules can live anywhere you declare the firewall resource. It is best to put your firewall rules close to the service that needs it, such as in the module that configures it.

\n\n

You should be able to add firewall rules to your application-specific classes so firewalling is performed at the same time when the class is invoked.

\n\n

For example, if you have an Apache module, you could declare the class as below

\n\n
class apache {\n  firewall { '100 allow http and https access':\n    port   => [80, 443],\n    proto  => tcp,\n    action => accept,\n  }\n  # ... the rest of your code ...\n}\n
\n\n

When someone uses the class, firewalling is provided automatically.

\n\n
class { 'apache': }\n
\n\n

Other rules

\n\n

You can also apply firewall rules to specific nodes. Usually, you will want to put the firewall rule in another class and apply that class to a node. But you can apply a rule to a node.

\n\n
node 'foo.bar.com' {\n  firewall { '111 open port 111':\n    dport => 111\n  }\n}\n
\n\n

You can also do more complex things with the firewall resource. Here we are doing some NAT configuration.

\n\n
firewall { '100 snat for network foo2':\n  chain    => 'POSTROUTING',\n  jump     => 'MASQUERADE',\n  proto    => 'all',\n  outiface => "eth0",\n  source   => '10.1.2.0/24',\n  table    => 'nat',\n}\n
\n\n

In the below example, we are creating a new chain and forwarding any port 5000 access to it.

\n\n
firewall { '100 forward to MY_CHAIN':\n  chain   => 'INPUT',\n  jump    => 'MY_CHAIN',\n}\n# The namevar here is in the format chain_name:table:protocol\nfirewallchain { 'MY_CHAIN:filter:IPv4':\n  ensure  => present,\n}\nfirewall { '100 my rule':\n  chain   => 'MY_CHAIN',\n  action  => 'accept',\n  proto   => 'tcp',\n  dport   => 5000,\n}\n
\n\n

Additional Information

\n\n

You can access the inline documentation:

\n\n
puppet describe firewall\n
\n\n

Or

\n\n
puppet doc -r type\n(and search for firewall)\n
\n\n

Reference

\n\n

Classes:

\n\n\n\n

Types:

\n\n\n\n

Facts:

\n\n\n\n

Class: firewall

\n\n

This class is provided to do the basic setup tasks required for using the firewall resources.

\n\n

At the moment this takes care of:

\n\n
    \n
  • iptables-persistent package installation
  • \n
\n\n

You should include the class for nodes that need to use the resources in this module. For example

\n\n
class { 'firewall': }\n
\n\n

ensure

\n\n

Indicates the state of iptables on your system, allowing you to disable iptables if desired.

\n\n

Can either be running or stopped. Default to running.

\n\n

Type: firewall

\n\n

This type provides the capability to manage firewall rules within puppet.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Type:: firewallchain

\n\n

This type provides the capability to manage rule chains for firewalls.

\n\n

For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge:

\n\n

http://forge.puppetlabs.com/puppetlabs/firewall#types

\n\n

Fact: ip6tables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution.

\n\n

Fact: iptables_version

\n\n

The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution.

\n\n

Fact: iptables_persistent_version

\n\n

Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact.

\n\n

Limitations

\n\n

While we aim to support as low as Puppet 2.6.x (for now), we recommend installing the latest Puppet version from the Puppetlabs official repos.

\n\n

Please note, we only aim support for the following distributions and versions - that is, we actually do ongoing system tests on these platforms:

\n\n
    \n
  • Redhat 5.9 and 6.4
  • \n
  • Debian 6.0 and 7.0
  • \n
  • Ubuntu 10.04 and 12.04
  • \n
\n\n

If you want a new distribution supported feel free to raise a ticket and we'll consider it. If you want an older revision supported we'll also consider it, but don't get insulted if we reject it. Specifically, we will not consider Redhat 4.x support - its just too old.

\n\n

If you really want to get support for your OS we suggest writing any patch fix yourself, and for continual system testing if you can provide a sufficient trusted Veewee template we could consider adding such an OS to our ongoing continuous integration tests.

\n\n

Also, as this is a 0.x release the API is still in flux and may change. Make sure\nyou read the release notes before upgrading.

\n\n

Bugs can be reported using Github Issues:

\n\n

http://github.com/puppetlabs/puppetlabs-firewall/issues

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

For this particular module, please also read CONTRIBUTING.md before contributing.

\n\n

Currently we support:

\n\n
    \n
  • iptables
  • \n
  • ip6tables
  • \n
  • ebtables (chains only)
  • \n
\n\n

But plans are to support lots of other firewall implementations:

\n\n
    \n
  • FreeBSD (ipf)
  • \n
  • Mac OS X (ipfw)
  • \n
  • OpenBSD (pf)
  • \n
  • Cisco (ASA and basic access lists)
  • \n
\n\n

If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.

\n\n

Testing

\n\n

Make sure you have:

\n\n
    \n
  • rake
  • \n
  • bundler
  • \n
\n\n

Install the necessary gems:

\n\n
bundle install\n
\n\n

And run the tests from the root of the source code:

\n\n
rake test\n
\n\n

If you have a copy of Vagrant 1.1.0 you can also run the system tests:

\n\n
RSPEC_SET=debian-606-x64 rake spec:system\nRSPEC_SET=centos-58-x64 rake spec:system\n
\n\n

Note: system testing is fairly alpha at this point, your mileage may vary.

\n
", "changelog": "
## puppetlabs-firewall changelog\n\nRelease notes for puppetlabs-firewall module.\n\n---------------------------------------\n\n#### 0.4.2 - 2013-09-10\n\nAnother attempt to fix the packaging issue.  We think we understand exactly\nwhat is failing and this should work properly for the first time.\n\n---------------------------------------\n\n#### 0.4.1 - 2013-08-09\n\nBugfix release to fix a packaging issue that may have caused puppet module\ninstall commands to fail.\n\n---------------------------------------\n\n#### 0.4.0 - 2013-07-11\n\nThis release adds support for address type, src/dest ip ranges, and adds\nadditional testing and bugfixes.\n\n#### Features\n* Add `src_type` and `dst_type` attributes (Nick Stenning)\n* Add `src_range` and `dst_range` attributes (Lei Zhang)\n* Add SL and SLC operatingsystems as supported (Steve Traylen)\n\n#### Bugfixes\n* Fix parser for bursts other than 5 (Chris Rutter)\n* Fix parser for -f in --comment (Georg Koester)\n* Add doc headers to class files (Dan Carley)\n* Fix lint warnings/errors (Wolf Noble)\n\n---------------------------------------\n\n#### 0.3.1 - 2013/6/10\n\nThis minor release provides some bugfixes and additional tests.\n\n#### Changes\n\n* Update tests for rspec-system-puppet 2 (Ken Barber)\n* Update rspec-system tests for rspec-system-puppet 1.5 (Ken Barber)\n* Ensure all services have 'hasstatus => true' for Puppet 2.6 (Ken Barber)\n* Accept pre-existing rule with invalid name (Joe Julian)\n* Swap log_prefix and log_level order to match the way it's saved (Ken Barber)\n* Fix log test to replicate bug #182 (Ken Barber)\n* Split argments while maintaining quoted strings (Joe Julian)\n* Add more log param tests (Ken Barber)\n* Add extra tests for logging parameters (Ken Barber)\n* Clarify OS support (Ken Barber)\n\n---------------------------------------\n\n#### 0.3.0 - 2013/4/25\n\nThis release introduces support for Arch Linux and extends support for Fedora 15 and up. There are also lots of bugs fixed and improved testing to prevent regressions.\n\n##### Changes\n\n* Fix error reporting for insane hostnames (Tomas Doran)\n* Support systemd on Fedora 15 and up (Eduardo Gutierrez)\n* Move examples to docs (Ken Barber)\n* Add support for Arch Linux platform (Ingmar Steen)\n* Add match rule for fragments (Georg Koester)\n* Fix boolean rules being recognized as changed (Georg Koester)\n* Same rules now get deleted (Anastasis Andronidis)\n* Socket params test (Ken Barber)\n* Ensure parameter can disable firewall (Marc Tardif)\n\n---------------------------------------\n\n#### 0.2.1 - 2012/3/13\n\nThis maintenance release introduces the new README layout, and fixes a bug with iptables_persistent_version.\n\n##### Changes\n\n* (GH-139) Throw away STDERR from dpkg-query in Fact\n* Update README to be consistent with module documentation template\n* Fix failing spec tests due to dpkg change in iptables_persistent_version\n\n---------------------------------------\n\n#### 0.2.0 - 2012/3/3\n\nThis release introduces automatic persistence, removing the need for the previous manual dependency requirement for persistent the running rules to the OS persistence file.\n\nPreviously you would have required the following in your site.pp (or some other global location):\n\n    # Always persist firewall rules\n    exec { 'persist-firewall':\n      command     => $operatingsystem ? {\n        'debian'          => '/sbin/iptables-save > /etc/iptables/rules.v4',\n        /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables',\n      },\n      refreshonly => true,\n    }\n    Firewall {\n      notify  => Exec['persist-firewall'],\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n    Firewallchain {\n      notify  => Exec['persist-firewall'],\n    }\n    resources { "firewall":\n      purge => true\n    }\n\nYou only need:\n\n    class { 'firewall': }\n    Firewall {\n      before  => Class['my_fw::post'],\n      require => Class['my_fw::pre'],\n    }\n\nTo install pre-requisites and to create dependencies on your pre & post rules. Consult the README for more information.\n\n##### Changes\n\n* Firewall class manifests (Dan Carley)\n* Firewall and firewallchain persistence (Dan Carley)\n* (GH-134) Autorequire iptables related packages (Dan Carley)\n* Typo in #persist_iptables OS normalisation (Dan Carley)\n* Tests for #persist_iptables (Dan Carley)\n* (GH-129) Replace errant return in autoreq block (Dan Carley)\n\n---------------------------------------\n\n#### 0.1.1 - 2012/2/28\n\nThis release primarily fixes changing parameters in 3.x\n\n##### Changes\n\n* (GH-128) Change method_missing usage to define_method for 3.x compatibility\n* Update travis.yml gem specifications to actually test 2.6\n* Change source in Gemfile to use a specific URL for Ruby 2.0.0 compatibility\n\n---------------------------------------\n\n#### 0.1.0 - 2012/2/24\n\nThis release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won't fall this far behind again :-).\n\n##### Changes\n\n* Add support for MARK target and set-mark property (Johan Huysmans)\n* Fix broken call to super for ruby-1.9.2 in munge (Ken Barber)\n* simple fix of the error message for allowed values of the jump property (Daniel Black)\n* Adding OSPF(v3) protocol to puppetlabs-firewall (Arnoud Vermeer)\n* Display multi-value: port, sport, dport and state command seperated (Daniel Black)\n* Require jump=>LOG for log params (Daniel Black)\n* Reject and document icmp => "any" (Dan Carley)\n* add firewallchain type and iptables_chain provider (Daniel Black)\n* Various fixes for firewallchain resource (Ken Barber)\n* Modify firewallchain name to be chain:table:protocol (Ken Barber)\n* Fix allvalidchain iteration (Ken Barber)\n* Firewall autorequire Firewallchains (Dan Carley)\n* Tests and docstring for chain autorequire (Dan Carley)\n* Fix README so setup instructions actually work (Ken Barber)\n* Support vlan interfaces (interface containing ".") (Johan Huysmans)\n* Add tests for VLAN support for iniface/outiface (Ken Barber)\n* Add the table when deleting rules (Johan Huysmans)\n* Fix tests since we are now prefixing -t)\n* Changed 'jump' to 'action', commands to lower case (Jason Short)\n* Support interface names containing "+" (Simon Deziel)\n* Fix for when iptables-save spews out "FATAL" errors (Sharif Nassar)\n* Fix for incorrect limit command arguments for ip6tables provider (Michael Hsu)\n* Document Util::Firewall.host_to_ip (Dan Carley)\n* Nullify addresses with zero prefixlen (Dan Carley)\n* Add support for --tcp-flags (Thomas Vander Stichele)\n* Make tcp_flags support a feature (Ken Barber)\n* OUTPUT is a valid chain for the mangle table (Adam Gibbins)\n* Enable travis-ci support (Ken Barber)\n* Convert an existing test to CIDR (Dan Carley)\n* Normalise iptables-save to CIDR (Dan Carley)\n* be clearer about what distributions we support (Ken Barber)\n* add gre protocol to list of acceptable protocols (Jason Hancock)\n* Added pkttype property (Ashley Penney)\n* Fix mark to not repeat rules with iptables 1.4.1+ (Sharif Nassar)\n* Stub iptables_version for now so tests run on non-Linux hosts (Ken Barber)\n* Stub iptables facts for set_mark tests (Dan Carley)\n* Update formatting of README to meet Puppet Labs best practices (Will Hopper)\n* Support for ICMP6 type code resolutions (Dan Carley)\n* Insert order hash included chains from different tables (Ken Barber)\n* rspec 2.11 compatibility (Jonathan Boyett)\n* Add missing class declaration in README (sfozz)\n* array_matching is contraindicated (Sharif Nassar)\n* Convert port Fixnum into strings (Sharif Nassar)\n* Update test framework to the modern age (Ken Barber)\n* working with ip6tables support (wuwx)\n* Remove gemfile.lock and add to gitignore (William Van Hevelingen)\n* Update travis and gemfile to be like stdlib travis files (William Van Hevelingen)\n* Add support for -m socket option (Ken Barber)\n* Add support for single --sport and --dport parsing (Ken Barber)\n* Fix tests for Ruby 1.9.3 from 3e13bf3 (Dan Carley)\n* Mock Resolv.getaddress in #host_to_ip (Dan Carley)\n* Update docs for source and dest - they are not arrays (Ken Barber)\n\n---------------------------------------\n\n#### 0.0.4 - 2011/12/05\n\nThis release adds two new parameters, 'uid' and 'gid'. As a part of the owner module, these params allow you to specify a uid, username, gid, or group got a match:\n\n    firewall { '497 match uid':\n      port => '123',\n      proto => 'mangle',\n      chain => 'OUTPUT',\n      action => 'drop'\n      uid => '123'\n    }\n\nThis release also adds value munging for the 'log_level', 'source', and 'destination' parameters. The 'source' and 'destination' now support hostnames:\n\n    firewall { '498 accept from puppetlabs.com':\n      port => '123',\n      proto => 'tcp',\n      source => 'puppetlabs.com',\n      action => 'accept'\n    }\n\n\nThe 'log_level' parameter now supports using log level names, such as 'warn', 'debug', and 'panic':\n\n    firewall { '499 logging':\n      port => '123',\n      proto => 'udp',\n      log_level => 'debug',\n      action => 'drop'\n    }\n\nAdditional changes include iptables and ip6tables version facts, general whitespace cleanup, and adding additional unit tests.\n\n##### Changes\n\n* (#10957) add iptables_version and ip6tables_version facts\n* (#11093) Improve log_level property so it converts names to numbers\n* (#10723) Munge hostnames and IPs to IPs with CIDR\n* (#10718) Add owner-match support\n* (#10997) Add fixtures for ipencap\n* (#11034) Whitespace cleanup\n* (#10690) add port property support to ip6tables\n\n---------------------------------------\n\n#### 0.0.3 - 2011/11/12\n\nThis release introduces a new parameter 'port' which allows you to set both\nsource and destination ports for a match:\n\n    firewall { "500 allow NTP requests":\n      port => "123",\n      proto => "udp",\n      action => "accept",\n    }\n\nWe also have the limit parameter finally working:\n\n    firewall { "500 limit HTTP requests":\n      dport => 80,\n      proto => tcp,\n      limit => "60/sec",\n      burst => 30,\n      action => accept,\n    }\n\nState ordering has been fixed now, and more characters are allowed in the\nnamevar:\n\n* Alphabetical\n* Numbers\n* Punctuation\n* Whitespace\n\n##### Changes\n\n* (#10693) Ensure -m limit is added for iptables when using 'limit' param\n* (#10690) Create new port property\n* (#10700) allow additional characters in comment string\n* (#9082) Sort iptables --state option values internally to keep it consistent across runs\n* (#10324) Remove extraneous whitespace from iptables rule line in spec tests\n\n---------------------------------------\n\n#### 0.0.2 - 2011/10/26\n\nThis is largely a maintanence and cleanup release, but includes the ability to\nspecify ranges of ports in the sport/dport parameter:\n\n    firewall { "500 allow port range":\n      dport => ["3000-3030","5000-5050"],\n      sport => ["1024-65535"],\n      action => "accept",\n    }\n\n##### Changes\n\n* (#10295) Work around bug #4248 whereby the puppet/util paths are not being loaded correctly on the primary Puppet server\n* (#10002) Change to dport and sport to handle ranges, and fix handling of name to name to port\n* (#10263) Fix tests on Puppet 2.6.x\n* (#10163) Cleanup some of the inline documentation and README file to align with general forge usage\n\n---------------------------------------\n\n#### 0.0.1 - 2011/10/18\n\nInitial release.\n\n##### Changes\n\n* (#9362) Create action property and perform transformation for accept, drop, reject value for iptables jump parameter\n* (#10088) Provide a customised version of CONTRIBUTING.md\n* (#10026) Re-arrange provider and type spec files to align with Puppet\n* (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default\n* (#9439) fix parsing and deleting existing rules\n* (#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider\n* (#9576) Stub provider so it works properly outside of Linux\n* (#9576) Align spec framework with Puppet core\n* and lots of other earlier development tasks ...\n
", "license": "
Puppet Firewall Module - Puppet module for managing Firewalls\n\nCopyright (C) 2011-2013 Puppet Labs, Inc.\nCopyright (C) 2011 Jonathan Boyett\nCopyright (C) 2011 Media Temple, Inc.\n\nSome of the iptables code was taken from puppet-iptables which was:\n\nCopyright (C) 2011 Bob.sh Limited\nCopyright (C) 2008 Camptocamp Association\nCopyright (C) 2007 Dmitri Priimak\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-09-10 13:27:07 -0700", "updated_at": "2013-09-10 13:27:07 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-firewall-0.4.2", "version": "0.4.2" }, { "uri": "/v3/releases/puppetlabs-firewall-0.4.1", "version": "0.4.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.3.1", "version": "0.3.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-firewall-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-firewall-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-firewall", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "downloads": 81387, "created_at": "2010-05-20 22:43:19 -0700", "updated_at": "2014-01-06 14:42:07 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.10.0", "metadata": { "name": "puppetlabs-apache", "version": "0.10.0", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`, `apache2ctl`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs\n\nRequired binaries: `apachectl`. Default for `osfamily` == `redhat`." } ] } ], "checksums": { "CHANGELOG.md": "2ed7b976e9c4542fd1626006cb44783b", "CONTRIBUTING.md": "5520c75162725951733fa7d88e57f31f", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "13733647826ec5cff955b593fd9a9c5c", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "560b5e9d2b04ddbc23f3803645bfbda5", "README.md": "c937c2d34a76185fe8cfc61d671c47ec", "README.passenger.md": "0316c4a152fd51867ece8ea403250fcb", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/confd/no_accf.pp": "c44b75749a3a56c0306433868d6b762c", "manifests/default_confd_files.pp": "7cbc2f15bfd34eb2f5160c671775c0f6", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/default_mods.pp": "ea267ac599fc3d76db6298c3710cee60", "manifests/dev.pp": "639ba24711be5d7cea0c792e05008c86", "manifests/init.pp": "ffc69874d88f7ac581138fbf47d04d04", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod/alias.pp": "3c144a2aa8231de61e68eced58dc9287", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/authnz_ldap.pp": "10c795251b2327614ef0b433591ed128", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "d218c11d4798453d6075f8f1553c94de", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "a166fc9b780abea2eec1ab723ce3a773", "manifests/mod/dav_svn.pp": "641911969d921123865e6566954c0edb", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "f19193d4f119224e19713e0c96a0de6d", "manifests/mod/event.pp": "e48aefd215dd61980f0b9c4d16ef094a", "manifests/mod/expires.pp": "a9b7537846258af84f12b8ce3510dfa8", "manifests/mod/fastcgi.pp": "fec8afea5424f25109a0b7ca912b16b1", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "7c32234950dc74354b06a2da15197179", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "0fa7835f270e511616927afe01a0526c", "manifests/mod/mime_magic.pp": "fe249dd7e1faa5ec5dd936877c64e856", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/nss.pp": "f7a7efaac854599aa7b872665eb5d93c", "manifests/mod/passenger.pp": "e6c48c22a69933b0975609f2bacf2b5d", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/peruser.pp": "3a2eaab65d7be2373740302eac33e5b1", "manifests/mod/php.pp": "a3725f487f58eb354c84a4fee704daa9", "manifests/mod/prefork.pp": "84b64cb7b46ab0c544dfecb476d65e3d", "manifests/mod/proxy.pp": "eb1e8895edee5e97edc789923fc128c8", "manifests/mod/proxy_ajp.pp": "f9b72f1339cc03f068fa684f38793120", "manifests/mod/proxy_balancer.pp": "5ab6987614f8a1afde3a8b701fbbe22a", "manifests/mod/proxy_html.pp": "1a96fd029a305eb88639bf5baf06abdd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/rpaf.pp": "1125f0c5296ca584fa71de474c95475f", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "c8ab5728fda7814dace9a8eebf13476c", "manifests/mod/status.pp": "d7366470082970ac62984581a0ea3fd7", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "b1809ac41b322b090be410d41e57157e", "manifests/mod/wsgi.pp": "a0073502c2267d7e72caaf9f4942ab7c", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/mod.pp": "2d4ab8907db92e50c5ed6e1357fed9fb", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/package.pp": "c32ba42fe3ab4acc49d2e28258108ba1", "manifests/params.pp": "221fa0dcbdd00066e074bc443c0d8fdb", "manifests/peruser/multiplexer.pp": "712017c1d1cee710cd7392a4c4821044", "manifests/peruser/processor.pp": "293fcb9d2e7ae98b36f544953e33074e", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "56e90e48165989a7df3360dc55b01360", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost/custom.pp": "58bd40d3d12d01549545b85667855d38", "manifests/vhost.pp": "41c68c9ef48c3ef9d1c4feb167d71dd2", "spec/classes/apache_spec.rb": "70ebba6cbb794fe0239b0e353796bae9", "spec/classes/dev_spec.rb": "051fcee20c1b04a7d52481c4a23682b3", "spec/classes/mod/auth_kerb_spec.rb": "229c730ac88b05c4ea4e64d395f26f27", "spec/classes/mod/authnz_ldap_spec.rb": "19cef4733927bc3548af8c75a66a8b11", "spec/classes/mod/dav_svn_spec.rb": "b41e721c0b5c7bac1295187f89d27ab7", "spec/classes/mod/dev_spec.rb": "81d37ad0a51e6cae22e79009e719d648", "spec/classes/mod/dir_spec.rb": "a8d473ce36e0aaec0f9f3463cd4bb549", "spec/classes/mod/event_spec.rb": "cce445ab0a7140bdb50897c6f692ec17", "spec/classes/mod/fastcgi_spec.rb": "ff35691208f95aee61150682728c2891", "spec/classes/mod/fcgid_spec.rb": "ca3ee773bdf9ac82e63edee4411d0281", "spec/classes/mod/info_spec.rb": "90f35932812cc86058b6ccfd48eba6e8", "spec/classes/mod/itk_spec.rb": "261aa7759e232f07d70b102f0e8ab828", "spec/classes/mod/mime_magic_spec.rb": "a3748b9bd66514b56aa29a377a233606", "spec/classes/mod/passenger_spec.rb": "ece983e4b228f99f670a5f98878f964b", "spec/classes/mod/perl_spec.rb": "123e73d8de752e83336bed265a354c08", "spec/classes/mod/peruser_spec.rb": "72d00a427208a3bc0dda5578d36e7b0e", "spec/classes/mod/php_spec.rb": "3907e0075049b0d3cdadb17445acae2d", "spec/classes/mod/prefork_spec.rb": "537882d6f314a17c3ead6f51a67b20b8", "spec/classes/mod/proxy_html_spec.rb": "3587873d56172c431f93a78845b7d24e", "spec/classes/mod/python_spec.rb": "9011cd2ac1d452daec091e5cf337dbe7", "spec/classes/mod/rpaf_spec.rb": "b419712d8e6acbe00f5c4034161e40af", "spec/classes/mod/ssl_spec.rb": "969111556de99092152735764194d267", "spec/classes/mod/status_spec.rb": "a1f70673810840e591ac25a1803c39d7", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "cf005d3606362360f7fcccce04e53be6", "spec/classes/mod/wsgi_spec.rb": "37ad1d623b1455e237a75405776d58d9", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "d522ae1652cc87a4b9c6e33034ee5774", "spec/defines/mod_spec.rb": "80d167b475191b63713087462e960a44", "spec/defines/vhost_spec.rb": "89905755a72b938e99f4a01ef64203e9", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "6f29d603a809ae6208243911c0b250e4", "spec/system/default_mods_spec.rb": "fff758602ee95ee67cad2abc71bc54fb", "spec/system/itk_spec.rb": "c645ac3b306da4d3733c33f662959e36", "spec/system/mod_php_spec.rb": "b823cdcfe4288359a3d2dfd70868691d", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "a6f1b3fb3024a0dce75e45a7c2d6cfd0", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "86e147833f1acebf2b08451f02919581", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0", "templates/httpd.conf.erb": "6e768a748deb4737a8faf82ea80196c1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "e65c27aafd88c825ab35b34dd04221ea", "templates/mod/authnz_ldap.conf.erb": "12c9a1482694ddad3143e5eef03fb531", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/event.conf.erb": "dc4223dfb2729e54d4a33cdec03bd518", "templates/mod/fastcgi.conf.erb": "8692d14c4462335c845eede011f6db2f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "8f953519790a5900369fb656054cae35", "templates/mod/mime_magic.conf.erb": "f910e66299cba6ead5f0444e522a0c76", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/nss.conf.erb": "9a9667d308f0783448ca2689b9fc2b93", "templates/mod/passenger.conf.erb": "68a350cf4cf037c2ae64f015cc7a61a3", "templates/mod/peruser.conf.erb": "ac1c2bf2a771ed366f688ec337d6da02", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "38668e1cb5a19d7708e9d26f99e21264", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "907dc25931c6bdb7ce4b61a81be788f8", "templates/mod/status.conf.erb": "afb05015a8337b232127199aa085a023", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "125949c9120aee15303ad755e105d852", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost/_aliases.erb": "e5e3ba8a9ce994334644bd19ad342d8b", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "eca2a0abc3a23d1e08b1132baeade372", "templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2", "templates/vhost/_fastcgi.erb": "e0a1702445e9be189dabe04b829acd7f", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "1f9cc42aaafb80a658294fc39cf61395", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "9c714277eaad73d05d073c1b6c62106a", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "e9fca0c12325af10797b80d827dfddee", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "templates/vhost.conf.erb": "5dc0337da18ff36184df07343982dc93", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mod_load_params.pp": "5981af4d625a906fce1cedeb3f70cb90", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "60e7939034d531dd6b95af35338bcbe7", "tests/vhost.pp": "164bec943d7d5eee1ad6d6c41fe7c28e", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.10.0.tar.gz", "file_size": 85004, "file_md5": "4036f35903264c9b6e3289455cfee225", "downloads": 6389, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
  • /etc/make.conf on FreeBSD
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods        => false,\n      default_confd_files => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with IP address different than '*'

\n\n
    apache::vhost { 'subdomain.example.com':\n      ip      => '127.0.0.1',\n      port    => '80',\n      docrout => '/var/www/subdomain',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n      directories         => { path => '/home/appuser/myphpapp',\n        'suphp'           => { user => 'myappuser', group => 'myappgroup' },\n      }\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

Starting 2.2.16, httpd supports FallbackResource which is a simple replace for common RewriteRules:

\n\n
    apache::vhost { 'wordpress.example.com':\n      port                => '80',\n      docroot             => '/var/www/wordpress',\n      fallbackresource    => '/index.php',\n    }\n
\n\n

Please note that the disabled argument to FallbackResource is only supported since 2.2.24.

\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_confd_files
\n\n

Generates default set of include-able apache configuration files under ${apache::confd_dir} directory. These configuration files correspond to what is usually installed with apache package on given platform.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian, /usr/local/etc/apache22/server.crt for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian, /usr/local/etc/apache22/server.key for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_name
\n\n

Name of apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted. Defaults to 'true'.

\n\n
service_ensure
\n\n

Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.

\n\n
purge_configs
\n\n

Removes all other apache configs and vhosts, which is automatically set to true. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise managed configuration. It is recommended that you move your configuration entirely to resources within this module.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat, /etc/apache2 on Debian and /usr/local on FreeBSD.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat and /etc/apache2 on Debian.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork or apache::mod::worker classes with parameters. All possible values are event, itk, peruser, prefork, worker (valid values depend on agent's OS), or the boolean false. Defaults to prefork on RedHat and FreeBSD and worker on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing $mpm_module one has to deinstall all packages that depend on currently installed apache.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
log_level
\n\n

Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are emerg, alert, crit, error, warn, notice, info or debug.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n
server_tokens
\n\n

Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'.

\n\n
server_signature
\n\n

Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'.

\n\n
trace_enable
\n\n

Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for 'TraceEnable'. Defaults to 'On'.

\n\n
manage_user
\n\n

Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.

\n\n
manage_group
\n\n

Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.

\n\n
package_ensure
\n\n

Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • dav_svn
  • \n
  • deflate
  • \n
  • dev
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • event
  • \n
  • fastcgi
  • \n
  • fcgid
  • \n
  • headers
  • \n
  • info
  • \n
  • itk
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic*
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • nss*
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • peruser
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_ajp
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • rewrite
  • \n
  • rpaf*
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status*
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • vhost_alias
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template. These are the defaults:

\n\n
    class { 'apache::mod::ssl':\n      ssl_compression => false,\n      ssl_options     => [ 'StdEnvVars' ],\n  }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n      wsgi_python_path   => '/path/to/virtenv/site-packages',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias or AliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [\n  { aliasmatch => '^/image/(.*)\\.jpg$', path => '/files/jpg.images/$1.jpg' }\n  { alias      => '/image',             path => '/ftp/pub/image' },\n],\n
\n\n

For Alias and AliasMatch to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block. The Alias and AliasMatch directives are created in the order specified in the aliases paramter. As described in the mod_alias documentation more specific Alias or AliasMatch directives should come before the more general ones to avoid shadowing.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. An optional provider defaults to directory. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

provider can be set to any of directory, files, or location. If the pathspec starts with a ~, httpd will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch, respectively.

\n\n
    apache::vhost { 'files.example.net':\n      docroot     => '/var/www/files',\n      directories => [\n        { path => '~ (\\.swp|\\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },\n      ],\n    }\n
\n\n

The directives will be embedded within the Directory (Files, or Location) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this directory. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      directories => [ { path => '/srv/www'\n        error_documents => [\n          { 'error_code' => '503', 'document' => '/service-unavail' },\n        ],\n      }]\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
index_options
\n\n

Styles the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],\n    }\n
\n\n
index_order_default
\n\n

Sets the order of the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
ssl_options
\n\n

String or list of SSLOptions for the given <Directory> block. This overrides, or refines the SSLOptions of the parent block (either vhost, or server).

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', ssl_options => '+ExportCertData' }\n        { path => '/path/to/different/dir', ssl_options => [ '-StdEnvVars', '+ExportCertData'] },\n      ],\n    }\n
\n\n
suphp
\n\n

An array containing two values: User and group for the suPHP_UserGroup setting.\nThis directive must be used with suphp_engine => on in the vhost declaration. This directive only works in <Directory> or <Location>.

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', suphp => { user =>  'myappuser', group => 'myappgroup' }\n      ],\n    }\n
\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
directoryindex
\n\n

Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this vhost. Defaults to []. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      error_documents => [\n        { 'error_code' => '503', 'document' => '/service-unavail' },\n        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },\n      ],\n    }\n
\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
fastcgi_server
\n\n

Specifies the filename as an external FastCGI application. Defaults to 'undef'.

\n\n
fastcgi_socket
\n\n

Filename used to communicate with the web server. Defaults to 'undef'.

\n\n
fastcgi_dir
\n\n

Directory to enable for FastCGI. Defaults to 'undef'.

\n\n
additional_includes
\n\n

Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
log_level
\n\n

Specifies the verbosity level of the error log. Defaults to warn for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for log_level is one of emerg, alert, crit, error, warn, notice, info or debug.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
scriptaliases
\n\n

Passes a list of hashes to the vhost to create ScriptAlias or ScriptAliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
    scriptaliases => [\n      {\n        alias => '/myscript',\n        path  => '/usr/share/myscript',\n      },\n      {\n        aliasmatch => '^/foo(.*)',\n        path       => '/usr/share/fooscripts$1',\n      },\n      {\n        aliasmatch => '^/bar/(.*)',\n        path       => '/usr/share/bar/wrapper.sh/$1',\n      },\n      {\n        alias => '/neatscript',\n        path  => '/usr/share/neatscript',\n      },\n    ]\n
\n\n

These directives are created in the order specified. As with Alias and AliasMatch directives the more specific aliases should come before the more general ones to avoid shadowing.

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_protocol
\n\n

Specifies the SSL Protocol (SSLProtocol).

\n\n
ssl_cipher
\n\n

Specifies the SSLCipherSuite.

\n\n
ssl_honorcipherorder
\n\n

Sets SSLHonorCipherOrder directive, used to prefer the server's cipher preference order

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs on Debian and /etc/pki/tls/certs on RedHat.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
ssl_verify_client
\n\n

Sets SSLVerifyClient directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_client => 'optional',\n    }\n
\n\n
ssl_verify_depth
\n\n

Sets SSLVerifyDepth directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_depth => 1,\n    }\n
\n\n
ssl_options
\n\n

Sets SSLOptions directives as per the Apache Core documentation. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => '+ExportCertData',\n    }\n
\n\n

An array of strings example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => [ '+StrictRequire', '+ExportCertData' ],\n    }\n
\n\n
ssl_proxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

On FreeBSD you're required to define apache::package or apache class before apache::dev.

\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "

2013-12-05 Release 0.10.0

\n\n

Summary:

\n\n

This release adds FreeBSD osfamily support and various other improvements to some mods.

\n\n

Features:

\n\n
    \n
  • Add suPHP_UserGroup directive to directory context
  • \n
  • Add support for ScriptAliasMatch directives
  • \n
  • Set SSLOptions StdEnvVars in server context
  • \n
  • No implicit entry for ScriptAlias path
  • \n
  • Add support for overriding ErrorDocument
  • \n
  • Add support for AliasMatch directives
  • \n
  • Disable default "allow from all" in vhost-directories
  • \n
  • Add WSGIPythonPath as an optional parameter to mod_wsgi.
  • \n
  • Add mod_rpaf support
  • \n
  • Add directives: IndexOptions, IndexOrderDefault
  • \n
  • Add ability to include additional external configurations in vhost
  • \n
  • need to use the provider variable not the provider key value from the directory hash for matches
  • \n
  • Support for FreeBSD and few other features
  • \n
  • Add new params to apache::mod::mime class
  • \n
  • Allow apache::mod to specify module id and path
  • \n
  • added $server_root parameter
  • \n
  • Add Allow and ExtendedStatus support to mod_status
  • \n
  • Expand vhost/_directories.pp directive support
  • \n
  • Add initial support for nss module (no directives in vhost template yet)
  • \n
  • added peruser and event mpms
  • \n
  • added $service_name parameter
  • \n
  • add parameter for TraceEnable
  • \n
  • Make LogLevel configurable for server and vhost
  • \n
  • Add documentation about $ip
  • \n
  • Add ability to pass ip (instead of wildcard) in default vhost files
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Don't listen on port or set NameVirtualHost for non-existent vhost
  • \n
  • only apply Directory defaults when provider is a directory
  • \n
  • Working mod_authnz_ldap support on Debian/Ubuntu
  • \n
\n\n

2013-09-06 Release 0.9.0

\n\n

Summary:

\n\n

This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.

\n\n

Backwards-incompatible Changes:

\n\n
    \n
  • Remove many default mods that are not normally needed.
  • \n
  • Remove rewrite_base apache::vhost parameter; did not work anyway.
  • \n
  • Specify dependencies on stdlib >=2.4.0 (this was already the case, but\nmaking explicit)
  • \n
  • Deprecate a2mod in favor of the apache::mod::* classes and apache::mod\ndefined resource.
  • \n
\n\n

Features:

\n\n
    \n
  • apache class\n\n
      \n
    • Add httpd_dir parameter to change the location of the configuration\nfiles.
    • \n
    • Add logroot parameter to change the logroot
    • \n
    • Add ports_file parameter to changes the ports.conf file location
    • \n
    • Add keepalive parameter to enable persistent connections
    • \n
    • Add keepalive_timeout parameter to change the timeout
    • \n
    • Update default_mods to be able to take an array of mods to enable.
    • \n
  • \n
  • apache::vhost\n\n
      \n
    • Add wsgi_daemon_process, wsgi_daemon_process_options,\nwsgi_process_group, and wsgi_script_aliases parameters for per-vhost\nWSGI configuration.
    • \n
    • Add access_log_syslog parameter to enable syslogging.
    • \n
    • Add error_log_syslog parameter to enable syslogging of errors.
    • \n
    • Add directories hash parameter. Please see README for documentation.
    • \n
    • Add sslproxyengine parameter to enable SSLProxyEngine
    • \n
    • Add suphp_addhandler, suphp_engine, and suphp_configpath for\nconfiguring SuPHP.
    • \n
    • Add custom_fragment parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)
    • \n
  • \n
  • Add apache::mod::suphp class for configuring SuPHP.
  • \n
  • Add apache::mod::itk class for configuring ITK mpm module.
  • \n
  • Update apache::mod::wsgi class for global WSGI configuration with\nwsgi_socket_prefix and wsgi_python_home parameters.
  • \n
  • Add README.passenger.md to document the apache::mod::passenger usage.\nAdded passenger_high_performance, passenger_pool_idle_time,\npassenger_max_requests, passenger_stat_throttle_rate, rack_autodetect,\nand rails_autodetect parameters.
  • \n
  • Separate the httpd service resource into a new apache::service class for\ndependency chaining of Class['apache'] -> <resource> ~>\nClass['apache::service']
  • \n
  • Added apache::mod::proxy_balancer class for apache::balancer
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Change dependency to puppetlabs-concat
  • \n
  • Fix ruby 1.9 bug for a2mod
  • \n
  • Change servername to be $::hostname if there is no $::fqdn
  • \n
  • Make /etc/ssl/certs the default ssl certs directory for RedHat non-5.
  • \n
  • Make php the default php package for RedHat non-5.
  • \n
  • Made aliases able to take a single alias hash instead of requiring an\narray.
  • \n
\n\n

2013-07-26 Release 0.8.1

\n\n

Bugfixes:

\n\n
    \n
  • Update apache::mpm_module detection for worker/prefork
  • \n
  • Update apache::mod::cgi and apache::mod::cgid detection for\nworker/prefork
  • \n
\n\n

2013-07-16 Release 0.8.0

\n\n

Features:

\n\n
    \n
  • Add servername parameter to apache class
  • \n
  • Add proxy_set parameter to apache::balancer define
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix ordering for multiple apache::balancer clusters
  • \n
  • Fix symlinking for sites-available on Debian-based OSs
  • \n
  • Fix dependency ordering for recursive confdir management
  • \n
  • Fix apache::mod::* to notify the service on config change
  • \n
  • Documentation updates
  • \n
\n\n

2013-07-09 Release 0.7.0

\n\n

Changes:

\n\n
    \n
  • Essentially rewrite the module -- too many to list
  • \n
  • apache::vhost has many abilities -- see README.md for details
  • \n
  • apache::mod::* classes provide httpd mod-loading capabilities
  • \n
  • apache base class is much more configurable
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Many. And many more to come
  • \n
\n\n

2013-03-2 Release 0.6.0

\n\n
    \n
  • update travis tests (add more supported versions)
  • \n
  • add access log_parameter
  • \n
  • make purging of vhost dir configurable
  • \n
\n\n

2012-08-24 Release 0.4.0

\n\n

Changes:

\n\n
    \n
  • include apache is now required when using apache::mod::*
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix syntax for validate_re
  • \n
  • Fix formatting in vhost template
  • \n
  • Fix spec tests such that they pass

    \n\n

    2012-05-08 Puppet Labs info@puppetlabs.com - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache

  • \n
\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-05 15:29:14 -0800", "updated_at": "2013-12-05 15:29:14 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "version": "0.10.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.5.0-rc1", "version": "0.5.0-rc1" }, { "uri": "/v3/releases/puppetlabs-apache-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.2", "version": "0.2.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apache", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/ripienaar-concat", "name": "concat", "downloads": 79109, "created_at": "2010-05-24 15:44:51 -0700", "updated_at": "2014-01-06 14:40:28 -0800", "owner": { "uri": "/v3/users/ripienaar", "username": "ripienaar", "gravatar_id": "9482a1c5a9c64c5d7296971f030165b7" }, "current_release": { "uri": "/v3/releases/ripienaar-concat-0.2.0", "module": { "uri": "/v3/modules/ripienaar-concat", "name": "concat", "owner": { "uri": "/v3/users/ripienaar", "username": "ripienaar", "gravatar_id": "9482a1c5a9c64c5d7296971f030165b7" } }, "version": "0.2.0", "metadata": { "license": "Apache", "dependencies": [ ], "source": "git://github.com/ripienaar/puppet-concat.git", "version": "0.2.0", "description": "Concat module", "summary": "Concat module", "types": [ ], "author": "R.I.Pienaar", "project_page": "http://github.com/ripienaar/puppet-concat", "name": "ripienaar-concat", "checksums": { "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "files/concatfragments.sh": "256169ee61115a6b717b2844d2ea3128", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "README.markdown": "f0605b99afffca3404e3a80dad951d83", "Modulefile": "5dda7c51425f5337bb3234993a52732f", "CHANGELOG": "543eb3beeb56b779171cff6e181a44cb", "manifests/fragment.pp": "a34e1f60a31bb64eaed22745f70a88e7", "lib/facter/concat_basedir.rb": "f2e991697602ffb3e80e0cc9efa37f3a", "spec/defines/init_spec.rb": "cc8ce111b49906033dbf7837bc6b7495", "manifests/init.pp": "7128c08a525c7bbc8bf4a721ad1c4f3e", "manifests/setup.pp": "dc8d30bc47d447c5bde2c390fd34541c", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "LICENSE": "f5a76685d453424cd63dde1535811cf0" } }, "tags": [ "fileserver", "utilities" ], "file_uri": "/v3/files/ripienaar-concat-0.2.0.tar.gz", "file_size": 9602, "file_md5": "ec5888c7deee6e892b6ca1c8cb79006f", "downloads": 77976, "readme": "

What is it?

\n\n

A Puppet module that can construct files from fragments.

\n\n

Please see the comments in the various .pp files for details\nas well as posts on my blog at http://www.devco.net/

\n\n

Released under the Apache 2.0 licence

\n\n

Usage:

\n\n

If you wanted a /etc/motd file that listed all the major modules\non the machine. And that would be maintained automatically even\nif you just remove the include lines for other modules you could\nuse code like below, a sample /etc/motd would be:

\n\n
\nPuppet modules on this server:\n\n    -- Apache\n    -- MySQL\n
\n\n

Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.

\n\n
\n# class to setup basic motd, include on all nodes\nclass motd {\n   $motd = \"/etc/motd\"\n\n   concat{$motd:\n      owner => root,\n      group => root,\n      mode  => 644\n   }\n\n   concat::fragment{\"motd_header\":\n      target => $motd,\n      content => \"\\nPuppet modules on this server:\\n\\n\",\n      order   => 01,\n   }\n\n   # local users on the machine can append to motd by just creating\n   # /etc/motd.local\n   concat::fragment{\"motd_local\":\n      target => $motd,\n      ensure  => \"/etc/motd.local\",\n      order   => 15\n   }\n}\n\n# used by other modules to register themselves in the motd\ndefine motd::register($content=\"\", $order=10) {\n   if $content == \"\" {\n      $body = $name\n   } else {\n      $body = $content\n   }\n\n   concat::fragment{\"motd_fragment_$name\":\n      target  => \"/etc/motd\",\n      content => \"    -- $body\\n\"\n   }\n}\n\n# a sample apache module\nclass apache {\n   include apache::install, apache::config, apache::service\n\n   motd::register{\"Apache\": }\n}\n
\n\n

Known Issues:

\n\n
    \n
  • Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true for at least the first run.\nYou have this issue if puppet fails to run on the client and you have\na message similar to\n"err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
  • \n
\n\n

Contributors:

\n\n

Paul Elliot

\n\n
    \n
  • Provided 0.24.8 support, shell warnings and empty file creation support.
  • \n
\n\n

Chad Netzer

\n\n
    \n
  • Various patches to improve safety of file operations
  • \n
  • Symlink support
  • \n
\n\n

David Schmitt

\n\n
    \n
  • Patch to remove hard coded paths relying on OS path
  • \n
  • Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
  • \n
\n\n

Peter Meier

\n\n
    \n
  • Basedir as a fact
  • \n
  • Unprivileged user support
  • \n
\n\n

Sharif Nassar

\n\n
    \n
  • Solaris/Nexenta support
  • \n
  • Better error reporting
  • \n
\n\n

Christian G. Warden

\n\n
    \n
  • Style improvements
  • \n
\n\n

Reid Vandewiele

\n\n
    \n
  • Support non GNU systems by default
  • \n
\n\n

**Erik Dalén*

\n\n
    \n
  • Style improvements
  • \n
\n\n

Gildas Le Nadan

\n\n
    \n
  • Documentation improvements
  • \n
\n\n

Paul Belanger

\n\n
    \n
  • Testing improvements and Travis support
  • \n
\n\n

Branan Purvine-Riley

\n\n
    \n
  • Support Puppet Module Tool better
  • \n
\n\n

Dustin J. Mitchell

\n\n
    \n
  • Always include setup when using the concat define
  • \n
\n\n

Andreas Jaggi

\n\n
    \n
  • Puppet Lint support
  • \n
\n\n

Jan Vansteenkiste

\n\n
    \n
  • Configurable paths
  • \n
\n\n

Contact:

\n\n

R.I.Pienaar / rip@devco.net / @ripienaar / http://devco.net

\n
", "changelog": "
CHANGELOG:\n- 2010/02/19 - initial release\n- 2010/03/12 - add support for 0.24.8 and newer\n             - make the location of sort configurable\n             - add the ability to add shell comment based warnings to\n               top of files\n             - add the ablity to create empty files\n- 2010/04/05 - fix parsing of WARN and change code style to match rest\n               of the code\n             - Better and safer boolean handling for warn and force\n             - Don't use hard coded paths in the shell script, set PATH\n               top of the script\n             - Use file{} to copy the result and make all fragments owned\n               by root.  This means we can chnage the ownership/group of the\n               resulting file at any time.\n             - You can specify ensure => "/some/other/file" in concat::fragment\n               to include the contents of a symlink into the final file.\n- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name\n- 2010/05/22 - Improve documentation and show the use of ensure =>\n- 2010/07/14 - Add support for setting the filebucket behavior of files\n- 2010/10/04 - Make the warning message configurable\n- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011/02/03 - Make the shell script more portable and add a config option for root group\n- 2011/06/21 - Make base dir root readable only for security\n- 2011/06/23 - Set base directory using a fact instead of hardcoding it\n- 2011/06/23 - Support operating as non privileged user\n- 2011/06/23 - Support dash instead of bash or sh\n- 2011/07/11 - Better solaris support\n- 2011/12/05 - Use fully qualified variables\n- 2011/12/13 - Improve Nexenta support\n- 2012/04/11 - Do not use any GNU specific extensions in the shell script\n- 2012/03/24 - Comply to community style guides\n- 2012/05/23 - Better errors when basedir isnt set\n- 2012/05/31 - Add spec tests\n- 2012/07/11 - Include concat::setup in concat improving UX\n- 2012/08/14 - Puppet Lint improvements\n- 2012/08/30 - The target path can be different from the $name\n- 2012/08/30 - More Puppet Lint cleanup\n- 2012/09/04 - RELEASE 0.2.0\n
", "license": "
   Copyright 2012 R.I.Pienaar\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2012-09-04 11:44:59 -0700", "updated_at": "2012-09-04 11:44:59 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/ripienaar-concat-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/ripienaar-concat-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/ripienaar-concat-0.0.20100507", "version": "0.0.20100507" } ], "homepage_url": "http://github.com/ripienaar/puppet-concat", "issues_url": null }, { "uri": "/v3/modules/puppetlabs-mysql", "name": "mysql", "downloads": 70534, "created_at": "2011-12-13 22:11:06 -0800", "updated_at": "2014-01-06 14:39:08 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-mysql-2.1.0", "module": { "uri": "/v3/modules/puppetlabs-mysql", "name": "mysql", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "2.1.0", "metadata": { "name": "puppetlabs-mysql", "version": "2.1.0", "summary": "Mysql module", "author": "Puppet Labs", "description": "Mysql module", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "types": [ { "properties": [ { "name": "password_hash", "doc": "The password hash of the user. Use mysql_password() for creating such a hash." }, { "name": "max_user_connections", "doc": "Max concurrent connections for the user. 0 means no (or global) limit." } ], "parameters": [ { "name": "name", "doc": "The name of the user. This uses the 'username@hostname' or username@hostname." } ], "providers": [ { "name": "mysql", "doc": "manage users for a mysql database." } ], "name": "database_user", "doc": "Manage a database user. This includes management of users password as well as privileges" }, { "properties": [ { "name": "charset", "doc": "The CHARACTER SET setting for the database" }, { "name": "collate", "doc": "The COLLATE setting for the database" } ], "parameters": [ { "name": "name", "doc": "The name of the MySQL database to manage." } ], "providers": [ { "name": "mysql", "doc": "Manages MySQL databases." } ], "name": "mysql_database", "doc": "Manage MySQL databases." }, { "properties": [ { "name": "password_hash", "doc": "The password hash of the user. Use mysql_password() for creating such a hash." }, { "name": "max_user_connections", "doc": "Max concurrent connections for the user. 0 means no (or global) limit." }, { "name": "max_connections_per_hour", "doc": "Max connections per hour for the user. 0 means no (or global) limit." }, { "name": "max_queries_per_hour", "doc": "Max queries per hour for the user. 0 means no (or global) limit." }, { "name": "max_updates_per_hour", "doc": "Max updates per hour for the user. 0 means no (or global) limit." } ], "parameters": [ { "name": "name", "doc": "The name of the user. This uses the 'username@hostname' or username@hostname." } ], "providers": [ { "name": "mysql", "doc": "manage users for a mysql database." } ], "name": "mysql_user", "doc": "Manage a MySQL user. This includes management of users password as well as privileges." }, { "properties": [ { "name": "charset", "doc": "The characterset to use for a database" } ], "parameters": [ { "name": "name", "doc": "The name of the database." } ], "providers": [ { "name": "mysql", "doc": "Manages MySQL database." } ], "name": "database", "doc": "Manage databases." }, { "properties": [ { "name": "privileges", "doc": "The privileges the user should have. The possible values are implementation dependent." } ], "parameters": [ { "name": "name", "doc": "The primary key: either user@host for global privilges or user@host/database for database specific privileges" } ], "providers": [ { "name": "mysql", "doc": "Uses mysql as database." } ], "name": "database_grant", "doc": "Manage a database user's rights." }, { "properties": [ { "name": "privileges", "doc": "Privileges for user" }, { "name": "table", "doc": "Table to apply privileges to." }, { "name": "user", "doc": "User to operate on." }, { "name": "options", "doc": "Options to grant." } ], "parameters": [ { "name": "name", "doc": "Name to describe the grant." } ], "providers": [ { "name": "mysql", "doc": "Set grants for users in MySQL." } ], "name": "mysql_grant", "doc": "Manage a MySQL user's rights." } ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "754de171830d3a00220cdc85bcb794a0", ".forge-release/pom.xml": "c650a84961ad88de03192e23b63b3549", ".forge-release/publish": "1c1d6dd64ef52246db485eb5459aa941", ".forge-release/settings.xml": "06d768a57d582fe1ee078b563427e750", ".forge-release/validate": "7fffde8112f42a1ec986d49ba80ac219", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "35fe54be03fbc47ce9b015b22240e683", "CHANGELOG": "0955be7c90f16e48ae9749641170ca69", "Gemfile": "4d0813cea67347e0abb409f53f814155", "Gemfile.lock": "9ee04c7900f8209895e1acee1664ce7d", "LICENSE": "6089b6bd1f0d807edb8bdfd76da0b038", "Modulefile": "8faf920c294adde182c9087cf1113db3", "README.md": "9afcf56a8845ec7e06739bb74478929e", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "TODO": "88ca4024a37992b46c34cb46e4ac39e6", "files/mysqltuner.pl": "65056d1386e04fdf22a1fee556c1b9fc", "lib/puppet/parser/functions/mysql_deepmerge.rb": "6f20428e15e98f2368ee63a56412a7c3", "lib/puppet/parser/functions/mysql_password.rb": "a4c8ec72dede069508dbc266131b06a3", "lib/puppet/parser/functions/mysql_strip_hash.rb": "3efe69f1eb189b2913e178b8472aaede", "lib/puppet/provider/database/mysql.rb": "66e7506c4823bb5ea150ca3c1b62bc98", "lib/puppet/provider/database_grant/mysql.rb": "163fd7c65bc3e1371393f3d5c8d6ae10", "lib/puppet/provider/database_user/mysql.rb": "47f13b62d5bb05ae7184e50a6a38a13c", "lib/puppet/provider/mysql.rb": "e8eb4be7cead5b8627ccaea1f435c95a", "lib/puppet/provider/mysql_database/mysql.rb": "466af4dc5e7689b47a9322f4d8a9b3f2", "lib/puppet/provider/mysql_grant/mysql.rb": "f27f8cc23f74ce59a49172d8e6a0d5dc", "lib/puppet/provider/mysql_user/mysql.rb": "87aee13a24a2d01ed34e3b91b9297e40", "lib/puppet/type/database.rb": "7b4b49b841d41541ce719d1a051ee94b", "lib/puppet/type/database_grant.rb": "66fce5df0f3f4111fe37f094965f6f93", "lib/puppet/type/database_user.rb": "b2a87e3854324fb0ae407a1fbad5802a", "lib/puppet/type/mysql_database.rb": "e21a38611edc6cba5454889170bc0ebc", "lib/puppet/type/mysql_grant.rb": "9e34c78952e5fcc073f089e58ab35cf3", "lib/puppet/type/mysql_user.rb": "ddb054a5fd03689ae4325fbe003a41d3", "manifests/backup.pp": "dfa324a48d47935a8423b102458c6516", "manifests/bindings.pp": "5976e9b74a29cc3a102f49867709a08f", "manifests/bindings/java.pp": "6a581f1da1690d436ae14832af551ca2", "manifests/bindings/perl.pp": "e765d0792afacbe72cf3e65804b78fe7", "manifests/bindings/php.pp": "09017ca0adefbb8bf894393371cfad94", "manifests/bindings/python.pp": "50c22f04074695f17ea383b307d01ea3", "manifests/bindings/ruby.pp": "99f7c01e468136c8e699fcbb36d037fa", "manifests/client.pp": "ab5a3ece8f5c4cc2174532472bdc5afe", "manifests/client/install.pp": "381f70bfbaac921d631e3b115d8ae264", "manifests/db.pp": "0dd59f8d1578c25a2517d4fda862624b", "manifests/init.pp": "52ad9ac01674695edaf62cc1c48ef4f8", "manifests/params.pp": "033b2e0f88f15b2d8aab3b08ed470abd", "manifests/server.pp": "1bafcd02849a12efaa2271e55380393b", "manifests/server/account_security.pp": "c793a434142ddaa6a529ed59739368fb", "manifests/server/backup.pp": "ff6239ff4e2c46f42ec9b34a805c6718", "manifests/server/config.pp": "dcc92deb6e2e100bf150016a8fb2a42d", "manifests/server/install.pp": "8666481a3ea12e9f76c47dfa558c09e6", "manifests/server/monitor.pp": "a63731018c171de9e441009d453dcac8", "manifests/server/mysqltuner.pp": "4b19b075ecb7a7054cac237e5f50ed16", "manifests/server/providers.pp": "87a019dce5bbb6b18c9aa61b5f99134c", "manifests/server/root_password.pp": "73738c1b6ee42b896db5356575c95af6", "manifests/server/service.pp": "e79e2206b06d41956fb6d87fc1d20aa0", "spec/classes/mysql_bindings_spec.rb": "cfc90d020af62a2315129c84f6acc7d9", "spec/classes/mysql_client_spec.rb": "1849bea122f7282153cbc46ca04aa851", "spec/classes/mysql_server_account_security_spec.rb": "e223281077baa230fb6b7387f56af6d8", "spec/classes/mysql_server_backup_spec.rb": "4c7e64b955bf1df76aead3bf93c2ae1c", "spec/classes/mysql_server_monitor_spec.rb": "2bf20049616769424afd4a5137e25511", "spec/classes/mysql_server_mysqltuner_spec.rb": "7a098808c21e3f08cd26237a96acc878", "spec/classes/mysql_server_spec.rb": "bc2dccc7ea00340a048ac91d602c1ac0", "spec/defines/mysql_db_spec.rb": "26b348846df5013819c7c9f18090ffc4", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "92fefec2bd21423ec2aece165375678b", "spec/spec_helper_system.rb": "30ef76d722878ce9049203e753663335", "spec/system/mysql_account_delete_spec.rb": "ff8d45ad704f7e3c5fdcae7a4be2ea6e", "spec/system/mysql_backup_spec.rb": "e30ef8f335f216afa489077643f57c98", "spec/system/mysql_bindings_spec.rb": "1e8cb8b2eb50ee3a7f663d6bc979ae2d", "spec/system/mysql_db_spec.rb": "798771e3185a52fdc29513bf4eb33d15", "spec/system/mysql_server_monitor_spec.rb": "5f282becde15a434aee3f56c99e61ca2", "spec/system/mysql_server_root_password_spec.rb": "3e8fd20f19e0803dcd20cdac5f0179c8", "spec/system/mysql_server_spec.rb": "f3039e1e7737712ca45d7e14e2cad28f", "spec/system/types/mysql_grant_spec.rb": "7224f1d7d44e63a5d3a44b43cc38be5d", "spec/system/types/mysql_user_spec.rb": "63f1d4c5136291b3cfba33a07e8bb37d", "spec/unit/mysql_password_spec.rb": "7e1f9c635cb9dd4143054e096515006b", "spec/unit/puppet/functions/mysql_deepmerge_spec.rb": "6b33280aa390e1e7788168df65499fd5", "spec/unit/puppet/provider/database/mysql_spec.rb": "3bb92bdaaddfd54e7700012b2418f1ba", "spec/unit/puppet/provider/database_grant/mysql_spec.rb": "261c22e57374b6651b87fcac86c9b563", "spec/unit/puppet/provider/database_user/mysql_spec.rb": "50709cf2cf3f852a56de1856222b9b1f", "spec/unit/puppet/provider/mysql_database/mysql_spec.rb": "86bfe78acaefd34ed195742e9aff5896", "spec/unit/puppet/provider/mysql_user/mysql_spec.rb": "d59edf286efa51990d0db1c0307e91ea", "spec/unit/puppet/type/mysql_database_spec.rb": "0b32abc822e7613bdbb46f0a35c5b999", "spec/unit/puppet/type/mysql_user_spec.rb": "1a20ac660f54f9976bb5a0c03c339efc", "templates/my.cnf.erb": "0cb43aad4d2c5903cad87bffa3569348", "templates/my.cnf.pass.erb": "30b24a3f29fcc644bd3a73929305cda0", "templates/my.conf.cnf.erb": "5ebda0d5d774b2a51c25c43fbfed544a", "templates/mysqlbackup.sh.erb": "b5ca36fac16da99ec88344addd03b997", "tests/backup.pp": "caae4da564c1f663341bbe50915a5f7d", "tests/bindings.pp": "dda8795d67098b66aa65e81ccc48ed73", "tests/init.pp": "6b34827ac4731829c8a117f0b3fb8167", "tests/java.pp": "0ad9de4f9f2c049642bcf08124757085", "tests/mysql_database.pp": "2a85cd95a9952e3d93aa05f8f236551e", "tests/mysql_grant.pp": "cd42336a6c7b2d27f5d5d6d0e310ee1a", "tests/mysql_user.pp": "7aa29740f3b6cd8a7041d59af2d595cc", "tests/perl.pp": "6e496f19eaae83c90ce8b93236d44bca", "tests/python.pp": "b093828acfed9c14e25ebdd60d90c282", "tests/ruby.pp": "6c5071fcaf731995c9b8e31e00eaffa0", "tests/server.pp": "72e22552a95b9a5e4a349dbfc13639dc", "tests/server/account_security.pp": "47f79d7ae9eac2bf2134db27abf1db37", "tests/server/config.pp": "619b4220138a12c6cb5f10af9867d8a1" }, "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", "license": "Apache 2.0" }, "tags": [ "mysql", "database", "percona", "mariadb", "centos", "rhel", "ubuntu", "debian", "mysql_grant", "mysql_user", "mysql_database", "providers" ], "file_uri": "/v3/files/puppetlabs-mysql-2.1.0.tar.gz", "file_size": 59365, "file_md5": "e5ebf6b7e92cac28feb381f601ac9422", "downloads": 9105, "readme": "

MySQL

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with mysql\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

The MySQL module installs, configures, and manages the MySQL service.

\n\n

Module Description

\n\n

The MySQL module manages both the installation and configuration of MySQL as\nwell as extends Pupppet to allow management of MySQL resources, such as\ndatabases, users, and grants.

\n\n

Backwards Compatibility

\n\n

This module has just undergone a very large rewrite. As a result it will no\nlonger work with the previous classes and configuration as before. We've\nattempted to handle backwards compatibility automatically by adding a\nattempt_compatibility_mode parameter to the main mysql class. If you set\nthis to true it will attempt to map your previous parameters into the new\nmysql::server class.

\n\n

WARNING

\n\n

This may fail. It may eat your MySQL server. PLEASE test it before running it\nlive. Even if it's just a no-op and a manual comparision. Please be careful!

\n\n

Setup

\n\n

What MySQL affects

\n\n
    \n
  • MySQL package.
  • \n
  • MySQL configuration files.
  • \n
  • MySQL service.
  • \n
\n\n

Beginning with MySQL

\n\n

If you just want a server installing with the default options you can run\ninclude '::mysql::server'. If you need to customize options, such as the root\npassword or /etc/my.cnf settings then you can also include mysql::server and\npass in an override hash as seen below:

\n\n
class { '::mysql::server':\n  root_password    => 'strongpassword',\n  override_options => { 'mysqld' => { 'max_connections' => '1024' } }\n}\n
\n\n

Usage

\n\n

All interaction for the server is done via mysql::server. To install the\nclient you use mysql::client, and to install bindings you can use\nmysql::bindings.

\n\n

Overrides

\n\n

The hash structure for overrides in mysql::server is as follows:

\n\n
$override_options = {\n  'section' => {\n    'item'             => 'thing',\n  }\n}\n
\n\n

For items that you would traditionally represent as:

\n\n
\n[section]\nthing\n
\n\n

You can just make an entry like thing => true in the hash. MySQL doesn't\ncare if thing is alone or set to a value, it'll happily accept both.

\n\n

Custom configuration

\n\n

To add custom mysql configuration you can drop additional files into\n/etc/mysql/conf.d/ in order to override settings or add additional ones (if you\nchoose not to use override_options in mysql::server). This location is\nhardcoded into the my.cnf template file.

\n\n

Reference

\n\n

Classes

\n\n

Public classes

\n\n
    \n
  • mysql::server: Installs and configures MySQL.
  • \n
  • mysql::server::account_security: Deletes default MySQL accounts.
  • \n
  • mysql::server::monitor: Sets up a monitoring user.
  • \n
  • mysql::server::mysqltuner: Installs MySQL tuner script.
  • \n
  • mysql::server::backup: Sets up MySQL backups via cron.
  • \n
  • mysql::bindings: Installs various MySQL language bindings.
  • \n
  • mysql::client: Installs MySQL client (for non-servers).
  • \n
\n\n

Private classes

\n\n
    \n
  • mysql::server::install: Installs packages.
  • \n
  • mysql::server::config: Configures MYSQL.
  • \n
  • mysql::server::service: Manages service.
  • \n
  • mysql::server::root_password: Sets MySQL root password.
  • \n
  • mysql::server::providers: Creates users, grants, and databases.
  • \n
  • mysql::bindings::java: Installs Java bindings.
  • \n
  • mysql::bindings::perl: Installs Perl bindings.
  • \n
  • mysql::bindings::python: Installs Python bindings.
  • \n
  • mysql::bindings::ruby: Installs Ruby bindings.
  • \n
  • mysql::client::install: Installs MySQL client.
  • \n
\n\n

Parameters

\n\n

mysql::server

\n\n
root_password
\n\n

What is the MySQL root password. Puppet will attempt to set it to this and update /root/.my.cnf.

\n\n
old_root_password
\n\n

What was the previous root password (REQUIRED if you wish to change the root password via Puppet.)

\n\n
override_options
\n\n

This is the hash of override options to pass into MySQL. It can be visualized\nlike a hash of the my.cnf file, so that entries look like:

\n\n
$override_options = {\n  'section' => {\n    'item'             => 'thing',\n  }\n}\n
\n\n

For items that you would traditionally represent as:

\n\n
\n[section]\nthing\n
\n\n

You can just make an entry like thing => true in the hash. MySQL doesn't\ncare if thing is alone or set to a value, it'll happily accept both.

\n\n
config_file
\n\n

The location of the MySQL configuration file.

\n\n
manage_config_file
\n\n

Should we manage the MySQL configuration file.

\n\n
purge_conf_dir
\n\n

Should we purge the conf.d directory?

\n\n
restart
\n\n

Should the service be restarted when things change?

\n\n
root_group
\n\n

What is the group used for root?

\n\n
package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
package_name
\n\n

What is the name of the mysql server package to install.

\n\n
remove_default_accounts
\n\n

Boolean to decide if we should automatically include\nmysql::server::account_security.

\n\n
service_enabled
\n\n

Boolean to decide if the service should be enabled.

\n\n
service_manage
\n\n

Boolean to decide if the service should be managed.

\n\n
service_name
\n\n

What is the name of the mysql server service.

\n\n
service_provider
\n\n

Which provider to use to manage the service.

\n\n
users
\n\n

Optional hash of users to create, which are passed to mysql_user. Example:

\n\n
$users = {\n  'someuser@localhost' => {\n    ensure                   => 'present',\n    max_connections_per_hour => '0',\n    max_queries_per_hour     => '0',\n    max_updates_per_hour     => '0',\n    max_user_connections     => '0',\n    password_hash            => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF',\n  },\n}\n
\n\n
grants
\n\n

Optional hash of grants, which are passed to mysql_grant. Example:

\n\n
$grants = {\n  'someuser@localhost/somedb.*' => {\n    ensure     => 'present',\n    options    => ['GRANT'],\n    privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'],\n    table      => 'somedb.*',\n    user       => 'someuser@localhost',\n  },\n}\n
\n\n
databases
\n\n

Optional hash of databases to create, which are passed to mysql_database. Example:

\n\n
$databases = {\n  'somedb' => {\n    ensure  => 'present',\n    charset => 'utf8',\n  },\n}\n
\n\n
service_provider
\n\n

mysql::server::backup

\n\n
backupuser
\n\n

MySQL user to create for backing up.

\n\n
backuppassword
\n\n

MySQL user password for backups.

\n\n
backupdir
\n\n

Directory to backup into.

\n\n
backupcompress
\n\n

Boolean to determine if backups should be compressed.

\n\n
backuprotate
\n\n

How many days to keep backups for.

\n\n
delete_before_dump
\n\n

Boolean to determine if you should cleanup before backing up or after.

\n\n
backupdatabases
\n\n

Array of databases to specifically backup.

\n\n
file_per_database
\n\n

Should a seperate file be used per database.

\n\n
ensure
\n\n

Present or absent, allows you to remove the backup scripts.

\n\n
time
\n\n

An array of two elements to set the time to backup. Allows ['23', '5'] or ['3', '45'] for HH:MM times.

\n\n

mysql::server::monitor

\n\n
mysql_monitor_username
\n\n

The username to create for MySQL monitoring.

\n\n
mysql_monitor_password
\n\n

The password to create for MySQL monitoring.

\n\n
mysql_monitor_hostname
\n\n

The hostname to allow to access the MySQL monitoring user.

\n\n

mysql::bindings

\n\n
java_enable
\n\n

Boolean to decide if the Java bindings should be installed.

\n\n
perl_enable
\n\n

Boolean to decide if the Perl bindings should be installed.

\n\n
php_enable
\n\n

Boolean to decide if the PHP bindings should be installed.

\n\n
python_enable
\n\n

Boolean to decide if the Python bindings should be installed.

\n\n
ruby_enable
\n\n

Boolean to decide if the Ruby bindings should be installed.

\n\n
java_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
java_package_name
\n\n

The name of the package to install.

\n\n
java_package_provider
\n\n

What provider should be used to install the package.

\n\n
perl_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
perl_package_name
\n\n

The name of the package to install.

\n\n
perl_package_provider
\n\n

What provider should be used to install the package.

\n\n
python_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
python_package_name
\n\n

The name of the package to install.

\n\n
python_package_provider
\n\n

What provider should be used to install the package.

\n\n
ruby_package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
ruby_package_name
\n\n

The name of the package to install.

\n\n
ruby_package_provider
\n\n

What provider should be used to install the package.

\n\n

mysql::client

\n\n
bindings_enable
\n\n

Boolean to automatically install all bindings.

\n\n
package_ensure
\n\n

What to set the package to. Can be present, absent, or version.

\n\n
package_name
\n\n

What is the name of the mysql client package to install.

\n\n

Defines

\n\n

mysql::db

\n\n

Creates a database with a user and assign some privileges.

\n\n
    mysql::db { 'mydb':\n      user     => 'myuser',\n      password => 'mypass',\n      host     => 'localhost',\n      grant    => ['SELECT', 'UPDATE'],\n    }\n
\n\n

Providers

\n\n

mysql_database

\n\n

mysql_database can be used to create and manage databases within MySQL:

\n\n
mysql_database { 'information_schema':\n  ensure  => 'present',\n  charset => 'utf8',\n  collate => 'utf8_swedish_ci',\n}\nmysql_database { 'mysql':\n  ensure  => 'present',\n  charset => 'latin1',\n  collate => 'latin1_swedish_ci',\n}\n
\n\n

mysql_user

\n\n

mysql_user can be used to create and manage user grants within MySQL:

\n\n
mysql_user { 'root@127.0.0.1':\n  ensure                   => 'present',\n  max_connections_per_hour => '0',\n  max_queries_per_hour     => '0',\n  max_updates_per_hour     => '0',\n  max_user_connections     => '0',\n}\n
\n\n

mysql_grant

\n\n

mysql_grant can be used to create grant permissions to access databases within\nMySQL. To use it you must create the title of the resource as shown below,\nfollowing the pattern of username@hostname/database.table:

\n\n
mysql_grant { 'root@localhost/*.*':\n  ensure     => 'present',\n  options    => ['GRANT'],\n  privileges => ['ALL'],\n  table      => '*.*',\n  user       => 'root@localhost',\n}\n
\n\n

Limitations

\n\n

This module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Authors

\n\n

This module is based on work by David Schmitt. The following contributor have contributed patches to this module (beyond Puppet Labs):

\n\n
    \n
  • Larry Ludwig
  • \n
  • Christian G. Warden
  • \n
  • Daniel Black
  • \n
  • Justin Ellison
  • \n
  • Lowe Schmidt
  • \n
  • Matthias Pigulla
  • \n
  • William Van Hevelingen
  • \n
  • Michael Arnold
  • \n
  • Chris Weyl
  • \n
\n
", "changelog": "
2013-11-13 - Version 2.1.0\n\nSummary:\n\nThe most important changes in 2.1.0 are improvements to the my.cnf creation,\nas well as providers.  Setting options to = true strips them to be just the\nkey name itself, which is required for some options.\n\nThe provider updates fix a number of bugs, from lowercase privileges to\ndeprecation warnings.\n\nLast, the new hiera integration functionality should make it easier to\nexternalize all your grantts, users, and, databases.  Another great set of\ncommunity submissions helped to make this release.\n\nFeatures:\n- Some options can not take a argument. Gets rid of the '= true' when an\noption is set to true.\n- Easier hiera integration:  Add hash parameters to mysql::server to allow\nspecifying grants, users, and databases.\n\nFixes:\n- Fix an issue with lowercase privileges in mysql_grant{} causing them to be reapplied needlessly.\n- Changed defaults-file to defaults-extra-file in providers.\n- Ensure /root/.my.cnf is 0600 and root owned.\n- database_user deprecation warning was incorrect.\n- Add anchor pattern for client.pp\n- Documentation improvements.\n- Various test fixes.\n\n2013-10-21 - Version 2.0.1\n\nSummary:\n\nThis is a bugfix release to handle an issue where unsorted mysql_grant{}\nprivileges could cause Puppet to incorrectly reapply the permissions on\neach run.\n\nFixes:\n- Mysql_grant now sorts privileges in the type and provider for comparision.\n- Comment and test tweak for PE3.1.\n\n2013-10-14 - Version 2.0.0\n\nSummary:\n\n(Previously detailed in the changelog for 2.0.0-rc1)\n\nThis module has been completely refactored and works significantly different.\nThe changes are broad and touch almost every piece of the module.\n\nSee the README.md for full details of all changes and syntax.\nPlease remain on 1.0.0 if you don't have time to fully test this in dev.\n\n* mysql::server, mysql::client, and mysql::bindings are the primary interface\nclasses.\n* mysql::server takes an `options_override` parameter to set my.cnf options,\nwith the hash format: { 'section' => { 'thing' => 'value' }}\n* mysql attempts backwards compatibility by forwarding all parameters to\nmysql::server.\n\n2013-10-09 - Version 2.0.0-rc5\n\nSummary:\n\nHopefully the final rc!  Further fixes to mysql_grant (stripping out the\ncleverness so we match a much wider range of input.)\n\nFixes:\n- Make mysql_grant accept '.*'@'.*' in terms of input for user@host.\n\n2013-10-09 - Version 2.0.0-rc4\n\nSummary:\n\nBugfixes to mysql_grant and mysql_user form the bulk of this rc, as well as\nensuring that values in the override_options hash that contain a value of ''\nare created as just "key" in the conf rather than "key =" or "key = false".\n\nFixes:\n- Improve mysql_grant to work with IPv6 addresses (both long and short).\n- Ensure @host users work as well as user@host users.\n- Updated my.cnf template to support items with no values.\n\n2013-10-07 - Version 2.0.0-rc3\n\nSummary:\n\nFix mysql::server::monitor's use of mysql_user{}.\n\nFixes:\n- Fix myql::server::monitor's use of mysql_user{} to grant the proper\npermissions.  Add specs as well.  (Thanks to treydock!)\n\n2013-10-03 - Version 2.0.0-rc2\n\nSummary:\n\nBugfixes\n\nFixes:\n- Fix a duplicate parameter in mysql::server\n\n2013-10-03 - Version 2.0.0-rc1\n\nSummary:\n\nThis module has been completely refactored and works significantly different.\nThe changes are broad and touch almost every piece of the module.\n\nSee the README.md for full details of all changes and syntax.\nPlease remain on 1.0.0 if you don't have time to fully test this in dev.\n\n* mysql::server, mysql::client, and mysql::bindings are the primary interface\nclasses.\n* mysql::server takes an `options_override` parameter to set my.cnf options,\nwith the hash format: { 'section' => { 'thing' => 'value' }}\n* mysql attempts backwards compatibility by forwarding all parameters to\nmysql::server.\n\n2013-09-23 - Version 1.0.0\n\nSummary:\n\nThis release introduces a number of new type/providers, to eventually\nreplace the database_ ones.  The module has been converted to call the\nnew providers rather than the previous ones as they have a number of\nfixes, additional options, and work with puppet resource.\n\nThis 1.0.0 release precedes a large refactoring that will be released\nalmost immediately after as 2.0.0.\n\nFeatures:\n- Added mysql_grant, mysql_database, and mysql_user.\n- Add `mysql::bindings` class and refactor all other bindings to be contained underneath mysql::bindings:: namespace.\n- Added support to back up specified databases only with 'mysqlbackup' parameter.\n- Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file\n\nBugfixes:\n- Update my.cnf.pass.erb to allow custom socket support\n- Add environment variable for .my.cnf in mysql::db.\n- Add HOME environment variable for .my.cnf to mysqladmin command when\n(re)setting root password\n\n2013-07-15 - Version 0.9.0\nFeatures:\n- Add `mysql::backup::backuprotate` parameter\n- Add `mysql::backup::delete_before_dump` parameter\n- Add `max_user_connections` attribute to `database_user` type\n\nBugfixes:\n- Add client package dependency for `mysql::db`\n- Remove duplicate `expire_logs_days` and `max_binlog_size` settings\n- Make root's `.my.cnf` file path dynamic\n- Update pidfile path for Suse variants\n- Fixes for lint\n\n2013-07-05 - Version 0.8.1\nBugfixes:\n - Fix a typo in the Fedora 19 support.\n\n2013-07-01 - Version 0.8.0\nFeatures:\n - mysql::perl class to install perl-DBD-mysql.\n - minor improvements to the providers to improve reliability\n - Install the MariaDB packages on Fedora 19 instead of MySQL.\n - Add new `mysql` class parameters:\n  -  `max_connections`: The maximum number of allowed connections.\n  -  `manage_config_file`: Opt out of puppetized control of my.cnf.\n  -  `ft_min_word_len`: Fine tune the full text search.\n  -  `ft_max_word_len`: Fine tune the full text search.\n - Add new `mysql` class performance tuning parameters:\n  -  `key_buffer`\n  -  `thread_stack`\n  -  `thread_cache_size`\n  -  `myisam-recover`\n  -  `query_cache_limit`\n  -  `query_cache_size`\n  -  `max_connections`\n  -  `tmp_table_size`\n  -  `table_open_cache`\n  -  `long_query_time`\n - Add new `mysql` class replication parameters:\n  -  `server_id`\n  -  `sql_log_bin`\n  -  `log_bin`\n  -  `max_binlog_size`\n  -  `binlog_do_db`\n  -  `expire_logs_days`\n  -  `log_bin_trust_function_creators`\n  -  `replicate_ignore_table`\n  -  `replicate_wild_do_table`\n  -  `replicate_wild_ignore_table`\n  -  `expire_logs_days`\n  -  `max_binlog_size`\n\nBugfixes:\n - No longer restart MySQL when /root/.my.cnf changes.\n - Ensure mysql::config runs before any mysql::db defines.\n\n2013-06-26 - Version 0.7.1\nBugfixes:\n- Single-quote password for special characters\n- Update travis testing for puppet 3.2.x and missing Bundler gems\n\n2013-06-25 - Version 0.7.0\nThis is a maintenance release for community bugfixes and exposing\nconfiguration variables.\n\n* Add new `mysql` class parameters:\n -  `basedir`: The base directory mysql uses\n -  `bind_address`: The IP mysql binds to\n -  `client_package_name`: The name of the mysql client package\n -  `config_file`: The location of the server config file\n -  `config_template`: The template to use to generate my.cnf\n -  `datadir`: The directory MySQL's datafiles are stored\n -  `default_engine`: The default engine to use for tables\n -  `etc_root_password`: Whether or not to add the mysql root password to\n /etc/my.cnf\n -  `java_package_name`: The name of the java package containing the java\n connector\n -  `log_error`: Where to log errors\n -  `manage_service`: Boolean dictating if mysql::server should manage the\n service\n -  `max_allowed_packet`: Maximum network packet size mysqld will accept\n -  `old_root_password`: Previous root user password\n -  `php_package_name`: The name of the phpmysql package to install\n -  `pidfile`: The location mysql will expect the pidfile to be\n -  `port`: The port mysql listens on\n -  `purge_conf_dir`: Value fed to recurse and purge parameters of the\n /etc/mysql/conf.d resource\n -  `python_package_name`: The name of the python mysql package to install\n -  `restart`: Whether to restart mysqld\n -  `root_group`: Use specified group for root-owned files\n -  `root_password`: The root MySQL password to use\n -  `ruby_package_name`: The name of the ruby mysql package to install\n -  `ruby_package_provider`: The installation suite to use when installing the\n ruby package\n -  `server_package_name`: The name of the server package to install\n -  `service_name`: The name of the service to start\n -  `service_provider`: The name of the service provider\n -  `socket`: The location of the MySQL server socket file\n -  `ssl_ca`: The location of the SSL CA Cert\n -  `ssl_cert`: The location of the SSL Certificate to use\n -  `ssl_key`: The SSL key to use\n -  `ssl`: Whether or not to enable ssl\n -  `tmpdir`: The directory MySQL's tmpfiles are stored\n* Deprecate `mysql::package_name` parameter in favor of\n`mysql::client_package_name`\n* Fix local variable template deprecation\n* Fix dependency ordering in `mysql::db`\n* Fix ANSI quoting in queries\n* Fix travis support (but still messy)\n* Fix typos\n\n2013-01-11 - Version 0.6.1\n* Fix providers when /root/.my.cnf is absent\n\n2013-01-09 - Version 0.6.0\n* Add `mysql::server::config` define for specific config directives\n* Add `mysql::php` class for php support\n* Add `backupcompress` parameter to `mysql::backup`\n* Add `restart` parameter to `mysql::config`\n* Add `purge_conf_dir` parameter to `mysql::config`\n* Add `manage_service` parameter to `mysql::server`\n* Add syslog logging support via the `log_error` parameter\n* Add initial SuSE support\n* Fix remove non-localhost root user when fqdn != hostname\n* Fix dependency in `mysql::server::monitor`\n* Fix .my.cnf path for root user and root password\n* Fix ipv6 support for users\n* Fix / update various spec tests\n* Fix typos\n* Fix lint warnings\n\n2012-08-23 - Version 0.5.0\n* Add puppetlabs/stdlib as requirement\n* Add validation for mysql privs in provider\n* Add `pidfile` parameter to mysql::config\n* Add `ensure` parameter to mysql::db\n* Add Amazon linux support\n* Change `bind_address` parameter to be optional in my.cnf template\n* Fix quoting root passwords\n\n2012-07-24 - Version 0.4.0\n* Fix various bugs regarding database names\n* FreeBSD support\n* Allow specifying the storage engine\n* Add a backup class\n* Add a security class to purge default accounts\n\n2012-05-03 - Version 0.3.0\n* #14218 Query the database for available privileges\n* Add mysql::java class for java connector installation\n* Use correct error log location on different distros\n* Fix set_mysql_rootpw to properly depend on my.cnf\n\n2012-04-11 - Version 0.2.0\n\n2012-03-19 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13203) Add ssl support (f7e0ea5)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Travis ci before script needs success exit code. (0ea463b)\n\n2012-03-18 - Nan Liu <nan@puppetlabs.com>\n* Fix Puppet 2.6 compilation issues. (9ebbbc4)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Add travis.ci for testing multiple puppet versions. (33c72ef)\n\n2012-03-15 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* (#13163) Datadir should be configurable (f353fc6)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Document create_resources dependency. (558a59c)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix spec test issues related to error message. (eff79b5)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* Fix mysql service on Ubuntu. (72da2c5)\n\n2012-03-16 - Dan Bode <dan@puppetlabs.com>\n* Add more spec test coverage (55e399d)\n\n2012-03-16 - Nan Liu <nan@puppetlabs.com>\n* (#11963) Fix spec test due to path changes. (1700349)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Add a test to check path for 'mysqld-restart' (b14c7d1)\n\n2012-03-07 - François Charlier <fcharlier@ploup.net>\n* Fix path for 'mysqld-restart' (1a9ae6b)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Add rspec-puppet tests for mysql::config (907331a)\n\n2012-03-15 - Dan Bode <dan@puppetlabs.com>\n* Moved class dependency between sever and config to server (da62ad6)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Notify mysql restart from set_mysql_rootpw exec (0832a2c)\n\n2012-03-15 - Nan Liu <nan@puppetlabs.com>\n* Add documentation related to osfamily fact. (8265d28)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Mention osfamily value in failure message (e472d3b)\n\n2012-03-14 - Dan Bode <dan@puppetlabs.com>\n* Fix bug when querying for all database users (015490c)\n\n2012-02-09 - Nan Liu <nan@puppetlabs.com>\n* Major refactor of mysql module. (b1f90fd)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Per @ghoneycutt, we should fail explicitly and explain why. (09af083)\n\n2012-01-11 - Justin Ellison <justin.ellison@buckle.com>\n* Removing duplicate declaration (7513d03)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Use socket value from params class instead of hardcoding. (663e97c)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Instead of hardcoding the config file target, pull it from mysql::params (031a47d)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Moved $socket to within the case to toggle between distros.  Added a $config_file variable to allow per-distro config file destinations. (360eacd)\n\n2012-01-10 - Justin Ellison <justin.ellison@buckle.com>\n* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b)\n\n2012-02-09 - William Van Hevelingen <blkperl@cat.pdx.edu>\n* Changed the README to use markdown (3b7dfeb)\n\n2012-02-04 - Daniel Black <grooverdan@users.sourceforge.net>\n* (#12412) mysqltuner.pl update (b809e6f)\n\n2011-11-17 - Matthias Pigulla <mp@webfactory.de>\n* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1)\n\n2011-12-20 - Jeff McCune <jeff@puppetlabs.com>\n* (minor) Fixup typos in Modulefile metadata (a0ed6a1)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* Only notify Exec to import sql if sql is given (0783c74)\n\n2011-12-19 - Carl Caum <carl@carlcaum.com>\n* (#11508) Only load sql_scripts on DB creation (e3b9fd9)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Require not needed due to implicit dependencies (3058feb)\n\n2011-12-13 - Justin Ellison <justin.ellison@buckle.com>\n* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d)\n\n2011-06-03 - Dan Bode <dan@puppetlabs.com> - 0.0.1\n* initial commit\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2013 Puppet Labs\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-11-13 10:18:01 -0800", "updated_at": "2013-11-13 10:18:01 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-mysql-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc5", "version": "2.0.0-rc5" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc4", "version": "2.0.0-rc4" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc3", "version": "2.0.0-rc3" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc2", "version": "2.0.0-rc2" }, { "uri": "/v3/releases/puppetlabs-mysql-2.0.0-rc1", "version": "2.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-mysql-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.7.1", "version": "0.7.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.6.1", "version": "0.6.1" }, { "uri": "/v3/releases/puppetlabs-mysql-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.5.0", "version": "0.5.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-mysql-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://github.com/puppetlabs/puppetlabs-mysql", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-concat", "name": "concat", "downloads": 68527, "created_at": "2013-08-09 17:55:07 -0700", "updated_at": "2014-01-06 14:41:11 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-concat-1.0.0", "module": { "uri": "/v3/modules/puppetlabs-concat", "name": "concat", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.0", "metadata": { "name": "puppetlabs-concat", "version": "1.0.0", "source": "git://github.com/puppetlabs/puppetlabs-concat.git", "author": "Puppetlabs", "license": "Apache 2.0", "summary": "Concat module", "description": "Concat module", "project_page": "http://github.com/puppetlabs/puppetlabs-concat", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "89220fae3ab04a350132fe94d7a6ca00", "Gemfile": "a913d6f7a0420e07539d8ff1ef047ffb", "LICENSE": "f5a76685d453424cd63dde1535811cf0", "Modulefile": "f99ee2f6778b9e23635ac1027888bbd3", "README": "d15ec3400f628942dd7b7fa8c1a18da3", "README.markdown": "d82e203d729ea4785bdcaca1be166e62", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/concatfragments.sh": "2fbba597a1513eb61229551d35d42b9f", "lib/facter/concat_basedir.rb": "e152593fafe27ef305fc473929c62ca6", "manifests/fragment.pp": "196ee8e405b3a31b84ae618ed54377ed", "manifests/init.pp": "8d0cc8e9cf145ca7a23db05a30252476", "manifests/setup.pp": "2246572410d94c68aff310f8132c55b4", "spec/defines/init_spec.rb": "35e41d4abceba0dca090d3addd92bb4f", "spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "9c3742bf87d62027f080c6b9fa98b979", "spec/system/basic_spec.rb": "9135d9af6a21f16980ab59b58e91ed9a", "spec/system/concat_spec.rb": "5fe675ec42ca441d0c7e431c31bbc238", "spec/system/empty_spec.rb": "51ab1fc7c86268f1ab1cda72dc5ff583", "spec/system/replace_spec.rb": "275295e6b4f04fc840dc3f87faf56249", "spec/system/warn_spec.rb": "0ea35b44e8f0ac5352256f95115995ce" } }, "tags": [ "concat", "files", "fragments", "templates" ], "file_uri": "/v3/files/puppetlabs-concat-1.0.0.tar.gz", "file_size": 11866, "file_md5": "b46fed82226a08b37428769f4fa6e534", "downloads": 66264, "readme": "

What is it?

\n\n

A Puppet module that can construct files from fragments.

\n\n

Please see the comments in the various .pp files for details\nas well as posts on my blog at http://www.devco.net/

\n\n

Released under the Apache 2.0 licence

\n\n

Usage:

\n\n

If you wanted a /etc/motd file that listed all the major modules\non the machine. And that would be maintained automatically even\nif you just remove the include lines for other modules you could\nuse code like below, a sample /etc/motd would be:

\n\n
\nPuppet modules on this server:\n\n    -- Apache\n    -- MySQL\n
\n\n

Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.

\n\n
\n# class to setup basic motd, include on all nodes\nclass motd {\n   $motd = \"/etc/motd\"\n\n   concat{$motd:\n      owner => root,\n      group => root,\n      mode  => '0644',\n   }\n\n   concat::fragment{\"motd_header\":\n      target => $motd,\n      content => \"\\nPuppet modules on this server:\\n\\n\",\n      order   => 01,\n   }\n\n   # local users on the machine can append to motd by just creating\n   # /etc/motd.local\n   concat::fragment{\"motd_local\":\n      target => $motd,\n      ensure  => \"/etc/motd.local\",\n      order   => 15\n   }\n}\n\n# used by other modules to register themselves in the motd\ndefine motd::register($content=\"\", $order=10) {\n   if $content == \"\" {\n      $body = $name\n   } else {\n      $body = $content\n   }\n\n   concat::fragment{\"motd_fragment_$name\":\n      target  => \"/etc/motd\",\n      content => \"    -- $body\\n\"\n   }\n}\n\n# a sample apache module\nclass apache {\n   include apache::install, apache::config, apache::service\n\n   motd::register{\"Apache\": }\n}\n
\n\n

Detailed documentation of the class options can be found in the\nmanifest files.

\n\n

Known Issues:

\n\n
    \n
  • Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true on the [main] section of your\nnode's '/etc/puppet/puppet.conf' for at least the first run.\nYou have this issue if puppet fails to run on the client and you have\na message similar to\n"err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not 'undef' at [...]/concat/manifests/setup.pp:44".
  • \n
\n\n

Contributors:

\n\n

Paul Elliot

\n\n
    \n
  • Provided 0.24.8 support, shell warnings and empty file creation support.
  • \n
\n\n

Chad Netzer

\n\n
    \n
  • Various patches to improve safety of file operations
  • \n
  • Symlink support
  • \n
\n\n

David Schmitt

\n\n
    \n
  • Patch to remove hard coded paths relying on OS path
  • \n
  • Patch to use file{} to copy the resulting file to the final destination. This means Puppet client will show diffs and that hopefully we can change file ownerships now
  • \n
\n\n

Peter Meier

\n\n
    \n
  • Basedir as a fact
  • \n
  • Unprivileged user support
  • \n
\n\n

Sharif Nassar

\n\n
    \n
  • Solaris/Nexenta support
  • \n
  • Better error reporting
  • \n
\n\n

Christian G. Warden

\n\n
    \n
  • Style improvements
  • \n
\n\n

Reid Vandewiele

\n\n
    \n
  • Support non GNU systems by default
  • \n
\n\n

Erik Dalén

\n\n
    \n
  • Style improvements
  • \n
\n\n

Gildas Le Nadan

\n\n
    \n
  • Documentation improvements
  • \n
\n\n

Paul Belanger

\n\n
    \n
  • Testing improvements and Travis support
  • \n
\n\n

Branan Purvine-Riley

\n\n
    \n
  • Support Puppet Module Tool better
  • \n
\n\n

Dustin J. Mitchell

\n\n
    \n
  • Always include setup when using the concat define
  • \n
\n\n

Andreas Jaggi

\n\n
    \n
  • Puppet Lint support
  • \n
\n\n

Jan Vansteenkiste

\n\n
    \n
  • Configurable paths
  • \n
\n\n

Contact:

\n\n

puppet-users@ mailing list.

\n
", "changelog": "
2013-08-09 1.0.0\n\nSummary:\n\nMany new features and bugfixes in this release, and if you're a heavy concat\nuser you should test carefully before upgrading.  The features should all be\nbackwards compatible but only light testing has been done from our side before\nthis release.\n\nFeatures:\n- New parameters in concat:\n - `replace`: specify if concat should replace existing files.\n - `ensure_newline`: controls if fragments should contain a newline at the end.\n- Improved README documentation.\n- Add rspec:system tests (rake spec:system to test concat)\n\nBugfixes\n- Gracefully handle \\n in a fragment resource name.\n- Adding more helpful message for 'pluginsync = true'\n- Allow passing `source` and `content` directly to file resource, rather than\ndefining resource defaults.\n- Added -r flag to read so that filenames with \\ will be read correctly.\n- sort always uses LANG=C.\n- Allow WARNMSG to contain/start with '#'.\n- Replace while-read pattern with for-do in order to support Solaris.\n\nCHANGELOG:\n- 2010/02/19 - initial release\n- 2010/03/12 - add support for 0.24.8 and newer\n             - make the location of sort configurable\n             - add the ability to add shell comment based warnings to\n               top of files\n             - add the ablity to create empty files\n- 2010/04/05 - fix parsing of WARN and change code style to match rest\n               of the code\n             - Better and safer boolean handling for warn and force\n             - Don't use hard coded paths in the shell script, set PATH\n               top of the script\n             - Use file{} to copy the result and make all fragments owned\n               by root.  This means we can chnage the ownership/group of the\n               resulting file at any time.\n             - You can specify ensure => "/some/other/file" in concat::fragment\n               to include the contents of a symlink into the final file.\n- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name\n- 2010/05/22 - Improve documentation and show the use of ensure =>\n- 2010/07/14 - Add support for setting the filebucket behavior of files\n- 2010/10/04 - Make the warning message configurable\n- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011/02/03 - Make the shell script more portable and add a config option for root group\n- 2011/06/21 - Make base dir root readable only for security\n- 2011/06/23 - Set base directory using a fact instead of hardcoding it\n- 2011/06/23 - Support operating as non privileged user\n- 2011/06/23 - Support dash instead of bash or sh\n- 2011/07/11 - Better solaris support\n- 2011/12/05 - Use fully qualified variables\n- 2011/12/13 - Improve Nexenta support\n- 2012/04/11 - Do not use any GNU specific extensions in the shell script\n- 2012/03/24 - Comply to community style guides\n- 2012/05/23 - Better errors when basedir isnt set\n- 2012/05/31 - Add spec tests\n- 2012/07/11 - Include concat::setup in concat improving UX\n- 2012/08/14 - Puppet Lint improvements\n- 2012/08/30 - The target path can be different from the $name\n- 2012/08/30 - More Puppet Lint cleanup\n- 2012/09/04 - RELEASE 0.2.0\n- 2012/12/12 - Added (file) $replace parameter to concat\n
", "license": "
   Copyright 2012 R.I.Pienaar\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-08-14 15:59:00 -0700", "updated_at": "2013-08-14 15:59:00 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-concat-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-concat-1.0.0-rc1", "version": "1.0.0-rc1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-concat", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-postgresql", "name": "postgresql", "downloads": 63819, "created_at": "2012-10-24 17:23:51 -0700", "updated_at": "2014-01-06 14:40:36 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-postgresql-3.2.0", "module": { "uri": "/v3/modules/puppetlabs-postgresql", "name": "postgresql", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.2.0", "metadata": { "name": "puppetlabs-postgresql", "version": "3.2.0", "source": "git://github.com/puppetlabs/puppet-postgresql.git", "author": "Inkling/Puppet Labs", "license": "ASL 2.0", "summary": "PostgreSQL defined resource types", "description": "PostgreSQL defined resource types", "project_page": "https://github.com/puppetlabs/puppet-postgresql", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">=3.2.0 <5.0.0" }, { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/apt", "version_requirement": ">=1.1.0 <2.0.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0 <2.0.0" } ], "types": [ { "name": "postgresql_conf", "doc": "This type allows puppet to manage postgresql.conf parameters.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value to set for this parameter." }, { "name": "target", "doc": "The path to postgresql.conf" } ], "parameters": [ { "name": "name", "doc": "The postgresql parameter name to manage. Values can match `/^[\\w\\.]+$/`." } ], "providers": [ { "name": "parsed", "doc": "Set key/values in postgresql.conf." } ] }, { "name": "postgresql_psql", "doc": "", "properties": [ { "name": "command", "doc": "The SQL command to execute via psql." } ], "parameters": [ { "name": "name", "doc": "An arbitrary tag for your own reference; the name of the message." }, { "name": "unless", "doc": "An optional SQL command to execute prior to the main :command; this is generally intended to be used for idempotency, to check for the existence of an object in the database to determine whether or not the main SQL command needs to be executed at all." }, { "name": "db", "doc": "The name of the database to execute the SQL command against." }, { "name": "search_path", "doc": "The schema search path to use when executing the SQL command" }, { "name": "psql_path", "doc": "The path to psql executable." }, { "name": "psql_user", "doc": "The system user account under which the psql command should be executed." }, { "name": "psql_group", "doc": "The system user group account under which the psql command should be executed." }, { "name": "cwd", "doc": "The working directory under which the psql command should be executed." }, { "name": "refreshonly", "doc": "If 'true', then the SQL will only be executed via a notify/subscribe event. Valid values are `true`, `false`." } ], "providers": [ { "name": "ruby", "doc": "" } ] } ], "checksums": { "Changelog": "3bff00e6b5ac42cd8055ee8d7337c4ff", "Gemfile": "d29b809bd75c2aa7c160e45e66483d8c", "Gemfile.lock": "9c04244f3ad5b505c9f36daf40a5677f", "LICENSE": "746fe83ebbf8970af0a9ea13962293e9", "Modulefile": "6a824d502980df77edf9d414b5e3e2f2", "NOTICE": "d8ffc52f00e00877b45d2b77e709f69e", "README.md": "049d45d3aa128c29e16e9a0dcf67517f", "Rakefile": "7e458ced5c7b798430ee6371f860057e", "files/RPM-GPG-KEY-PGDG": "78b5db170d33f80ad5a47863a7476b22", "files/validate_postgresql_connection.sh": "20301932819f035492a30880f5bf335a", "lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb": "d518a7959b950874820a3b0a7a324488", "lib/puppet/parser/functions/postgresql_escape.rb": "2e136fcd653ab38d831c5b40806d47d1", "lib/puppet/parser/functions/postgresql_password.rb": "820da02a888ab42357fe9bc2352b1c37", "lib/puppet/provider/postgresql_conf/parsed.rb": "9c198422c0558faab1bedc00b68cfe45", "lib/puppet/provider/postgresql_psql/ruby.rb": "506a07dc159de91fe212133103b9dcff", "lib/puppet/type/postgresql_conf.rb": "4f333138a3689f9768e7fe4bc3cde9fd", "lib/puppet/type/postgresql_psql.rb": "2c1270cfed4ffb2971059846a57cf983", "manifests/client.pp": "f9bc3a578017fe8eb881de2255bdc023", "manifests/globals.pp": "64d9cdb6894ba6334992e9365a1e2096", "manifests/lib/devel.pp": "94ae7eac3acf1dd3072d481eca4d2d7f", "manifests/lib/java.pp": "6e4a2187c2b4caecad8098b46e99c8e0", "manifests/lib/python.pp": "90736f86301c4c6401ec1180c176b616", "manifests/params.pp": "109138ba7df4ad7da71b302a20f33b29", "manifests/repo/apt_postgresql_org.pp": "ef7012ea3c5429bea11b1114183d32c3", "manifests/repo/yum_postgresql_org.pp": "e0c445f877cdb39774b735417c967d1d", "manifests/repo.pp": "a18a5cb760dbb1e10bdd83730300c1fe", "manifests/server/config.pp": "a05f4aeb3f09b2e5e9ee8b9467519afb", "manifests/server/config_entry.pp": "a3823efa15fe96535335bd7b722fef9a", "manifests/server/contrib.pp": "3112bd1edbed51b68e1402027f9d53b1", "manifests/server/database.pp": "ebf356e8cadf5bef884e5597fd60724e", "manifests/server/database_grant.pp": "66e5470bb932b087b540c444ee49941b", "manifests/server/db.pp": "f35e4974ffee6136e2de1a3edc9cbf21", "manifests/server/firewall.pp": "98632b073511a00926908c6951851052", "manifests/server/grant.pp": "81c8d6b64a6b938fe57346ede5cdfeb7", "manifests/server/initdb.pp": "91e27eaf448817c0f904e5267816a16a", "manifests/server/install.pp": "8520e3a86c74e0587a46c4548097bab3", "manifests/server/passwd.pp": "96214f099cfb97d361f9bdc0734baf38", "manifests/server/pg_hba_rule.pp": "01a1bf9503f908531af9990909d8ba45", "manifests/server/plperl.pp": "d6a2e2f0c93c7b543e9db64202c2e48d", "manifests/server/reload.pp": "d62c048c8f25c167d266e99e36c0f227", "manifests/server/role.pp": "43eeda8b6a40b587d688e2ce33c4e780", "manifests/server/service.pp": "e1896d429a032c4522201e9048d204db", "manifests/server/table_grant.pp": "bbc864f0ad8545837cf7782d1f7a1755", "manifests/server/tablespace.pp": "beda12859757f7f677a711304dfd5185", "manifests/server.pp": "d147bf997967eeb428c6e681dbe89d67", "manifests/validate_db_connection.pp": "be61434836f7d25cc184126a91b2e3e6", "spec/spec_helper.rb": "d4e4a9a154ada34e7f13b0d8ece0f5db", "spec/spec_helper_system.rb": "ecedca722f54627ef2c5f8a0da5f2163", "spec/system/client_spec.rb": "b477056c567ecc479a3bbc6e283df7ba", "spec/system/common_patterns_spec.rb": "696033dd862db23f45e86b2099e47810", "spec/system/contrib_spec.rb": "326208830a51cf74841bae361709863a", "spec/system/lib/devel_spec.rb": "5e69579d3e2e4f854640e3afb1122162", "spec/system/lib/java_spec.rb": "e88f705ae328f8a830ae027fca35a474", "spec/system/lib/python_spec.rb": "2690f7530f806fa52cbedbb2c86988e6", "spec/system/postgresql_psql_spec.rb": "6dd5c8ec1e0f493143fa2b89b044ee3d", "spec/system/server/config_entry_spec.rb": "0a8a3c42efad84ab7aca367b8c3e8160", "spec/system/server/database_grant_spec.rb": "f5736d6ac16ad1d2ed5f9f3442e3dda4", "spec/system/server/database_spec.rb": "5405572c72b39d72d7975da02eef8569", "spec/system/server/db_spec.rb": "5a6fcf61718af48e2b1fb79ba040da93", "spec/system/server/grant_spec.rb": "fc629944a71faa1d871f3d3a7e4e4a83", "spec/system/server/pg_hba_rule_spec.rb": "ff0c8c772ed60f8667dd2531029830b9", "spec/system/server/plperl_spec.rb": "cd54753b2c8d5e4aaad13daeb8b61e7a", "spec/system/server/role_spec.rb": "5b566002ba577f737d4e2a7b3fccb221", "spec/system/server/table_grant_spec.rb": "260490ebb6c8b9b9f73551fb4eca8ea5", "spec/system/server/tablespace_spec.rb": "48fed176f821c77d24366d70e9d15ff2", "spec/system/server_spec.rb": "e93f4a14e5916eac7961e8d5215e16e2", "spec/system/validate_db_connection_spec.rb": "1a454b555c6f0539d7e6e47e177a68cf", "spec/unit/classes/client_spec.rb": "b26438da8906e68d17e568252c1e43b5", "spec/unit/classes/globals_spec.rb": "952cba1463ca000e288cbfd56ec8c771", "spec/unit/classes/lib/devel_spec.rb": "f660eb0afe4fa75e999ab192e39b58d8", "spec/unit/classes/lib/java_spec.rb": "bdb60c3b379a3788b3bf1f6c29b31c0a", "spec/unit/classes/lib/python_spec.rb": "677c763c1a43a0e33ef7e6e819ec9f0a", "spec/unit/classes/params_spec.rb": "2661b999fc13cd3368b54549f3267be0", "spec/unit/classes/repo_spec.rb": "a24b152315c86146881b6a39a7a22cd0", "spec/unit/classes/server/contrib_spec.rb": "16528171ee3e058c06c5fea454dc9dbc", "spec/unit/classes/server/initdb_spec.rb": "7f17f9cc6091c9e9ff789dc2f1653bff", "spec/unit/classes/server/plperl_spec.rb": "120e0280679b21b4348dd992f39f83b3", "spec/unit/classes/server_spec.rb": "244a793964c16cb3f4d819998e8f07a4", "spec/unit/defines/server/config_entry_spec.rb": "cc2d9d0e4508d745f85c3446ccf76eb4", "spec/unit/defines/server/database_grant_spec.rb": "e09254037c042efa5a29ba8d777c882f", "spec/unit/defines/server/database_spec.rb": "090e9cf334843a4dc8b3f4eadce0109b", "spec/unit/defines/server/db_spec.rb": "9f2181b0df771f4c6adf089b788adf42", "spec/unit/defines/server/grant_spec.rb": "b8d8f46c7c4539747ee0b797a3a1834f", "spec/unit/defines/server/pg_hba_rule_spec.rb": "3ed69d689bf28b56a030c543e7ce6775", "spec/unit/defines/server/role_spec.rb": "fdb53fa637ccd79f8231e15383099137", "spec/unit/defines/server/table_grant_spec.rb": "bb794a0b15dc74e8c8fa5d4878fd3c79", "spec/unit/defines/server/tablespace_spec.rb": "68e7b9a193475491c58485debf1be220", "spec/unit/defines/validate_db_connection_spec.rb": "88e57a8f780d381d75fe062f1178e1ce", "spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb": "e7740c3cd2110e2fcebab8356012267c", "spec/unit/functions/postgresql_escape_spec.rb": "6e52e4f3ca56491f8ba2d1490a5fd1ad", "spec/unit/functions/postgresql_password_spec.rb": "76034569a5ff627073c5e6ff69176ac3", "spec/unit/provider/postgresql_conf/parsed_spec.rb": "7295501a413d8cf99df6f40ea50a36fc", "spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb": "deef7a3f574269889e7d050a55e847f4", "spec/unit/puppet/type/postgresql_psql_spec.rb": "2af5b74f7f4b89ff246818cd79488b3e", "spec/unit/type/postgresql_conf_spec.rb": "76f460e0dfc90a1f38c407e5a0d4f463", "templates/pg_hba_rule.conf": "13b46eecdfd359eddff71fa485ef2f54" } }, "tags": [ "database", "postgresql", "postgres", "centos", "rhel", "ubuntu", "debian", "pgsql" ], "file_uri": "/v3/files/puppetlabs-postgresql-3.2.0.tar.gz", "file_size": 58331, "file_md5": "ad3148ba3cefc15e655b721bfa476637", "downloads": 13123, "readme": "

postgresql

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the PostgreSQL module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with PostgreSQL module
  6. \n
  7. Usage - How to use the module for various tasks
  8. \n
  9. Upgrading - Guide for upgrading from older revisions of this module
  10. \n
  11. Reference - The classes, defines,functions and facts available in this module
  12. \n
  13. Limitations - OS compatibility, etc.
  14. \n
  15. Development - Guide for contributing to the module
  16. \n
  17. Disclaimer - Licensing information
  18. \n
  19. Transfer Notice - Notice of authorship change
  20. \n
  21. Contributors - List of module contributors
  22. \n
\n\n

Overview

\n\n

The PostgreSQL module allows you to easily manage postgres databases with Puppet.

\n\n

Module Description

\n\n

PostgreSQL is a high-performance, free, open-source relational database server. The postgresql module allows you to manage PostgreSQL packages and services on several operating systems, while also supporting basic management of PostgreSQL databases and users. The module offers support for managing firewall for postgres ports on RedHat-based distros, as well as support for basic management of common security settings.

\n\n

Setup

\n\n

What puppetlabs-PostgreSQL affects:

\n\n
    \n
  • package/service/configuration files for PostgreSQL
  • \n
  • listened-to ports
  • \n
  • system firewall (optional)
  • \n
  • IP and mask (optional)
  • \n
\n\n

Introductory Questions

\n\n

The postgresql module offers many security configuration settings. Before getting started, you will want to consider:

\n\n
    \n
  • Do you want/need to allow remote connections?\n\n
      \n
    • If yes, what about TCP connections?
    • \n
  • \n
  • Would you prefer to work around your current firewall settings or overwrite some of them?
  • \n
  • How restrictive do you want the database superuser's permissions to be?
  • \n
\n\n

Your answers to these questions will determine which of the module's parameters you'll want to specify values for.

\n\n

Configuring the server

\n\n

The main configuration you'll need to do will be around the postgresql::server class. The default parameters are reasonable, but fairly restrictive regarding permissions for who can connect and from where. To manage a PostgreSQL server with sane defaults:

\n\n
class { 'postgresql::server': }\n
\n\n

For a more customized configuration:

\n\n
class { 'postgresql::server':\n  ip_mask_deny_postgres_user => '0.0.0.0/32',\n  ip_mask_allow_all_users    => '0.0.0.0/0',\n  listen_addresses           => '*',\n  ipv4acls                   => ['hostssl all johndoe 192.168.0.0/24 cert'],\n  manage_firewall            => true,\n  postgres_password          => 'TPSrep0rt!',\n}\n
\n\n

Once you've completed your configuration of postgresql::server, you can test out your settings from the command line:

\n\n
$ psql -h localhost -U postgres\n$ psql -h my.postgres.server -U\n
\n\n

If you get an error message from these commands, it means that your permissions are set in a way that restricts access from where you're trying to connect. That might be a good thing or a bad thing, depending on your goals.

\n\n

For more details about server configuration parameters consult the PostgreSQL Runtime Configuration docs.

\n\n

Usage

\n\n

Creating a database

\n\n

There are many ways to set up a postgres database using the postgresql::server::db class. For instance, to set up a database for PuppetDB:

\n\n
class { 'postgresql::server': }\n\npostgresql::server::db { 'mydatabasename':\n  user     => 'mydatabaseuser',\n  password => postgresql_password('mydatabaseuser', 'mypassword'),\n}\n
\n\n

Managing users, roles and permissions

\n\n

To manage users, roles and permissions:

\n\n
class { 'postgresql::server': }\n\npostgresql::server::role { 'marmot':\n  password_hash => postgresql_password('marmot', 'mypasswd'),\n}\n\npostgresql::server::database_grant { 'test1':\n  privilege => 'ALL',\n  db        => 'test1',\n  role      => 'marmot',\n}\n\npostgresql::server::table_grant { 'my_table of test2':\n  privilege => 'ALL',\n  table     => 'my_table',\n  db        => 'test2',\n  role      => 'marmot',\n}\n
\n\n

In this example, you would grant ALL privileges on the test1 database and on the my_table table of the test2 database to the user or group specified by dan.

\n\n

At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go.

\n\n

Upgrading

\n\n

Upgrading from 2.x to version 3

\n\n

Note: if you are upgrading for 2.x, you must read this, as just about everything has changed.

\n\n

Version 3 was a major rewrite to fix some internal dependency issues, and to make the new Public API more clear. As a consequence a lot of things have changed for version 3 and older revisions that we will try to outline here.

\n\n

Server specific objects now moved under postgresql::server:: namespace

\n\n

To restructure server specific elements under the postgresql::server:: namespaces the following objects were renamed as such:

\n\n
    \n
  • postgresql::database -> postgresql::server::database
  • \n
  • postgresql::database_grant -> postgresql::server::database_grant
  • \n
  • postgresql::db -> postgresql::server::db
  • \n
  • postgresql::grant -> postgresql::server::grant
  • \n
  • postgresql::pg_hba_rule -> postgresql::server::pg_hba_rule
  • \n
  • postgresql::plperl -> postgresql::server::plperl
  • \n
  • postgresql::contrib -> postgresql::server::contrib
  • \n
  • postgresql::role -> postgresql::server::role
  • \n
  • postgresql::table_grant -> postgresql::server::table_grant
  • \n
  • postgresql::tablespace -> postgresql::server::tablespace
  • \n
\n\n

New postgresql::server::config_entry resource for managing configuration

\n\n

Previously we used the file_line resource to modify postgresql.conf. This new revision now adds a new resource named postgresql::server::config_entry for managing this file. For example:

\n\n
postgresql::server::config_entry { 'check_function_bodies':\n  value => 'off',\n}\n
\n\n

If you were using file_line for this purpose, you should change to this new methodology.

\n\n

postgresql_puppet_extras.conf has been removed

\n\n

Now that we have a methodology for managing postgresql.conf, and due to concerns over the file management methodology using an exec { 'touch ...': } as a way to create an empty file the existing postgresql_puppet_extras.conf file is no longer managed by this module.

\n\n

If you wish to recreate this methodology yourself, use this pattern:

\n\n
class { 'postgresql::server': }\n\n$extras = "/tmp/include.conf"\n\nfile { $extras:\n  content => 'max_connections = 123',\n  notify  => Class['postgresql::server::service'],\n}->\npostgresql::server::config_entry { 'include':\n  value   => $extras,\n}\n
\n\n

All uses of the parameter charset changed to encoding

\n\n

Since PostgreSQL uses the terminology encoding not charset the parameter has been made consisent across all classes and resources.

\n\n

The postgresql base class is no longer how you set globals

\n\n

The old global override pattern was less then optimal so it has been fixed, however we decided to demark this properly by specifying these overrides in the class postgresql::globals. Consult the documentation for this class now to see what options are available.

\n\n

Also, some parameter elements have been moved between this and the postgresql::server class where it made sense.

\n\n

config_hash parameter collapsed for the postgresql::server class

\n\n

Because the config_hash was really passing data through to what was in effect an internal class (postgresql::config). And since we don't want this kind of internal exposure the parameters were collapsed up into the postgresql::server class directly.

\n\n

Lots of changes to 'private' or 'undocumented' classes

\n\n

If you were using these before, these have changed names. You should only use what is documented in this README.md, and if you don't have what you need you should raise a patch to add that feature to a public API. All internal classes now have a comment at the top indicating them as private to make sure the message is clear that they are not supported as Public API.

\n\n

pg_hba_conf_defaults parameter included to turn off default pg_hba rules

\n\n

The defaults should be good enough for most cases (if not raise a bug) but if you simply need an escape hatch, this setting will turn off the defaults. If you want to do this, it may affect the rest of the module so make sure you replace the rules with something that continues operation.

\n\n

postgresql::database_user has now been removed

\n\n

Use postgresql::server::role instead.

\n\n

postgresql::psql resource has now been removed

\n\n

Use postgresql_psql instead. In the future we may recreate this as a wrapper to add extra capability, but it will not match the old behaviour.

\n\n

postgresql_default_version fact has now been removed

\n\n

It didn't make sense to have this logic in a fact any more, the logic has been moved into postgresql::params.

\n\n

ripienaar/concat is no longer used, instead we use puppetlabs/concat

\n\n

The older concat module is now deprecated and moved into the puppetlabs/concat namespace. Functionality is more or less identical, but you may need to intervene during the installing of this package - as both use the same concat namespace.

\n\n

Reference

\n\n

The postgresql module comes with many options for configuring the server. While you are unlikely to use all of the below settings, they allow you a decent amount of control over your security settings.

\n\n

Classes:

\n\n\n\n

Resources:

\n\n\n\n

Functions:

\n\n\n\n

Class: postgresql::globals

\n\n

Note: most server specific defaults should be overriden in the postgresql::server class. This class should only be used if you are using a non-standard OS or if you are changing elements such as version or manage_package_repo that can only be changed here.

\n\n

This class allows you to configure the main settings for this module in a global way, to be used by the other classes and defined resources. On its own it does nothing.

\n\n

For example, if you wanted to overwrite the default locale and encoding for all classes you could use the following combination:

\n\n
class { 'postgresql::globals':\n  encoding => 'UTF8',\n  locale   => 'en_NG',\n}->\nclass { 'postgresql::server':\n}\n
\n\n

That would make the encoding and locale the default for all classes and defined resources in this module.

\n\n

If you want to use the upstream PostgreSQL packaging, and be specific about the version you wish to download, you could use something like this:

\n\n
class { 'postgresql::globals':\n  manage_package_repo => true,\n  version             => '9.2',\n}->\nclass { 'postgresql::server': }\n
\n\n

client_package_name

\n\n

This setting can be used to override the default postgresql client package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

server_package_name

\n\n

This setting can be used to override the default postgresql server package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

contrib_package_name

\n\n

This setting can be used to override the default postgresql contrib package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

devel_package_name

\n\n

This setting can be used to override the default postgresql devel package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

java_package_name

\n\n

This setting can be used to override the default postgresql java package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

plperl_package_name

\n\n

This setting can be used to override the default postgresql PL/perl package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

python_package_name

\n\n

This setting can be used to override the default postgresql Python package name. If not specified, the module will use whatever package name is the default for your OS distro.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_status

\n\n

This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

default_database

\n\n

This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres".

\n\n

initdb_path

\n\n

Path to the initdb command.

\n\n

createdb_path

\n\n

Path to the createdb command.

\n\n

psql_path

\n\n

Path to the psql command.

\n\n

pg_hba_conf_path

\n\n

Path to your pg\\_hba.conf file.

\n\n

postgresql_conf_path

\n\n

Path to your postgresql.conf file.

\n\n

pg_hba_conf_defaults

\n\n

If false, disables the defaults supplied with the module for pg\\_hba.conf. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic psql operations for example.

\n\n

datadir

\n\n

This setting can be used to override the default postgresql data directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

confdir

\n\n

This setting can be used to override the default postgresql configuration directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

bindir

\n\n

This setting can be used to override the default postgresql binaries directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro.

\n\n

user

\n\n

This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'.

\n\n

group

\n\n

This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'.

\n\n

version

\n\n

The version of PostgreSQL to install/manage. This is a simple way of providing a specific version such as '9.2' or '8.4' for example.

\n\n

Defaults to your operating system default.

\n\n

needs_initdb

\n\n

This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro.

\n\n

encoding

\n\n

This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default.

\n\n

locale

\n\n

This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to undef which is effectively C.

\n\n

firewall_supported

\n\n

This allows you to override the automated detection to see if your OS supports the firewall module.

\n\n

manage_package_repo

\n\n

If true this will setup the official PostgreSQL repositories on your host. Defaults to false.

\n\n

Class: postgresql::server

\n\n

The following list are options that you can set in the config_hash parameter of postgresql::server.

\n\n

ensure

\n\n

This value default to present. When set to absent it will remove all packages, configuration and data so use this with extreme caution.

\n\n

version

\n\n

This will set the version of the PostgreSQL software to install. Defaults to your operating systems default.

\n\n

postgres_password

\n\n

This value defaults to undef, meaning the super user account in the postgres database is a user called postgres and this account does not have a password. If you provide this setting, the module will set the password for the postgres user to your specified value.

\n\n

package_name

\n\n

The name of the package to use for installing the server software. Defaults to the default for your OS distro.

\n\n

package_ensure

\n\n

Value to pass through to the package resource when creating the server instance. Defaults to undef.

\n\n

plperl_package_name

\n\n

This sets the default package name for the PL/Perl extension. Defaults to utilising the operating system default.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_name

\n\n

This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

service_status

\n\n

This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro.

\n\n

default_database

\n\n

This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres".

\n\n

listen_addresses

\n\n

This value defaults to localhost, meaning the postgres server will only accept connections from localhost. If you'd like to be able to connect to postgres from remote machines, you can override this setting. A value of * will tell postgres to accept connections from any remote machine. Alternately, you can specify a comma-separated list of hostnames or IP addresses. (For more info, have a look at the postgresql.conf file from your system's postgres package).

\n\n

ip_mask_deny_postgres_user

\n\n

This value defaults to 0.0.0.0/0. Sometimes it can be useful to block the superuser account from remote connections if you are allowing other database users to connect remotely. Set this to an IP and mask for which you want to deny connections by the postgres superuser account. So, e.g., the default value of 0.0.0.0/0 will match any remote IP and deny access, so the postgres user won't be able to connect remotely at all. Conversely, a value of 0.0.0.0/32 would not match any remote IP, and thus the deny rule will not be applied and the postgres user will be allowed to connect.

\n\n

ip_mask_allow_all_users

\n\n

This value defaults to 127.0.0.1/32. By default, Postgres does not allow any database user accounts to connect via TCP from remote machines. If you'd like to allow them to, you can override this setting. You might set it to 0.0.0.0/0 to allow database users to connect from any remote machine, or 192.168.0.0/16 to allow connections from any machine on your local 192.168 subnet.

\n\n

ipv4acls

\n\n

List of strings for access control for connection method, users, databases, IPv4 addresses; see postgresql documentation about pg_hba.conf for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page).

\n\n

ipv6acls

\n\n

List of strings for access control for connection method, users, databases, IPv6 addresses; see postgresql documentation about pg_hba.conf for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page).

\n\n

inidb_path

\n\n

Path to the initdb command.

\n\n

createdb_path

\n\n

Path to the createdb command.

\n\n

psql_path

\n\n

Path to the psql command.

\n\n

pg_hba_conf_path

\n\n

Path to your pg\\_hba.conf file.

\n\n

postgresql_conf_path

\n\n

Path to your postgresql.conf file.

\n\n

pg_hba_conf_defaults

\n\n

If false, disables the defaults supplied with the module for pg\\_hba.conf. This is useful if you di\nsagree with the defaults and wish to override them yourself. Be sure that your changes of course alig\nn with the rest of the module, as some access is required to perform basic psql operations for exam\nple.

\n\n

user

\n\n

This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'.

\n\n

group

\n\n

This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'.

\n\n

needs_initdb

\n\n

This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro.

\n\n

encoding

\n\n

This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default.

\n\n

locale

\n\n

This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the template1 initialization as well so it becomes a default outside of the module as well. Defaults to undef which is effectively C.

\n\n

manage_firewall

\n\n

This value defaults to false. Many distros ship with a fairly restrictive firewall configuration which will block the port that postgres tries to listen on. If you'd like for the puppet module to open this port for you (using the puppetlabs-firewall module), change this value to true. Check the documentation for puppetlabs/firewall to ensure the rest of the global setup is applied, to ensure things like persistence and global rules are set correctly.

\n\n

manage_pg_hba_conf

\n\n

This value defaults to true. Whether or not manage the pg_hba.conf. If set to true, puppet will overwrite this file. If set to false, puppet will not modify the file.

\n\n

Class: postgresql::client

\n\n

This class installs postgresql client software. Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):

\n\n

package_name

\n\n

The name of the postgresql client package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql client package resource.

\n\n

Class: postgresql::server::contrib

\n\n

Installs the postgresql contrib package.

\n\n

package_name

\n\n

The name of the postgresql client package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql contrib package resource.

\n\n

Class: postgresql::lib::devel

\n\n

Installs the packages containing the development libraries for PostgreSQL.

\n\n

package_ensure

\n\n

Override for the ensure parameter during package installation. Defaults to present.

\n\n

package_name

\n\n

Overrides the default package name for the distribution you are installing to. Defaults to postgresql-devel or postgresql<version>-devel depending on your distro.

\n\n

Class: postgresql::lib::java

\n\n

This class installs postgresql bindings for Java (JDBC). Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):

\n\n

package_name

\n\n

The name of the postgresql java package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql java package resource.

\n\n

Class: postgresql::lib::python

\n\n

This class installs the postgresql Python libraries. For customer requirements you can customise the following parameters:

\n\n

package_name

\n\n

The name of the postgresql python package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql python package resource.

\n\n

Class: postgresql::server::plperl

\n\n

This class installs the PL/Perl procedural language for postgresql.

\n\n

package_name

\n\n

The name of the postgresql PL/Perl package.

\n\n

package_ensure

\n\n

The ensure parameter passed on to postgresql PL/Perl package resource.

\n\n

Resource: postgresql::server::config_entry

\n\n

This resource can be used to modify your postgresql.conf configuration file.

\n\n

Each resource maps to a line inside your postgresql.conf file, for example:

\n\n
postgresql::server::config_entry { 'check_function_bodies':\n  value => 'off',\n}\n
\n\n

namevar

\n\n

Name of the setting to change.

\n\n

ensure

\n\n

Set to absent to remove an entry.

\n\n

value

\n\n

Value for the setting.

\n\n

Resource: postgresql::server::db

\n\n

This is a convenience resource that creates a database, user and assigns necessary permissions in one go.

\n\n

For example, to create a database called test1 with a corresponding user of the same name, you can use:

\n\n
postgresql::server::db { 'test1':\n  user     => 'test1',\n  password => 'test1',\n}\n
\n\n

namevar

\n\n

The namevar for the resource designates the name of the database.

\n\n

user

\n\n

User to create and assign access to the database upon creation. Mandatory.

\n\n

password

\n\n

Password for the created user. Mandatory.

\n\n

encoding

\n\n

Override the character set during creation of the database. Defaults to the default defined during installation.

\n\n

locale

\n\n

Override the locale during creation of the database. Defaults to the default defined during installation.

\n\n

grant

\n\n

Grant permissions during creation. Defaults to ALL.

\n\n

tablespace

\n\n

The name of the tablespace to allocate this database to. If not specifies, it defaults to the PostgreSQL default.

\n\n

istemplate

\n\n

Define database as a template. Defaults to false.

\n\n

Resource: postgresql::server::database

\n\n

This defined type can be used to create a database with no users and no permissions, which is a rare use case.

\n\n

namevar

\n\n

The name of the database to create.

\n\n

dbname

\n\n

The name of the database, defaults to the namevar.

\n\n

owner

\n\n

Name of the database user who should be set as the owner of the database. Defaults to the $user variable set in postgresql::server or postgresql::globals.

\n\n

tablespace

\n\n

Tablespace for where to create this database. Defaults to the defaults defined during PostgreSQL installation.

\n\n

encoding

\n\n

Override the character set during creation of the database. Defaults to the default defined during installation.

\n\n

locale

\n\n

Override the locale during creation of the database. Defaults to the default defined during installation.

\n\n

istemplate

\n\n

Define database as a template. Defaults to false.

\n\n

Resource: postgresql::server::database_grant

\n\n

This defined type manages grant based access privileges for users, wrapping the postgresql::server::database_grant for database specific permissions. Consult the PostgreSQL documentation for grant for more information.

\n\n

namevar

\n\n

Used to uniquely identify this resource, but functionality not used during grant.

\n\n

privilege

\n\n

Can be one of SELECT, TEMPORARY, TEMP, CONNECT. ALL is used as a synonym for CREATE. If you need to add multiple privileges, a space delimited string can be used.

\n\n

db

\n\n

Database to grant access to.

\n\n

role

\n\n

Role or user whom you are granting access for.

\n\n

psql_db

\n\n

Database to execute the grant against. This should not ordinarily be changed from the default, which is postgres.

\n\n

psql_user

\n\n

OS user for running psql. Defaults to the default user for the module, usually postgres.

\n\n

Resource: postgresql::server::pg_hba_rule

\n\n

This defined type allows you to create an access rule for pg_hba.conf. For more details see the PostgreSQL documentation.

\n\n

For example:

\n\n
postgresql::server::pg_hba_rule { 'allow application network to access app database':\n  description => "Open up postgresql for access from 200.1.2.0/24",\n  type => 'host',\n  database => 'app',\n  user => 'app',\n  address => '200.1.2.0/24',\n  auth_method => 'md5',\n}\n
\n\n

This would create a ruleset in pg_hba.conf similar to:

\n\n
# Rule Name: allow application network to access app database\n# Description: Open up postgresql for access from 200.1.2.0/24\n# Order: 150\nhost  app  app  200.1.2.0/24  md5\n
\n\n

namevar

\n\n

A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced pg_hba.conf so the originating resource can be identified.

\n\n

description

\n\n

A longer description for this rule if required. Defaults to none. This description is placed in the comments above the rule in pg_hba.conf.

\n\n

type

\n\n

The type of rule, this is usually one of: local, host, hostssl or hostnossl.

\n\n

database

\n\n

A comma separated list of databases that this rule matches.

\n\n

user

\n\n

A comma separated list of database users that this rule matches.

\n\n

address

\n\n

If the type is not 'local' you can provide a CIDR based address here for rule matching.

\n\n

auth_method

\n\n

The auth_method is described further in the pg_hba.conf documentation, but it provides the method that is used for authentication for the connection that this rule matches.

\n\n

auth_option

\n\n

For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for further details.

\n\n

order

\n\n

An order for placing the rule in pg_hba.conf. Defaults to 150.

\n\n

target

\n\n

This provides the target for the rule, and is generally an internal only property. Use with caution.

\n\n

Resource: postgresql::server::role

\n\n

This resource creates a role or user in PostgreSQL.

\n\n

namevar

\n\n

The role name to create.

\n\n

password_hash

\n\n

The hash to use during password creation. If the password is not already pre-encrypted in a format that PostgreSQL supports, use the postgresql_password function to provide an MD5 hash here, for example:

\n\n
postgresql::role { "myusername":\n  password_hash => postgresql_password('myusername', 'mypassword'),\n}\n
\n\n

createdb

\n\n

Whether to grant the ability to create new databases with this role. Defaults to false.

\n\n

createrole

\n\n

Whether to grant the ability to create new roles with this role. Defaults to false.

\n\n

login

\n\n

Whether to grant login capability for the new role. Defaults to false.

\n\n

superuser

\n\n

Whether to grant super user capability for the new role. Defaults to false.

\n\n

replication

\n\n

If true provides replication capabilities for this role. Defaults to false.

\n\n

connection_limit

\n\n

Specifies how many concurrent connections the role can make. Defaults to -1 meaning no limit.

\n\n

username

\n\n

The username of the role to create, defaults to namevar.

\n\n

Resource: postgresql::server::table_grant

\n\n

This defined type manages grant based access privileges for users. Consult the PostgreSQL documentation for grant for more information.

\n\n

namevar

\n\n

Used to uniquely identify this resource, but functionality not used during grant.

\n\n

privilege

\n\n

Can be one of SELECT, INSERT, UPDATE, REFERENCES. ALL is used as a synonym for CREATE. If you need to add multiple privileges, a space delimited string can be used.

\n\n

table

\n\n

Table to grant access on.

\n\n

db

\n\n

Database of table.

\n\n

role

\n\n

Role or user whom you are granting access for.

\n\n

psql_db

\n\n

Database to execute the grant against. This should not ordinarily be changed from the default, which is postgres.

\n\n

psql_user

\n\n

OS user for running psql. Defaults to the default user for the module, usually postgres.

\n\n

Resource: postgresql::server::tablespace

\n\n

This defined type can be used to create a tablespace. For example:

\n\n
postgresql::tablespace { 'tablespace1':\n  location => '/srv/space1',\n}\n
\n\n

It will create the location if necessary, assigning it the same permissions as your\nPostgreSQL server.

\n\n

namevar

\n\n

The tablespace name to create.

\n\n

location

\n\n

The path to locate this tablespace.

\n\n

owner

\n\n

The default owner of the tablespace.

\n\n

spcname

\n\n

Name of the tablespace. Defaults to namevar.

\n\n

Resource: postgresql::validate_db_connection

\n\n

This resource can be utilised inside composite manifests to validate that a client has a valid connection with a remote PostgreSQL database. It can be ran from any node where the PostgreSQL client software is installed to validate connectivity before commencing other dependent tasks in your Puppet manifests, so it is often used when chained to other tasks such as: starting an application server, performing a database migration.

\n\n

Example usage:

\n\n
postgresql::validate_db_connection { 'validate my postgres connection':\n  database_host           => 'my.postgres.host',\n  database_username       => 'mydbuser',\n  database_password       => 'mydbpassword',\n  database_name           => 'mydbname',\n}->\nexec { 'rake db:migrate':\n  cwd => '/opt/myrubyapp',\n}\n
\n\n

namevar

\n\n

Uniquely identify this resource, but functionally does nothing.

\n\n

database_host

\n\n

The hostname of the database you wish to test. Defaults to 'undef' which generally uses the designated local unix socket.

\n\n

database_port

\n\n

Port to use when connecting. Default to 'undef' which generally defaults to 5432 depending on your PostgreSQL packaging.

\n\n

database_name

\n\n

The name of the database you wish to test. Defaults to 'postgres'.

\n\n

database_username

\n\n

Username to connect with. Defaults to 'undef', which when using a unix socket and ident auth will be the user you are running as. If the host is remote you must provide a username.

\n\n

database_password

\n\n

Password to connect with. Can be left blank, but that is not recommended.

\n\n

run_as

\n\n

The user to run the psql command with for authenticiation. This is important when trying to connect to a database locally using Unix sockets and ident authentication. It is not needed for remote testing.

\n\n

sleep

\n\n

Upon failure, sets the number of seconds to sleep for before trying again.

\n\n

tries

\n\n

Upon failure, sets the number of attempts before giving up and failing the resource.

\n\n

create_db_first

\n\n

This will ensure the database is created before running the test. This only really works if your test is local. Defaults to true.

\n\n

Function: postgresql_password

\n\n

If you need to generate a postgres encrypted password, use postgresql_password. You can call it from your production manifests if you don't mind them containing the clear text versions of your passwords, or you can call it from the command line and then copy and paste the encrypted password into your manifest:

\n\n
$ puppet apply --execute 'notify { "test": message => postgresql_password("username", "password") }'\n
\n\n

Function: postgresql_acls_to_resources_hash(acl_array, id, order_offset)

\n\n

This internal function converts a list of pg_hba.conf based acls (passed in as an array of strings) to a format compatible with the postgresql::pg_hba_rule resource.

\n\n

This function should only be used internally by the module.

\n\n

Limitations

\n\n

Works with versions of PostgreSQL from 8.1 through 9.2.

\n\n

Current it is only actively tested with the following operating systems:

\n\n
    \n
  • Debian 6.x and 7.x
  • \n
  • Centos 5.x and 6.x
  • \n
  • Ubuntu 10.04 and 12.04
  • \n
\n\n

Although patches are welcome for making it work with other OS distros, it is considered best effort.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Tests

\n\n

There are two types of tests distributed with the module. Unit tests with rspec-puppet and system tests using rspec-system.

\n\n

For unit testing, make sure you have:

\n\n
    \n
  • rake
  • \n
  • bundler
  • \n
\n\n

Install the necessary gems:

\n\n
bundle install --path=vendor\n
\n\n

And then run the unit tests:

\n\n
bundle exec rake spec\n
\n\n

The unit tests are ran in Travis-CI as well, if you want to see the results of your own tests regsiter the service hook through Travis-CI via the accounts section for your Github clone of this project.

\n\n

If you want to run the system tests, make sure you also have:

\n\n
    \n
  • vagrant > 1.2.x
  • \n
  • Virtualbox > 4.2.10
  • \n
\n\n

Then run the tests using:

\n\n
bundle exec rake spec:system\n
\n\n

To run the tests on different operating systems, see the sets available in .nodeset.yml and run the specific set with the following syntax:

\n\n
RSPEC_SET=debian-607-x64 bundle exec rake spec:system\n
\n\n

Transfer Notice

\n\n

This Puppet module was originally authored by Inkling Systems. The maintainer preferred that Puppet Labs take ownership of the module for future improvement and maintenance as Puppet Labs is using it in the PuppetDB module. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Inkling.

\n\n

Previously: https://github.com/inkling/puppet-postgresql

\n\n

Contributors

\n\n
    \n
  • Andrew Moon
  • \n
  • Kenn Knowles (@kennknowles)
  • \n
  • Adrien Thebo
  • \n
  • Albert Koch
  • \n
  • Andreas Ntaflos
  • \n
  • Bret Comnes
  • \n
  • Brett Porter
  • \n
  • Chris Price
  • \n
  • dharwood
  • \n
  • Etienne Pelletier
  • \n
  • Florin Broasca
  • \n
  • Henrik
  • \n
  • Hunter Haugen
  • \n
  • Jari Bakken
  • \n
  • Jordi Boggiano
  • \n
  • Ken Barber
  • \n
  • nzakaria
  • \n
  • Richard Arends
  • \n
  • Spenser Gilliland
  • \n
  • stormcrow
  • \n
  • William Van Hevelingen
  • \n
\n
", "changelog": "
2013-11-05 - Version 3.2.0\n\nSummary:\n\nAdd's support for Ubuntu 13.10 (and 14.04) as well as x, y, z.\n\nFeatures:\n- Add versions for Ubuntu 13.10 and 14.04.\n- Use default_database in validate_db_connection instead of a hardcoded\n'postgres'\n- Add globals/params layering for default_database.\n- Allow specification of default database name.\n\nBugs:\n- Fixes to the README.\n\n\n2013-10-25 - Version 3.1.0\n\nSummary:\n\nThis is a minor feature and bug fix release.\n\nFirstly, the postgresql_psql type now includes a new parameter `search_path` which is equivalent to using `set search_path` which allows you to change the default schema search path.\n\nThe default version of Fedora 17 has now been added, so that Fedora 17 users can enjoy the module.\n\nAnd finally we've extended the capabilities of the defined type postgresql::validate_db_connection so that now it can handle retrying and sleeping between retries. This feature has been monopolized to fix a bug we were seeing with startup race conditions, but it can also be used by remote systems to 'wait' for PostgreSQL to start before their Puppet run continues.\n\nFeatures:\n- Defined $default_version for Fedora 17 (Bret Comnes)\n- add search_path attribute to postgresql_psql resource (Jeremy Kitchen)\n- (GH-198) Add wait and retry capability to validate_db_connection (Ken Barber)\n\nBugs:\n- enabling defined postgres user password without resetting on every puppet run (jonoterc)\n- periods are valid in configuration variables also (Jeremy Kitchen)\n- Add zero length string to join() function (Jarl Stefansson)\n- add require of install to reload class (cdenneen)\n- (GH-198) Fix race condition on postgresql startup (Ken Barber)\n- Remove concat::setup for include in preparation for the next concat release (Ken Barber)\n\n\n2013-10-14 - Version 3.0.0\n\nFinal release of 3.0, enjoy!\n\n2013-10-14 - Version 3.0.0-rc3\n\nSummary:\n\nAdd a parameter to unmanage pg_hba.conf to fix a regression from 2.5, as well\nas allowing owner to be passed into x.\n\nFeatures:\n- `manage_pg_hba_conf` parameter added to control pg_hba.conf management.\n- `owner` parameter added to server::db.\n\n2013-10-09 - Version 3.0.0-rc2\n\nSummary:\n\nA few bugfixes have been found since -rc1.\n\nFixes:\n- Special case for $datadir on Amazon\n- Fix documentation about username/password for the postgresql_hash function\n\n2013-10-01 - Version 3.0.0-rc1\n\nSummary:\n\nVersion 3 was a major rewrite to fix some internal dependency issues, and to\nmake the new Public API more clear. As a consequence a lot of things have\nchanged for version 3 and older revisions that we will try to outline here.\n\n(NOTE:  The format of this CHANGELOG differs to normal in an attempt to\nexplain the scope of changes)\n\n* Server specific objects now moved under `postgresql::server::` namespace:\n\nTo restructure server specific elements under the `postgresql::server::`\nnamespaces the following objects were renamed as such:\n\n`postgresql::database`       -> `postgresql::server::database`\n`postgresql::database_grant` -> `postgresql::server::database_grant`\n`postgresql::db`             -> `postgresql::server::db`\n`postgresql::grant`          -> `postgresql::server::grant`\n`postgresql::pg_hba_rule`    -> `postgresql::server::pg_hba_rule`\n`postgresql::plperl`         -> `postgresql::server::plperl`\n`postgresql::contrib`        -> `postgresql::server::contrib`\n`postgresql::role`           -> `postgresql::server::role`\n`postgresql::table_grant`    -> `postgresql::server::table_grant`\n`postgresql::tablespace`     -> `postgresql::server::tablespace`\n\n* New `postgresql::server::config_entry` resource for managing configuration:\n\nPreviously we used the `file_line` resource to modify `postgresql.conf`. This\nnew revision now adds a new resource named `postgresql::server::config_entry`\nfor managing this file. For example:\n\n```puppet\n    postgresql::server::config_entry { 'check_function_bodies':\n      value => 'off',\n    }\n```\n\nIf you were using `file_line` for this purpose, you should change to this new\nmethodology.\n\n* `postgresql_puppet_extras.conf` has been removed:\n\nNow that we have a methodology for managing `postgresql.conf`, and due to\nconcerns over the file management methodology using an `exec { 'touch ...': }`\nas a way to create an empty file the existing postgresql\\_puppet\\_extras.conf\nfile is no longer managed by this module.\n\nIf you wish to recreate this methodology yourself, use this pattern:\n\n```puppet\n    class { 'postgresql::server': }\n\n    $extras = "/tmp/include.conf"\n\n    file { $extras:\n      content => 'max_connections = 123',\n      notify  => Class['postgresql::server::service'],\n    }->\n    postgresql::server::config_entry { 'include':\n      value   => $extras,\n    }\n```\n\n* All uses of the parameter `charset` changed to `encoding`:\n\nSince PostgreSQL uses the terminology `encoding` not `charset` the parameter\nhas been made consisent across all classes and resources.\n\n* The `postgresql` base class is no longer how you set globals:\n\nThe old global override pattern was less then optimal so it has been fixed,\nhowever we decided to demark this properly by specifying these overrides in\nthe class `postgresql::global`. Consult the documentation for this class now\nto see what options are available.\n\nAlso, some parameter elements have been moved between this and the\n`postgresql::server` class where it made sense.\n\n* `config_hash` parameter collapsed for the `postgresql::server` class:\n\nBecause the `config_hash` was really passing data through to what was in\neffect an internal class (`postgresql::config`). And since we don't want this\nkind of internal exposure the parameters were collapsed up into the\n`postgresql::server` class directly.\n\n* Lots of changes to 'private' or 'undocumented' classes:\n\nIf you were using these before, these have changed names. You should only use\nwhat is documented in this README.md, and if you don't have what you need you\nshould raise a patch to add that feature to a public API. All internal classes\nnow have a comment at the top indicating them as private to make sure the\nmessage is clear that they are not supported as Public API.\n\n* `pg_hba_conf_defaults` parameter included to turn off default pg\\_hba rules:\n\nThe defaults should be good enough for most cases (if not raise a bug) but if\nyou simply need an escape hatch, this setting will turn off the defaults. If\nyou want to do this, it may affect the rest of the module so make sure you\nreplace the rules with something that continues operation.\n\n* `postgresql::database_user` has now been removed:\n\nUse `postgresql::server::role` instead.\n\n* `postgresql::psql` resource has now been removed:\n\nUse `postgresql_psql` instead. In the future we may recreate this as a wrapper\nto add extra capability, but it will not match the old behaviour.\n\n* `postgresql_default_version` fact has now been removed:\n\nIt didn't make sense to have this logic in a fact any more, the logic has been\nmoved into `postgresql::params`.\n\n* `ripienaar/concat` is no longer used, instead we use `puppetlabs/concat`:\n\nThe older concat module is now deprecated and moved into the\n`puppetlabs/concat` namespace. Functionality is more or less identical, but\nyou may need to intervene during the installing of this package - as both use\nthe same `concat` namespace.\n\n2013-09-09 Release 2.5.0\n=======================\n\nSummary\n-------\n\nThe focus of this release is primarily to capture the fixes done to the\ntypes and providers to make sure refreshonly works properly and to set\nthe stage for the large scale refactoring work of 3.0.0.\n\nFeatures\n--------\n\nBugfixes \n--------\n- Use boolean for refreshonly.\n- Fix postgresql::plperl documentation.\n- Add two missing parameters to config::beforeservice\n- Style fixes\n\n\n2013-08-01 Release 2.4.1\n========================\n\nSummary\n-------\n\nThis minor bugfix release solves an idempotency issue when using plain text\npasswords for the password_hash parameter for the postgresql::role defined\ntype. Without this, users would continually see resource changes everytime\nyour run Puppet.\n\nBugfixes\n---------\n- Alter role call not idempotent with cleartext passwords (Ken Barber)\n\n2013-07-19 Release 2.4.0\n========================\n\nSummary\n-------\nThis updates adds the ability to change permissions on tables, create template\ndatabases from normal databases, manage PL-Perl's postgres package, and\ndisable the management of `pg_hba.conf`.\n\nFeatures\n--------\n- Add `postgresql::table_grant` defined resource\n- Add `postgresql::plperl` class\n- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class\n- Add `istemplate` parameter to the `postgresql::database` define\n\nBugfixes\n--------\n- Update `postgresql::role` class to be able to update roles when modified\ninstead of only on creation.\n- Update tests\n- Fix documentation of `postgresql::database_grant`\n\n2.3.0\n=====\n\nThis feature release includes the following changes:\n\n* Add a new parameter `owner` to the `database` type.  This can be used to\n  grant ownership of a new database to a specific user.  (Bruno Harbulot)\n* Add support for operating systems other than Debian/RedHat, as long as the\n  user supplies custom values for all of the required paths, package names, etc.\n  (Chris Price)\n* Improved integration testing (Ken Barber)\n\n2.2.1\n=====\n\nThis release fixes a bug whereby one of our shell commands (psql) were not ran from a globally accessible directory. This was causing permission denied errors when the command attempted to change user without changing directory.\n\nUsers of previous versions might have seen this error:\n\n    Error: Error executing SQL; psql returned 256: 'could not change directory to "/root"\n\nThis patch should correct that.\n\n#### Detail Changes\n\n* Set /tmp as default CWD for postgresql_psql\n\n2.2.0\n=====\n\nThis feature release introduces a number of new features and bug fixes.\n\nFirst of all it includes a new class named `postgresql::python` which provides you with a convenient way of install the python Postgresql client libraries.\n\n    class { 'postgresql::python':\n    }\n\nYou are now able to use `postgresql::database_user` without having to specify a password_hash, useful for different authentication mechanisms that do not need passwords (ie. cert, local etc.).\n\nWe've also provided a lot more advanced custom parameters now for greater control of your Postgresql installation. Consult the class documentation for PuppetDB in the README.\n\nThis release in particular has largely been contributed by the community members below, a big thanks to one and all.\n\n#### Detailed Changes\n\n* Add support for psycopg installation (Flaper Fesp and Dan Prince)\n* Added default PostgreSQL version for Ubuntu 13.04 (Kamil Szymanski)\n* Add ability to create users without a password (Bruno Harbulot)\n* Three Puppet 2.6 fixes (Dominic Cleal)\n* Add explicit call to concat::setup when creating concat file (Dominic Cleal)\n* Fix readme typo (Jordi Boggiano)\n* Update postgres_default_version for Ubuntu (Kamil Szymanski)\n* Allow to set connection for noew role (Kamil Szymanski)\n* Fix pg_hba_rule for postgres local access (Kamil Szymanski)\n* Fix versions for travis-ci (Ken Barber)\n* Add replication support (Jordi Boggiano)\n* Cleaned up and added unit tests (Ken Barber)\n* Generalization to provide more flexability in postgresql configuration (Karel Brezina)\n* Create dependent directory for sudoers so tests work on Centos 5 (Ken Barber)\n* Allow SQL commands to be run against a specific DB (Carlos Villela)\n* Drop trailing comma to support Puppet 2.6 (Michael Arnold)\n\n2.1.1\n=====\n\nThis release provides a bug fix for RHEL 5 and Centos 5 systems, or specifically systems using PostgreSQL 8.1 or older. On those systems one would have received the error:\n\n    Error: Could not start Service[postgresqld]: Execution of ‘/sbin/service postgresql start’ returned 1:\n\nAnd the postgresql log entry:\n\n    FATAL: unrecognized configuration parameter "include"\n\nThis bug is due to a new feature we had added in 2.1.0, whereby the `include` directive in `postgresql.conf` was not compatible. As a work-around we have added checks in our code to make sure systems running PostgreSQL 8.1 or older do not have this directive added.\n\n#### Detailed Changes\n\n2013-01-21 - Ken Barber <ken@bob.sh>\n* Only install `include` directive and included file on PostgreSQL >= 8.2\n* Add system tests for Centos 5\n\n2.1.0\n=====\n\nThis release is primarily a feature release, introducing some new helpful constructs to the module.\n\nFor starters, we've added the line `include 'postgresql_conf_extras.conf'` by default so extra parameters not managed by the module can be added by other tooling or by Puppet itself. This provides a useful escape-hatch for managing settings that are not currently managed by the module today.\n\nWe've added a new defined resource for managing your tablespace, so you can now create new tablespaces using the syntax:\n\n    postgresql::tablespace { 'dbspace':\n      location => '/srv/dbspace',\n    }\n\nWe've added a locale parameter to the `postgresql` class, to provide a default. Also the parameter has been added to the `postgresql::database` and `postgresql::db` defined resources for changing the locale per database:\n\n    postgresql::db { 'mydatabase':\n      user     => 'myuser',\n      password => 'mypassword',\n      encoding => 'UTF8',\n      locale   => 'en_NG',\n    }\n\nThere is a new class for installing the necessary packages to provide the PostgreSQL JDBC client jars:\n\n    class { 'postgresql::java': }\n\nAnd we have a brand new defined resource for managing fine-grained rule sets within your pg_hba.conf access lists:\n\n    postgresql::pg_hba { 'Open up postgresql for access from 200.1.2.0/24':\n      type => 'host',\n      database => 'app',\n      user => 'app',\n      address => '200.1.2.0/24',\n      auth_method => 'md5',\n    }\n\nFinally, we've also added Travis-CI support and unit tests to help us iterate faster with tests to reduce regression. The current URL for these tests is here: https://travis-ci.org/puppetlabs/puppet-postgresql. Instructions on how to run the unit tests available are provided in the README for the module.\n\nA big thanks to all those listed below who made this feature release possible :-).\n\n#### Detailed Changes\n\n2013-01-18 - Simão Fontes <simaofontes@gmail.com> & Flaper Fesp <flaper87@gmail.com>\n* Remove trailing commas from params.pp property definition for Puppet 2.6.0 compatibility\n\n2013-01-18 - Lauren Rother <lauren.rother@puppetlabs.com>\n* Updated README.md to conform with best practices template\n\n2013-01-09 - Adrien Thebo <git@somethingsinistral.net>\n* Update postgresql_default_version to 9.1 for Debian 7.0\n\n2013-01-28 - Karel Brezina <karel.brezina@gmail.com>\n* Add support for tablespaces\n\n2013-01-16 - Chris Price <chris@puppetlabs.com> & Karel Brezina <karel.brezina@gmail.com>\n* Provide support for an 'include' config file 'postgresql_conf_extras.conf' that users can modify manually or outside of the module.\n\n2013-01-31 - jv <jeff@jeffvier.com>\n* Fix typo in README.pp for postgresql::db example\n\n2013-02-03 - Ken Barber <ken@bob.sh>\n* Add unit tests and travis-ci support\n\n2013-02-02 - Ken Barber <ken@bob.sh>\n* Add locale parameter support to the 'postgresql' class\n\n2013-01-21 - Michael Arnold <github@razorsedge.org>\n* Add a class for install the packages containing the PostgreSQL JDBC jar\n\n2013-02-06 - fhrbek <filip.hbrek@gmail.com>\n* Coding style fixes to reduce warnings in puppet-lint and Geppetto\n\n2013-02-10 - Ken Barber <ken@bob.sh>\n* Provide new defined resource for managing pg_hba.conf\n\n2013-02-11 - Ken Barber <ken@bob.sh>\n* Fix bug with reload of Postgresql on Redhat/Centos\n\n2013-02-15 - Erik Dalén <dalen@spotify.com>\n* Fix more style issues to reduce warnings in puppet-lint and Geppetto\n\n2013-02-15 - Erik Dalén <dalen@spotify.com>\n* Fix case whereby we were modifying a hash after creation\n\n2.0.1\n=====\n\nMinor bugfix release.\n\n2013-01-16 - Chris Price <chris@puppetlabs.com>\n * Fix revoke command in database.pp to support postgres 8.1 (43ded42)\n\n2013-01-15 - Jordi Boggiano <j.boggiano@seld.be>\n * Add support for ubuntu 12.10 status (3504405)\n\n2.0.0\n=====\n\nMany thanks to the following people who contributed patches to this\nrelease:\n\n* Adrien Thebo\n* Albert Koch\n* Andreas Ntaflos\n* Brett Porter\n* Chris Price\n* dharwood\n* Etienne Pelletier\n* Florin Broasca\n* Henrik\n* Hunter Haugen\n* Jari Bakken\n* Jordi Boggiano\n* Ken Barber\n* nzakaria\n* Richard Arends\n* Spenser Gilliland\n* stormcrow\n* William Van Hevelingen\n\nNotable features:\n\n   * Add support for versions of postgres other than the system default version\n     (which varies depending on OS distro).  This includes optional support for\n     automatically managing the package repo for the "official" postgres yum/apt\n     repos.  (Major thanks to Etienne Pelletier <epelletier@maestrodev.com> and\n     Ken Barber <ken@bob.sh> for their tireless efforts and patience on this\n     feature set!)  For example usage see `tests/official-postgresql-repos.pp`.\n\n   * Add some support for Debian Wheezy and Ubuntu Quantal\n\n   * Add new `postgres_psql` type with a Ruby provider, to replace the old\n     exec-based `psql` type.  This gives us much more flexibility around\n     executing SQL statements and controlling their logging / reports output.\n\n   * Major refactor of the "spec" tests--which are actually more like\n     acceptance tests.  We now support testing against multiple OS distros\n     via vagrant, and the framework is in place to allow us to very easily add\n     more distros.  Currently testing against Cent6 and Ubuntu 10.04.\n\n   * Fixed a bug that was preventing multiple databases from being owned by the\n     same user\n     (9adcd182f820101f5e4891b9f2ff6278dfad495c - Etienne Pelletier <epelletier@maestrodev.com>)\n\n   * Add support for ACLs for finer-grained control of user/interface access\n     (b8389d19ad78b4fb66024897097b4ed7db241930 - dharwood <harwoodd@cat.pdx.edu>)\n\n   * Many other bug fixes and improvements!\n\n\n1.0.0\n=====\n2012-09-17 - Version 0.3.0 released\n\n2012-09-14 - Chris Price <chris@puppetlabs.com>\n * Add a type for validating a postgres connection (ce4a049)\n\n2012-08-25 - Jari Bakken <jari.bakken@gmail.com>\n * Remove trailing commas. (e6af5e5)\n\n2012-08-16 - Version 0.2.0 released\n
", "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2013 Puppet Labs\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-11-05 13:22:50 -0800", "updated_at": "2013-11-05 13:22:50 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-postgresql-3.2.0", "version": "3.2.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.1.0", "version": "3.1.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0-rc2", "version": "3.0.0-rc2" }, { "uri": "/v3/releases/puppetlabs-postgresql-3.0.0-rc1", "version": "3.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.5.0", "version": "2.5.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.4.1", "version": "2.4.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.4.0", "version": "2.4.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.3.0", "version": "2.3.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.2.1", "version": "2.2.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.2.0", "version": "2.2.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.1.1", "version": "2.1.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-postgresql-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-postgresql-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-postgresql", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-ntp", "name": "ntp", "downloads": 63676, "created_at": "2011-06-16 23:31:17 -0700", "updated_at": "2014-01-06 14:40:58 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-ntp-3.0.1", "module": { "uri": "/v3/modules/puppetlabs-ntp", "name": "ntp", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.0.1", "metadata": { "name": "puppetlabs-ntp", "version": "3.0.1", "summary": "NTP Module", "author": "Puppet Labs", "description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 0.1.6" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "909729694bab62c1e36001512b68a8fd", ".nodeset.yml": "8d1b7762d4125ce53379966a1daf355c", ".travis.yml": "193ec2b14cc9644c88f4249422580da2", "CHANGELOG.md": "f480232791b05bbe9041ad08155ef8e0", "CONTRIBUTING.md": "2ef1d6f4417dde9af6c7f46f5c8a864b", "Gemfile": "2261b2606c6eba618ce07800eebb3d00", "Gemfile.lock": "c29fc13e97b6b56301bf208854e3258b", "LICENSE": "f0b6fdc310531526f257378d7bad0044", "Modulefile": "4e03453a8ee0f4cc61ae3558536fa2ed", "README.markdown": "4be793ae578227e267a6391dcc5a10d9", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "manifests/config.pp": "8d9afb6e4327277c96c5617ad687043a", "manifests/init.pp": "ae9da639adaea106a2b581256ee14626", "manifests/install.pp": "ac33c5733f4321a9af7a4735265c1986", "manifests/params.pp": "c45f8e67ac00ddd773618f20b9db73e9", "manifests/service.pp": "350238b50e9cb896d270a2c76a64334f", "spec/acceptance/basic_spec.rb": "1da5abd2e5db6ecb2244a1434965cecd", "spec/acceptance/class_spec.rb": "e29605c62985d081f77b32b3ec34c522", "spec/acceptance/nodesets/centos-64-x64.yml": "0e4558adc2f95b661535f866ee14d7af", "spec/acceptance/nodesets/default.yml": "0e4558adc2f95b661535f866ee14d7af", "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "2e3662e93d5f23128147f28b9017fd99", "spec/acceptance/ntp_config_spec.rb": "f0e57d313f1587adc6669fe3ddc03258", "spec/acceptance/ntp_install_spec.rb": "5381832b14caf9bd21b7ddd41318446a", "spec/acceptance/ntp_parameters_spec.rb": "c65e8f41119df1599c59530afa4f13be", "spec/acceptance/ntp_service_spec.rb": "368fb33ff6663657349a5d5f519727f9", "spec/acceptance/preferred_servers_spec.rb": "33c423e397534a43db4cc9366ff76c1c", "spec/acceptance/restrict_spec.rb": "83173f6fd4ecbccb652aee071e4ee674", "spec/classes/ntp_spec.rb": "f8ac7807b2beafc5fdbad42e0c04326e", "spec/fixtures/modules/my_ntp/templates/ntp.conf.erb": "566e373728e9b13eda516115ff0a9fb0", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_acceptance.rb": "b5175e829a99c4a02178dcfccc2ba3b3", "spec/unit/puppet/provider/README.markdown": "e52668944ee6af2fb5d5b9e798342645", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94", "templates/ntp.conf.erb": "178afa2b9fa1f25851cb4d7eb7a957a9", "tests/init.pp": "d398e7687ec1d893ef23d1b7d2afc094" }, "source": "git://github.com/puppetlabs/puppetlabs-ntp", "project_page": "http://github.com/puppetlabs/puppetlabs-ntp", "license": "Apache Version 2.0" }, "tags": [ "ntp", "time", "archlinux", "gentoo", "aix", "debian", "ubuntu", "rhel", "centos", "ntpd", "ntpserver" ], "file_uri": "/v3/files/puppetlabs-ntp-3.0.1.tar.gz", "file_size": 17618, "file_md5": "c8ddf9b8b9790ee049de123ef91cdcad", "downloads": 2548, "readme": "

ntp

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What the module does and why it is useful
  4. \n
  5. Setup - The basics of getting started with ntp\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

The NTP module installs, configures, and manages the ntp service.

\n\n

Module Description

\n\n

The NTP module handles running NTP across a range of operating systems and\ndistributions. Where possible we use the upstream ntp templates so that the\nresults closely match what you'd get if you modified the package default conf\nfiles.

\n\n

Setup

\n\n

What ntp affects

\n\n
    \n
  • ntp package.
  • \n
  • ntp configuration file.
  • \n
  • ntp service.
  • \n
\n\n

Beginning with ntp

\n\n

include '::ntp' is enough to get you up and running. If you wish to pass in\nparameters like which servers to use then you can use:

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

Usage

\n\n

All interaction with the ntp module can do be done through the main ntp class.\nThis means you can simply toggle the options in the ntp class to get at the\nfull functionality.

\n\n

I just want NTP, what's the minimum I need?

\n\n
include '::ntp'\n
\n\n

I just want to tweak the servers, nothing else.

\n\n
class { '::ntp':\n  servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n}\n
\n\n

I'd like to make sure I restrict who can connect as well.

\n\n
class { '::ntp':\n  servers  => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict => ['127.0.0.1'],\n}\n
\n\n

I'd like to opt out of having the service controlled, we use another tool for that.

\n\n
class { '::ntp':\n  servers        => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict       => ['127.0.0.1'],\n  manage_service => false,\n}\n
\n\n

Looks great! But I'd like a different template, we need to do something unique here.

\n\n
class { '::ntp':\n  servers         => [ 'ntp1.corp.com', 'ntp2.corp.com' ],\n  restrict        => ['127.0.0.1'],\n  manage_service  => false,\n  config_template => 'different/module/custom.template.erb',\n}\n
\n\n

Reference

\n\n

Classes

\n\n
    \n
  • ntp: Main class, includes all the rest.
  • \n
  • ntp::install: Handles the packages.
  • \n
  • ntp::config: Handles the configuration file.
  • \n
  • ntp::service: Handles the service.
  • \n
\n\n

Parameters

\n\n

The following parameters are available in the ntp module

\n\n

autoupdate

\n\n

Deprecated: This parameter previously determined if the ntp module should be\nautomatically updated to the latest version available. Replaced by package_\nensure.

\n\n

config

\n\n

This sets the file to write ntp configuration into.

\n\n

config_template

\n\n

This determines which template puppet should use for the ntp configuration.

\n\n

driftfile

\n\n

This sets the location of the driftfile for ntp.

\n\n

keys_controlkey

\n\n

Which of the keys is used as the control key.

\n\n

keys_enable

\n\n

Should the ntp keys functionality be enabled.

\n\n

keys_file

\n\n

Location of the keys file.

\n\n

keys_requestkey

\n\n

Which of the keys is used as the request key.

\n\n

package_ensure

\n\n

This can be set to 'present' or 'latest' or a specific version to choose the\nntp package to be installed.

\n\n

package_name

\n\n

This determines the name of the package to install.

\n\n

panic

\n\n

This determines if ntp should 'panic' in the event of a very large clock skew.\nWe set this to false if you're on a virtual machine by default as they don't\ndo a great job with keeping time.

\n\n

preferred_servers

\n\n

List of ntp servers to prefer. Will append prefer for any server in this list\nthat also appears in the servers list.

\n\n

restrict

\n\n

This sets the restrict options in the ntp configuration. The lines are\npreappended with restrict so you just need to list the rest of the restriction.

\n\n

servers

\n\n

This selects the servers to use for ntp peers.

\n\n

service_enable

\n\n

This determines if the service should be enabled at boot.

\n\n

service_ensure

\n\n

This determines if the service should be running or not.

\n\n

service_manage

\n\n

This selects if puppet should manage the service in the first place.

\n\n

service_name

\n\n

This selects the name of the ntp service for puppet to manage.

\n\n

udlc

\n\n

Enables configs for undisciplined local clock regardless of\nstatus as a virtual machine.

\n\n

Limitations

\n\n

This module has been built on and tested against Puppet 2.7 and higher.

\n\n

The module has been tested on:

\n\n
    \n
  • RedHat Enterprise Linux 5/6
  • \n
  • Debian 6/7
  • \n
  • CentOS 5/6
  • \n
  • Ubuntu 12.04
  • \n
  • Gentoo
  • \n
  • Arch Linux
  • \n
  • FreeBSD
  • \n
\n\n

Testing on other platforms has been light and cannot be guaranteed.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": "

2013-12-17 Release 3.0.1

\n\n

Summary:

\n\n

Work around a packaging bug with symlinks, no other functional changes.

\n\n

2013-12-13 Release 3.0.0

\n\n

Summary:

\n\n

Final release of 3.0, enjoy!

\n\n

2013-10-14 - Version 3.0.0-rc1

\n\n

Summary:

\n\n

This release changes the behavior of restrict and adds AIX osfamily support.

\n\n

Backwards-incompatible Changes:

\n\n

restrict no longer requires you to pass in parameters as:

\n\n

restrict => [ 'restrict x', 'restrict y' ]

\n\n

but just as:

\n\n

restrict => [ 'x', 'y' ]

\n\n

As the template now prefixes each line with restrict.

\n\n

Features:

\n\n
    \n
  • Change the behavior of restrict so you no longer need the restrict\nkeyword.
  • \n
  • Add udlc parameter to enable undisciplined local clock regardless of the\nmachines status as a virtual machine.
  • \n
  • Add AIX support.
  • \n
\n\n

Fixes:

\n\n
    \n
  • Use class{} instead of including and then anchoring. (style)
  • \n
  • Extend Gentoo coverage to Facter 1.7.
  • \n
\n\n

2013-09-05 - Version 2.0.1

\n\n

Summary:

\n\n

Correct the LICENSE file.

\n\n

Bugfixes:

\n\n
    \n
  • Add in the appropriate year and name in LICENSE.
  • \n
\n\n

2013-07-31 - Version 2.0.0

\n\n

Summary:

\n\n

The 2.0 release focuses on merging all the distro specific\ntemplates into a single reusable template across all platforms.

\n\n

To aid in that goal we now allow you to change the driftfile,\nntp keys, and perferred_servers.

\n\n

Backwards-incompatible changes:

\n\n

As all the distro specific templates have been removed and a\nunified one created you may be missing functionality you\npreviously relied on. Please test carefully before rolling\nout globally.

\n\n

Configuration directives that might possibly be affected:

\n\n
    \n
  • filegen
  • \n
  • fudge (for virtual machines)
  • \n
  • keys
  • \n
  • logfile
  • \n
  • restrict
  • \n
  • restrictkey
  • \n
  • statistics
  • \n
  • trustedkey
  • \n
\n\n

Features:

\n\n
    \n
  • All templates merged into a single template.
  • \n
  • NTP Keys support added.
  • \n
  • Add preferred servers support.
  • \n
  • Parameters in ntp class:\n\n
      \n
    • driftfile: path for the ntp driftfile.
    • \n
    • keys_enable: Enable NTP keys feature.
    • \n
    • keys_file: Path for the NTP keys file.
    • \n
    • keys_trusted: Which keys to trust.
    • \n
    • keys_controlkey: Which key to use for the control key.
    • \n
    • keys_requestkey: Which key to use for the request key.
    • \n
    • preferred_servers: Array of servers to prefer.
    • \n
    • restrict: Array of restriction options to apply.
    • \n
  • \n
\n\n

2013-07-15 - Version 1.0.1\nBugfixes:

\n\n
    \n
  • Fix deprecated warning in autoupdate parameter.
  • \n
  • Correctly quote is_virtual fact.
  • \n
\n\n

2013-07-08 - Version 1.0.0\nFeatures:

\n\n
    \n
  • Completely refactored to split across several classes.
  • \n
  • rspec-puppet tests rewritten to cover more options.
  • \n
  • rspec-system tests added.
  • \n
  • ArchLinux handled via osfamily instead of special casing.
  • \n
  • parameters in ntp class:\n\n
      \n
    • autoupdate: deprecated in favor of directly setting package_ensure.
    • \n
    • panic: set to false if you wish to allow large clock skews.
    • \n
  • \n
\n\n

2011-11-10 Dan Bode dan@puppetlabs.com - 0.0.4\nAdd Amazon Linux as a supported platform\nAdd unit tests\n2011-06-16 Jeff McCune jeff@puppetlabs.com - 0.0.3\nInitial release under puppetlabs

\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [2013] [Puppet Labs]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-12-17 09:05:18 -0800", "updated_at": "2013-12-17 09:05:18 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-ntp-3.0.1", "version": "3.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-3.0.0-rc1", "version": "3.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-2.0.0-rc1", "version": "2.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-ntp-1.0.0-rc1", "version": "1.0.0-rc1" }, { "uri": "/v3/releases/puppetlabs-ntp-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-ntp-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-ntp-0.0.3", "version": "0.0.3" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-ntp", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/example42-puppi", "name": "puppi", "downloads": 49236, "created_at": "2012-08-23 07:37:04 -0700", "updated_at": "2014-01-06 14:41:34 -0800", "owner": { "uri": "/v3/users/example42", "username": "example42", "gravatar_id": "3b9afc574837c445c9550f035135f043" }, "current_release": { "uri": "/v3/releases/example42-puppi-2.1.7", "module": { "uri": "/v3/modules/example42-puppi", "name": "puppi", "owner": { "uri": "/v3/users/example42", "username": "example42", "gravatar_id": "3b9afc574837c445c9550f035135f043" } }, "version": "2.1.7", "metadata": { "name": "example42-puppi", "version": "2.1.7", "source": "git://github.com/example42/puppi", "author": "lab42", "license": "Apache", "summary": "Installs and configures Puppi", "description": "This module provides the Puppi libraries required by Example42 modules and, if explicitely included, the puppi command, its working environment, the defines and procedures to deploy applications", "project_page": "http://www.example42.com", "dependencies": [ ], "types": [ ], "checksums": { "LICENSE": "a300b604c66de62cf6e923cca89c9d83", "Modulefile": "ff6f1455c4544414ddb250529123839f", "README.md": "841eaaae1b8eb0fd3bbe06917ddd31de", "README_check.md": "70d0a35d81249b140da94b1d9605a944", "README_deploy.md": "ebcd455453309277bcc278773336a7c9", "README_info.md": "1166c439d71f86e92f21a0879a492e15", "README_log.md": "7423f9bc977faee3cf5e01de9970995b", "Rakefile": "f6c685620eb850c579e290caeb550255", "composer.json": "7ff570e65ab8ab39d8f5598fe6488812", "files/info/readme/readme": "06bf19257e085da580d16ccdd2eebcbe", "files/info/readme/readme-default": "e616e48f90bf4b3fc3310f0152b7d5f8", "files/mailpuppicheck": "84695eb34ff03140deb6cb852f8c4748", "files/mcollective/mc-puppi": "9a2b7f95beafd634da2c4676fbaf405a", "files/mcollective/puppi.ddl": "6c1c486c599d44e2a23ae3cb81340389", "files/mcollective/puppi.rb": "ef6a3f59b86a3e87c2ae680b67d028bb", "files/mcollective/puppicheck": "7ed29b684b0304888594d536505ecf4f", "files/mcollective/puppideploy": "c56d5b12f370edf69f2f6557987cc0cc", "files/scripts/archive.sh": "ca8db4924a4a0837bb65c163afd37974", "files/scripts/check_project.sh": "27b135bcb519fac089ca99c0c6d2d2db", "files/scripts/checkwardir.sh": "dc75eb521c56b3c8310b16d3446e004e", "files/scripts/clean_filelist.sh": "d6dcfead938cc02daa696fa11ca6837d", "files/scripts/database.sh": "adaa39d289ed0d5624d58f0452509df6", "files/scripts/delete.sh": "bae2b996773ffc73635b990e33c05417", "files/scripts/deploy.sh": "b4bdcc74f92e6038ff25b89f109ed8c0", "files/scripts/deploy_files.sh": "147bf6b2d474056e8b75ada19de1fe81", "files/scripts/execute.sh": "5cbec7f5a82a877c0d156a6c0182df9e", "files/scripts/firewall.sh": "4d1cce1a3e5f12b40b442374868090ea", "files/scripts/functions": "27ca12a2ce15eceba874ae7628484949", "files/scripts/get_file.sh": "2e0015ace17adf33fa6f943bac005d1d", "files/scripts/get_filesfromlist.sh": "055bd95fa3a9882fbd3032e074f86f42", "files/scripts/get_maven_files.sh": "26f62cd4c6ad2942ab9bd3c9feba5609", "files/scripts/get_metadata.sh": "f67a2bdbf5113b15f15c3361988dd8c7", "files/scripts/git.sh": "9276bb790bf1e35266b20e30a6418ea9", "files/scripts/header": "f1ab14362a6f161ea2688def9b6a46ee", "files/scripts/predeploy.sh": "04104f7d21719568a9b356b980e024ed", "files/scripts/predeploy_tar.sh": "42a27d4defbc8bb2e8625a66c604cb76", "files/scripts/report_mail.sh": "5d5a3809f125b6db0a9382fb08e39ae5", "files/scripts/report_mongo.sh": "da2885f654b751b282fec08f4507d26e", "files/scripts/service.sh": "b4311afb8700afee1d893d5c6fcb6867", "files/scripts/svn.sh": "962a730fb7fa8b335aa932ace975aba2", "files/scripts/wait.sh": "5862b4df7916deb044444260cf5ac19b", "files/scripts/yant.sh": "b715c2ea21000f0d73e89f0d70e90e76", "files/scripts/yum.sh": "64ed8c7d79d89376ea86cf06aa4cb6eb", "lib/facter/last_run.rb": "75c871bd5262d1830c6a64d0ba3d8153", "lib/facter/puppi_projects.rb": "52c607131dc7a65db70d52f60e19bd09", "lib/puppet/parser/functions/any2bool.rb": "9a33c68686b26701e2289f553bed78e5", "lib/puppet/parser/functions/bool2ensure.rb": "7ed40cbdcb65556f5c9295a4088422a8", "lib/puppet/parser/functions/get_class_args.rb": "3a830d0d3af0f7c30002fa0213ccf555", "lib/puppet/parser/functions/get_magicvar.rb": "24c1abf9c43e7cf7290efeda7d5dd403", "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "lib/puppet/parser/functions/is_array.rb": "11696f865c1e4ada60769b033bdb88c8", "lib/puppet/parser/functions/nslookup.rb": "976cfe36eec535d97a17139c7408f0bd", "lib/puppet/parser/functions/options_lookup.rb": "5b5f8291e4b20c2aa31488b0ffe680b2", "lib/puppet/parser/functions/params_lookup.rb": "926e9ce38835bb63a9307b48d03d1495", "lib/puppet/parser/functions/url_parse.rb": "71d6f11070d1dc00f3dcad71a23f570a", "manifests/check.pp": "6e7cee7085a4e96a8e3a35fa0363bf9a", "manifests/configure.pp": "a14babd82aa428e0c5dc2b953797411f", "manifests/dependencies.pp": "91b2f9861af686f2860dc50e5b808c00", "manifests/deploy.pp": "1026044e262d37d195b085da68f4f28d", "manifests/extras.pp": "61dbacd5d1b5ce76f0f06f7298fa2fcc", "manifests/helper.pp": "79e26cc44408258cec33af1dad16d626", "manifests/helpers.pp": "87725d1e0325807b457d2eb818bf9f9f", "manifests/info/instance.pp": "6aba3dd55088f807ac29c7a25d5aa36f", "manifests/info/module.pp": "0ef6b568271ed5ed7abea8e818326e55", "manifests/info/readme.pp": "429cdfb835d74d6281cfa05da664aebd", "manifests/info.pp": "485dbbd21c0c7f170db82389007dc8bd", "manifests/init.pp": "277a01514ae936729280b04cfa00e490", "manifests/initialize.pp": "23b915dca649b37536bbdd67b7f7a71b", "manifests/install_packages.pp": "3bd7b1aadcd5b39f3a4c4da273e1bc4b", "manifests/log.pp": "8cf0a7411cee99d597b61087deaca99c", "manifests/mcollective/client.pp": "1636138a9fe14bb39e8208ce50934d17", "manifests/mcollective/server.pp": "b3720c6a73a867ca89f586593fd68201", "manifests/netinstall.pp": "3b367da40b530aa213da596d7cc9df02", "manifests/one.pp": "49cad03455a2518a2c1f322acd131c8f", "manifests/params.pp": "80b072f18f54fafbf07ea39b06869421", "manifests/project/README": "fdce58e91a1e10b3550f74ccbdbed6db", "manifests/project/archive.pp": "d084317057d8c4c5957ba39795909729", "manifests/project/builder.pp": "a8c8ccbf8f5af6072f29b3d7c5006af0", "manifests/project/dir.pp": "f255690d962445227ede91206bccb32b", "manifests/project/files.pp": "4b57a2bf78a7849ba910761f9132ab23", "manifests/project/git.pp": "35556cc52c9c24d95989190b2f6b623e", "manifests/project/maven.pp": "73429125f5ab07a9ae6e85f7e5032f03", "manifests/project/mysql.pp": "9756330d69d02272f04441292c6a5d36", "manifests/project/service.pp": "a9da84e72e0b3b135cd1f5b869bee1d5", "manifests/project/svn.pp": "691031e70b3a2a6414488e855d11118c", "manifests/project/tar.pp": "212045756022bf0c788611a765acfb07", "manifests/project/war.pp": "587796927ade79f63dde9495f99977a5", "manifests/project/y4maven.pp": "2b833923fd7be1d1022c55d3b98638be", "manifests/project/yum.pp": "7be17b59b039d97b9525a8cb50734768", "manifests/project.pp": "16bc44ff117859cf56b0cbbd1e64f722", "manifests/report.pp": "a612afd476da3810adbe62d357a1aa3b", "manifests/rollback.pp": "4a120841f544ebf490edc7d7952dcb0e", "manifests/run.pp": "c3c582c1f65c055b42da62dbb6fa3b1f", "manifests/runscript.pp": "05c536e2467d46d2e9b27cc3281662ee", "manifests/skel.pp": "8554eb98ec88920cbda289cfecd2d17b", "manifests/todo.pp": "d15e28813a53db8f1a71f7af89ae36d8", "manifests/two.pp": "09eb667da8dae6a01375eb87cad056ef", "manifests/ze.pp": "48636f3ce7bde860ab8767ac234b6bb7", "spec/classes/puppi_spec.rb": "cee8cf5b5c215fb5332570daec9dd8eb", "spec/defines/puppi_check_spec.rb": "ab5ec71f8d9b31ba6221f28a2c663c57", "spec/defines/puppi_deploy_spec.rb": "c5ced8a1a24d8ad828bcef911f2c01af", "spec/defines/puppi_helper_spec.rb": "62c110560da853ddd933af253d7b8590", "spec/defines/puppi_info_spec.rb": "e8cd4f1dd7f7b57fcd68cc751e5180a6", "spec/defines/puppi_initialize_spec.rb": "3349c9bb1addfcb2a98626247af2e57c", "spec/defines/puppi_log_spec.rb": "08617c3632ede09d78032b0382f5d782", "spec/defines/puppi_project_spec.rb": "793e2f06b7358db2c17c40d2c9c80e47", "spec/defines/puppi_report_spec.rb": "793e2f06b7358db2c17c40d2c9c80e47", "spec/defines/puppi_rollback_spec.rb": "42e19b4b726967bd652a8130999bedb8", "spec/defines/puppi_run_spec.rb": "388b0fd66b8c5a9b097e05160f777c04", "spec/defines/puppi_todo_spec.rb": "7582ba7af6fc2ec52c6cccdd0080ce6c", "spec/defines/puppi_ze_spec.rb": "d6c2723cf8a2cb8cab6668144eef7404", "spec/functions/any2bool_spec.rb": "6cd6e460c38949804bd69705e436308e", "spec/functions/bool2ensure_spec.rb": "6cc4be146c1e99662b6c0705ddfb67ec", "spec/functions/url_parse_spec.rb": "81085d9352473e1e778a93eae9b8ad8c", "spec/spec_helper.rb": "cf39b83c5f7bc1bdae838a28ba4e60ec", "templates/helpers/standard.yml.erb": "548abd81aee56803c73ac41c60f97289", "templates/info/instance.erb": "19811cc8627f126fc023aee28fb2b686", "templates/info/module.erb": "6758701c75644dee8c18cc4ec4ec9585", "templates/info/puppet.erb": "33beab27bb7b1d3421b8f3beb9fc1c08", "templates/info/readme.erb": "605015edea7317a1ba5b6ff54bf3eb6c", "templates/info.erb": "b70d4c4e728ac7a293b1f4c986917f92", "templates/install_packages.erb": "76187b63993a22d0c4edd62282c56dbb", "templates/log.erb": "3a2054a7e1b708cdfdbceb1c1d40b748", "templates/project/config.erb": "a19ac67182d1f7e9252e3a024ca3f20b", "templates/puppi.conf.erb": "c43466feb6d69c1adaafd7c6b595c4e9", "templates/puppi.erb": "379dd5d25e63d6e0f62035b9406b249a", "templates/puppi_clean.erb": "a45148cbeda335c150fbd3714ad33f6c", "templates/todo.erb": "745d64345b8d7614f251d2f65d883335" } }, "tags": [ "application", "deployment", "example42", "cli", "puppi" ], "file_uri": "/v3/files/example42-puppi-2.1.7.tar.gz", "file_size": 71372, "file_md5": "e26c6e5cf9f7af3bc96eb45c2a2db609", "downloads": 20981, "readme": "

Puppi: Puppet Knowledge to the CLI

\n\n

Puppi One and Puppi module written by Alessandro Franceschi / al @ lab42.it

\n\n

Puppi Gem by Celso Fernandez / Zertico

\n\n

Source: http://www.example42.com

\n\n

Licence: Apache 2

\n\n

Puppi is a Puppet module and a CLI command.\nIt's data is entirely driven by Puppet code.\nIt can be used to standardize and automate the deployment of web applications\nor to provides quick and standard commands to query and check your system's resources

\n\n

Its structure provides FULL flexibility on the actions required for virtually any kind of\napplication deployment and information gathering.

\n\n

The module provides:

\n\n
    \n
  • Old-Gen and Next-Gen Puppi implementation

  • \n
  • A set of scripts that can be used in chain to automate any kind of deployment

  • \n
  • Puppet defines that make it easy to prepare a puppi set of commands for a project deployment

  • \n
  • Puppet defines to populate the output of the different actions

  • \n
\n\n

HOW TO INSTALL

\n\n

Download Puppi from GitHub and place it in your modules directory:

\n\n
   git clone https://github.com/example42/puppi.git /etc/puppet/modules/puppi\n
\n\n

To use the Puppi "Original, old and widely tested" version, just declare or include the puppi class

\n\n
   class { 'puppi': }\n
\n\n

To test the Next-Gen version you can perform the following command. Please note that this module is\nnot stable yet:\n class { 'puppi':\n version => '2',\n }

\n\n

If you have resources conflicts, do not install automatically the Puppi dependencies (commands and packages)

\n\n
    class { 'puppi':\n      install_dependencies => false,\n    }\n
\n\n

HOW TO USE

\n\n

Once Puppi is installed you can use it to:

\n\n
    \n
  • Easily define in Puppet manifests Web Applications deploy procedures. For example:

    \n\n
    puppi::project::war { "myapp":\n    source           => "http://repo.example42.com/deploy/prod/myapp.war",\n    deploy_root      => "/opt/tomcat/myapp/webapps",\n}\n
  • \n
  • Integrate with your modules for puppi check, info and log

  • \n
  • Enable Example42 modules integration

  • \n
\n\n

HOW TO USE WITH EXAMPLE42 MODULES

\n\n

The Example42 modules provide (optional) Puppi integration.\nOnce enabled for each module you have puppi check, info and log commands.

\n\n

To eanble Puppi in OldGen Modules, set in the scope these variables:

\n\n
    $puppi = yes   # Enables puppi integration.\n    $monitor = yes # Enables automatic monitoring \n    $monitor_tool = "puppi" # Sets puppi as monitoring tool\n
\n\n

For the NextGen modules set the same parameters via Hiera, at Top Scope or as class arguments:

\n\n
    class { 'openssh':\n      puppi        => yes, \n      monitor      => yes,\n      monitor_tool => 'puppi', \n    }\n
\n\n

USAGE OF THE PUPPI COMMAND (OLD GEN)

\n\n
    puppi <action> <project_name> [ -options ]\n
\n\n

The puppi command has these possibile actions:

\n\n

First time initialization of the defined project (if available)\n puppi init

\n\n

Deploy the specified project\n puppi deploy

\n\n

Rollback to a previous deploy state\n puppi rollback

\n\n

Run local checks on system and applications\n puppi check

\n\n

Tail system or application logs\n puppi log

\n\n

Show system information (for all or only the specified topic)\n puppi info [topic]

\n\n

Show things to do (or done) manually on the system (not done via Puppet)\n puppi todo

\n\n

In the deploy/rollback/init actions, puppi runs the commands in /etc/puppi/projects/$project/$action, logs their status and then run the commands in /etc/puppi/projects/$project/report to provide reporting, in whatever, pluggable, way.

\n\n

You can also provide some options:

\n\n
    \n
  • -f : Force puppi commands execution also on CRITICAL errors

  • \n
  • -i : Interactively ask confirmation for every command

  • \n
  • -t : Test mode. Just show the commands that should be executed without doing anything

  • \n
  • -d : Debug mode. Show debugging info during execution

  • \n
  • -o "parameter=value parameter2=value2" : Set manual options to override defaults. The options must be in parameter=value syntax, separated by spaces and inside double quotes.

  • \n
\n\n

Some common puppi commnds when you log for an application deployment:

\n\n
    puppi check\n    puppi log &    # (More readable if done on another window)\n    puppi deploy myapp\n    puppi check\n    puppi info myapp\n
\n\n

THE PUPPI MODULE

\n\n

The set of commands needed for each of these actions are entirely managed with specific\nPuppet "basic defines":

\n\n

Create the main project structure. One or more different deployment projects can exist on a node.\n puppi::project

\n\n

Create a single command to be placed in the init sequence. It's not required for every project.\n puppi::initialize

\n\n

Create a single command to be placed in the deploy sequence. More than one is generally needed for each project.\n puppi::deploy

\n\n

Create a single command to be placed in the rollback sequence. More than one is generally needed for each project.\n puppi::rollback

\n\n

Create a single check (based on Nagios plugins) for a project or for the whole host (host wide checks are auto generated by Example42 monitor module)\n puppi::check

\n\n

Create a reporting command to be placed in the report sequence.\n puppi::report

\n\n

Create a log filename entry for a project or the whole hosts.\n puppi::log

\n\n

Create an info entry with the commands used to provide info on a topic\n puppi::info

\n\n

Read details in the relevant READMEs

\n\n

FILE PATHS (all of them are provided, and can be configured, in the puppi module):

\n\n

A link to the actual version of puppi enabled\n /usr/sbin/puppi

\n\n

The original puppi bash command.\n /usr/sbin/puppi.one

\n\n

Puppi (one) main config file. Various puppi wide paths are defined here.\n /etc/puppi/puppi.conf

\n\n

Directory where by default all the host wide checks can be placed. If you use the Example42 monitor module and have "puppi" as $monitor_tool, this directory is automatically filled with Nagios plugins based checks.\n /etc/puppi/checks/ ($checksdir)

\n\n

Directory that containts projects subdirs, with the commands to be run for deploy, rollback and check actions. They are completely built (and purged) by the Puppet module.\n /etc/puppi/projects/ ($projectsdir)

\n\n

The general-use scripts directory, these are used by the above commands and may require one or more arguments.\n /etc/puppi/scripts/ ($scriptsdir)

\n\n

The general-use directory where files are placed which contain the log paths to be used by puppi log\n /etc/puppi/logs/ ($logssdir)

\n\n

The general-use directory where files are placed which contain the log paths to be used by puppi log\n /etc/puppi/info/ ($infodir)

\n\n

Where all data to rollback is placed.\n /var/lib/puppi/archive/ ($archivedir)

\n\n

Where logs and reports of the different commands are placed.\n /var/log/puppi/ ($logdir)

\n\n

Temporary, scratchable, directory where Puppi places temporary files.\n /tmp/puppi/ ($workdir)

\n\n

A runtime configuration file, which is used by all all the the scripts invoked by puppi to read and write dynamic variables at runtime. This is necessary to mantain "state" information that changes on every puppi run (such as the deploy datetime, used for backups).\n /tmp/puppi/$project/config

\n\n

HOW TO CUSTOMIZE

\n\n

It should be clear that with puppi you have full flexibility in the definition of a deployment \nprocedure, since the puppi command is basically a wrapper that executes arbitrary scripts with\na given sequence, in pure KISS logic.

\n\n

The advantanges though, are various:

\n\n
    \n
  • You have a common syntax to manage deploys and rollbacks on an host

  • \n
  • In your Puppet manifests, you can set in simple, coherent and still flexible and customizable\ndefines all the elements, you need for your application deployments. \nThink about it: with just a Puppet define you build the whole deploy logic

  • \n
  • Reporting for each deploy/rollback is built-in and extensible

  • \n
  • Automatic checks can be built in the deploy procedure

  • \n
  • You have a common, growing, set of general-use scripts for typical actions

  • \n
  • You have quick and useful command to see what's happening on the system (puppi check, log, info)

  • \n
\n\n

There are different parts where you can customize the behaviour of puppi:

\n\n
    \n
  • The set of general-use scripts in /etc/puppi/scripts/ ( this directory is filled with the content\nof puppi/files/scripts/ ) can/should be enhanced. These can be arbitrary scripts in whatever\nlanguage. If you want to follow puppi's logic, though, consider that they should import the\ncommon and runtime configuration files and have an exit code logic similar to the one of\nNagios plugins: 0 is OK, 1 is WARNING, 2 is CRITICAL. Note that by default a script that \nexits with WARNING doesn't block the deploy procedure, on the other hand, if a script exits\nwith CRITICAL (exit 2) by default it blocks the procedure.\nTake a second, also, to explore the runtime config file created by the puppi command that\ncontains variables that can be set and used by the scripts invoked by puppi.

  • \n
  • The custom project defines that describe deploy templates. These are placed in\npuppi/manifests/project/ and can request all the arguments you want to feed your scripts with.\nGenerally is a good idea to design a standard enough template that can be used for all the \ncases where the deployment procedure involves similar steps. Consider also that you can handle\nexceptions with variables (see the $loadbalancer_ip usage in puppi/manifests/project/maven.pp)

  • \n
\n\n

(NO) DEPENDENCIES AND CONFLICTS

\n\n

Puppi is self contained. It doesn't require other modules.\n(And is required by all Example42 modules).

\n\n

For correct functionality by default some extra packages are installed.\nIf you have conflicts with your existing modules, set the argument:\n install_dependencies => false

\n
", "changelog": null, "license": "
Copyright (C) 2013 Alessandro Franceschi / Lab42\n\nfor the relevant commits Copyright (C) by the respective authors.\n\nContact Lab42 at: info@lab42.it\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-11-22 01:10:30 -0800", "updated_at": "2013-11-22 01:18:19 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/example42-puppi-2.1.7", "version": "2.1.7" }, { "uri": "/v3/releases/example42-puppi-2.1.6", "version": "2.1.6" }, { "uri": "/v3/releases/example42-puppi-2.1.5", "version": "2.1.5" }, { "uri": "/v3/releases/example42-puppi-2.1.3", "version": "2.1.3" }, { "uri": "/v3/releases/example42-puppi-2.1.2", "version": "2.1.2" }, { "uri": "/v3/releases/example42-puppi-2.1.1", "version": "2.1.1" }, { "uri": "/v3/releases/example42-puppi-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/example42-puppi-2.0.8", "version": "2.0.8" }, { "uri": "/v3/releases/example42-puppi-2.0.0", "version": "2.0.0" } ], "homepage_url": "https://github.com/example42/puppi", "issues_url": "https://github.com/example42/puppi/issues" }, { "uri": "/v3/modules/puppetlabs-vcsrepo", "name": "vcsrepo", "downloads": 43547, "created_at": "2010-05-20 22:48:21 -0700", "updated_at": "2014-01-06 14:40:29 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-vcsrepo-0.2.0", "module": { "uri": "/v3/modules/puppetlabs-vcsrepo", "name": "vcsrepo", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.0", "metadata": { "name": "puppetlabs/vcsrepo", "version": "0.2.0", "source": "UNKNOWN", "author": "puppetlabs", "license": "Apache License, Version 2.0", "summary": "Manage repositories from various version control systems", "description": "Manage repositories from various version control systems", "project_page": "UNKNOWN", "dependencies": [ ], "types": [ { "name": "vcsrepo", "doc": "A local version control repository", "properties": [ { "name": "ensure", "doc": " Valid values are `present`, `bare`, `absent`, `latest`." }, { "name": "revision", "doc": "The revision of the repository Values can match `/^\\S+$/`." } ], "parameters": [ { "name": "path", "doc": "Absolute path to repository" }, { "name": "source", "doc": "The source URI for the repository" }, { "name": "fstype", "doc": "Filesystem type Requires features filesystem_types." }, { "name": "owner", "doc": "The user/uid that owns the repository files" }, { "name": "group", "doc": "The group/gid that owns the repository files" }, { "name": "user", "doc": "The user to run for repository operations" }, { "name": "excludes", "doc": "Files to be excluded from the repository" }, { "name": "force", "doc": "Force repository creation, destroying any files on the path in the process. Valid values are `true`, `false`." }, { "name": "compression", "doc": "Compression level Requires features gzip_compression." }, { "name": "basic_auth_username", "doc": "HTTP Basic Auth username Requires features basic_auth." }, { "name": "basic_auth_password", "doc": "HTTP Basic Auth password Requires features basic_auth." }, { "name": "identity", "doc": "SSH identity file Requires features ssh_identity." }, { "name": "module", "doc": "The repository module to manage Requires features modules." }, { "name": "remote", "doc": "The remote repository to track Requires features multiple_remotes." }, { "name": "configuration", "doc": "The configuration directory to use Requires features configuration." }, { "name": "cvs_rsh", "doc": "The value to be used for the CVS_RSH environment variable. Requires features cvs_rsh." } ], "providers": [ { "name": "bzr", "doc": "Supports Bazaar repositories\n\nRequired binaries: `bzr`. Supported features: `reference_tracking`." }, { "name": "cvs", "doc": "Supports CVS repositories/workspaces\n\nRequired binaries: `cvs`. Supported features: `cvs_rsh`, `gzip_compression`, `modules`, `reference_tracking`." }, { "name": "dummy", "doc": "Dummy default provider\n\nDefault for `vcsrepo` == `dummy`." }, { "name": "git", "doc": "Supports Git repositories\n\nRequired binaries: `git`, `su`. Supported features: `bare_repositories`, `multiple_remotes`, `reference_tracking`, `ssh_identity`, `user`." }, { "name": "hg", "doc": "Supports Mercurial repositories\n\nRequired binaries: `hg`, `su`. Supported features: `reference_tracking`, `ssh_identity`, `user`." }, { "name": "svn", "doc": "Supports Subversion repositories\n\nRequired binaries: `svn`, `svnadmin`, `svnlook`. Supported features: `basic_auth`, `configuration`, `filesystem_types`, `reference_tracking`." } ] } ], "checksums": { "CHANGELOG": "c41bec2dddc2a3de4c10b56e4d348492", "Gemfile": "a25ee68d266f452c3cf19537736e778d", "Gemfile.lock": "aac999a29c92e12f0af120c97bda73f7", "LICENSE": "b8d96fef1f55096f9d39326408122136", "Modulefile": "e69308b7a49f10b2695057c33eeba5f6", "README.BZR.markdown": "97f638d169a1c39d461c3f2c0e2ec32f", "README.CVS.markdown": "7bc2fd4def5d18451dc8d5fc86d2910c", "README.GIT.markdown": "9adc244b55c7441076541dfc7fdd1a68", "README.HG.markdown": "438ebb7b5262edea0a5b69856dfc9415", "README.SVN.markdown": "4f8de2b336022700aa557a59c7770e57", "README.markdown": "aa36edae60f06e5cb0fef00c3d5b6618", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "examples/bzr/branch.pp": "05c66419324a576b9b28df876673580d", "examples/bzr/init_repo.pp": "fadd2321866ffb0aacff698d2dc1f0ca", "examples/cvs/local.pp": "7fbde03a5c71edf168267ae42d0bbcbc", "examples/cvs/remote.pp": "491f18f752752bec6133a88de242c44d", "examples/git/bare_init.pp": "7cf56abffdf99f379153166f18f961f8", "examples/git/clone.pp": "0e3181990c095efee1498ccfca5897fb", "examples/git/working_copy_init.pp": "99d92d9957e78a0c03f9cbed989c79ca", "examples/hg/clone.pp": "c92bbd704a4c2da55fff5f45955ce6d1", "examples/hg/init_repo.pp": "bf5fa0ab48a2f5a1ccb63768d961413d", "examples/svn/checkout.pp": "9ef7a8fbd3a763fa3894efa864047023", "examples/svn/server.pp": "94b26f6e50d5e411b33b1ded1bc2138a", "lib/puppet/provider/vcsrepo/bzr.rb": "52f4d40153e0a3bc54be1b7dfa18b5f1", "lib/puppet/provider/vcsrepo/cvs.rb": "1ce8d98a2ffad4bf0c575af014270c8b", "lib/puppet/provider/vcsrepo/dummy.rb": "2f8159468d6ecc8087debde858a80dd6", "lib/puppet/provider/vcsrepo/git.rb": "7c453bfe9abe5367902f090b554c51e2", "lib/puppet/provider/vcsrepo/hg.rb": "01887f986db627ffc1a8ff7a52328ddb", "lib/puppet/provider/vcsrepo/svn.rb": "03b14667e002db9452c597e1b21718dd", "lib/puppet/provider/vcsrepo.rb": "dbd72590771291f1db23a41ac048ed9d", "lib/puppet/type/vcsrepo.rb": "bf01ae48b0d2ae542bc8c0f65da93c64", "spec/fixtures/bzr_version_info.txt": "5edb13429faf2f0b9964b4326ef49a65", "spec/fixtures/git_branch_a.txt": "2371229e7c1706c5ab8f90f0cd57230f", "spec/fixtures/git_branch_feature_bar.txt": "70903a4dc56f7300fbaa54c295b52c4f", "spec/fixtures/git_branch_none.txt": "acaa61de6a7f0f5ca39b763799dcb9a6", "spec/fixtures/hg_parents.txt": "efc28a1bd3f1ce7fb4481f76feed3f6e", "spec/fixtures/hg_tags.txt": "8383048b15adb3d58a92ea0c8b887537", "spec/fixtures/svn_info.txt": "978db25720a098e5de48388fe600c062", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "ce4d39194e1b8486de8ec25f639f6762", "spec/support/filesystem_helpers.rb": "eb2a8eb3769865004c84e971ccb1396c", "spec/support/fixture_helpers.rb": "61781d99ea201e9da6d23c64a25cc285", "spec/unit/puppet/provider/vcsrepo/bzr_spec.rb": "320b5be01c84f3424ac99729e42b4562", "spec/unit/puppet/provider/vcsrepo/cvs_spec.rb": "24f760cb53be365ca185cd196c03743a", "spec/unit/puppet/provider/vcsrepo/git_spec.rb": "2159d3a06a2a764dcf8e3da141390734", "spec/unit/puppet/provider/vcsrepo/hg_spec.rb": "b6eabd1167753f1a6a87eeef897bc1c5", "spec/unit/puppet/provider/vcsrepo/svn_spec.rb": "957328714f6df1e90b663514615f460e", "spec/unit/puppet/type/README.markdown": "de26a7643813abd6c2e7e28071b1ef94" } }, "tags": [ "vcs", "repo", "svn", "subversion", "git", "hg", "bzr", "CVS" ], "file_uri": "/v3/files/puppetlabs-vcsrepo-0.2.0.tar.gz", "file_size": 19438, "file_md5": "b254b09335ffd1ce073965499350e2d2", "downloads": 9136, "readme": "

vcsrepo

\n\n

\"Build

\n\n

Purpose

\n\n

This provides a single type, vcsrepo.

\n\n

This type can be used to describe:

\n\n
    \n
  • A working copy checked out from a (remote or local) source, at an\narbitrary revision
  • \n
  • A "blank" working copy not associated with a source (when it makes\nsense for the VCS being used)
  • \n
  • A "blank" central repository (when the distinction makes sense for the VCS\nbeing used)
  • \n
\n\n

Supported Version Control Systems

\n\n

This module supports a wide range of VCS types, each represented by a\nseparate provider.

\n\n

For information on how to use this module with a specific VCS, see\nREADME.<VCS>.markdown.

\n\n

License

\n\n

See LICENSE.

\n
", "changelog": "
2013-11-13 - Version 0.2.0\n\nSummary:\n\nThis release mainly focuses on a number of bugfixes, which should\nsignificantly improve the reliability of Git and SVN.  Thanks to\nour many contributors for all of these fixes!\n\nFeatures:\n- Git:\n - Add autorequire for Package['git']\n- HG:\n - Allow user and identity properties.\n- Bzr:\n - "ensure => latest" support.\n- SVN:\n - Added configuration parameter.\n - Add support for main svn repositories.\n- CVS:\n - Allow for setting the CVS_RSH environment variable.\n\nFixes:\n- Handle Puppet::Util[::Execution].withenv for 2.x and 3.x properly.\n- Change path_empty? to not do full directory listing.\n- Overhaul spec tests to work with rspec2.\n- Git:\n - Improve Git SSH usage documentation.\n - Add ssh session timeouts to prevent network issues from blocking runs.\n - Fix git provider checkout of a remote ref on an existing repo.\n - Allow unlimited submodules (thanks to --recursive).\n - Use git checkout --force instead of short -f everywhere.\n - Update git provider to handle checking out into an existing (empty) dir.\n- SVN:\n - Handle force property. for svn.\n - Adds support for changing upstream repo url.\n - Check that the URL of the WC matches the URL from the manifest.\n - Changed from using "update" to "switch".\n - Handle revision update without source switch.\n - Fix svn provider to look for '^Revision:' instead of '^Last Changed Rev:'.\n- CVS:\n - Documented the "module" attribute.\n
", "license": "
Copyright (C) 2010-2012 Puppet Labs Inc.\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nThis program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software\nFoundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n
", "created_at": "2013-11-13 10:21:58 -0800", "updated_at": "2013-11-13 10:21:58 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-vcsrepo-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.5", "version": "0.0.5" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-vcsrepo-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-vcsrepo", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-git", "name": "git", "downloads": 36223, "created_at": "2011-06-03 20:40:03 -0700", "updated_at": "2014-01-06 14:41:32 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-git-0.0.3", "module": { "uri": "/v3/modules/puppetlabs-git", "name": "git", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.3", "metadata": { "name": "puppetlabs-git", "version": "0.0.3", "source": "git://github.com/puppetlabs/puppetlabs-git.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "module for installing git", "description": "module for installing git", "project_page": "https://github.com/puppetlabs/puppetlabs-git/", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "f2e3e57948da2dcab3bdbe782efd6b11", "LICENSE": "0e5ccf641e613489e66aa98271dbe798", "Modulefile": "f971ce8e90cb5cdf63722c92e0497110", "README.md": "8f241391b0165fe286588154a5321aee", "manifests/gitosis.pp": "6b1bbd3a43baa63c63f5d03dcb9fbe95", "manifests/init.pp": "520e2a141b314dd9b859a0f2d31a338e", "tests/gitosis.pp": "4a9f134fbd08096dac65aafa9fbc0742", "tests/init.pp": "bbf47fdd0ad67c6fa1d47d39fdd6a94b" } }, "tags": [ ], "file_uri": "/v3/files/puppetlabs-git-0.0.3.tar.gz", "file_size": 5931, "file_md5": "64e8403025a9d4fb8270cb53b37a6959", "downloads": 31939, "readme": "

git

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the [Modulename] module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with [Modulename]\n\n
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Limitations - OS compatibility, etc.
  10. \n
  11. Development - Guide for contributing to the module
  12. \n
\n\n

Overview

\n\n

Simple module that can install git or gitosis

\n\n

Module Description

\n\n

This module installs the git revision control system on a target node. It does not manage a git server or any associated services; it simply ensures a bare minimum set of features (e.g. just a package) to use git.

\n\n

Setup

\n\n

What git affects

\n\n
    \n
  • Package['git']
  • \n
\n\n

The specifics managed by the module may vary depending on the platform.

\n\n

Usage

\n\n

Simply include the git class.

\n\n
include git\n
\n\n

Limitations

\n\n

This module is known to work with the following operating system families:

\n\n
    \n
  • RedHat 5, 6
  • \n
  • Debian 6.0.7 or newer
  • \n
  • Ubuntu 12.04 or newer
  • \n
\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": null, "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-09-10 08:41:17 -0700", "updated_at": "2013-09-10 08:41:17 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-git-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-git-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-git-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-git/", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/maestrodev-wget", "name": "wget", "downloads": 34115, "created_at": "2012-07-13 01:32:21 -0700", "updated_at": "2014-01-06 14:40:26 -0800", "owner": { "uri": "/v3/users/maestrodev", "username": "maestrodev", "gravatar_id": "192d33f0c408b08b3df9d4927bfbcdc0" }, "current_release": { "uri": "/v3/releases/maestrodev-wget-1.3.1", "module": { "uri": "/v3/modules/maestrodev-wget", "name": "wget", "owner": { "uri": "/v3/users/maestrodev", "username": "maestrodev", "gravatar_id": "192d33f0c408b08b3df9d4927bfbcdc0" } }, "version": "1.3.1", "metadata": { "name": "maestrodev-wget", "version": "1.3.1", "source": "http://github.com/maestrodev/puppet-wget.git", "author": "maestrodev", "license": "Apache License, Version 2.0", "summary": "Download files with wget", "description": "A module for wget that allows downloading of files, supporting authentication", "project_page": "http://github.com/maestrodev/puppet-wget", "dependencies": [ ], "types": [ ], "checksums": { "Gemfile": "b7535c2f94bb78b8f3b21eee7ae79860", "Gemfile.lock": "2bbfbceaa08eb04f5c1438bb57e98e95", "Modulefile": "4241e1a74fab33a390374feeee5aff65", "README.md": "0659c08044d163bc16cbb76aef24e315", "Rakefile": "48e05f3709c484d430eacc5dcb237547", "manifests/authfetch.pp": "4e02d11bba3d72b1ea09b854fa272f27", "manifests/fetch.pp": "0ec652eff225aacb108e696d70101821", "manifests/init.pp": "582c44cad08f204e424fc361327842b7", "spec/classes/init_spec.rb": "154db01e3fff4f58689fc8729ec1a721", "spec/defines/authfetch_spec.rb": "aa48b93f4e8da3aab2cd4d39bbea8699", "spec/defines/fetch_spec.rb": "cbe5b0f3ab06554c4452180adf1e3d38", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "deaf51d85121ccd2edd4db144941b2ce", "spec/system/wget_system_spec.rb": "13f5696b3b9a9ba89a1c6f0da60e171b" } }, "tags": [ "wget", "download" ], "file_uri": "/v3/files/maestrodev-wget-1.3.1.tar.gz", "file_size": 5578, "file_md5": "701b40192b5bf50584864c71fc0c9700", "downloads": 2885, "readme": "

A Puppet module to download files with wget, supporting authentication.

\n\n

Example

\n\n

install wget:

\n\n
       include wget\n
\n\n
       wget::fetch { "download Google's index":\n       source      => 'http://www.google.com/index.html',\n       destination => '/tmp/index.html',\n       timeout     => 0,\n       verbose     => false,\n    }\n
\n\n

or alternatively:

\n\n
     wget::fetch { 'http://www.google.com/index.html':\n       destination => '/tmp/index.html',\n       timeout     => 0,\n       verbose     => false,\n     }\n
\n\n

This fetches a document which requires authentication:

\n\n
     wget::fetch { 'Fetch secret PDF':\n        source      => 'https://confidential.example.com/secret.pdf',\n        destination => '/tmp/secret.pdf',\n        user        => 'user',\n        password    => 'p$ssw0rd',\n        timeout     => 0,\n        verbose     => false,\n     }\n
\n\n

Testing

\n\n

rake will run the rspec-puppet specs

\n\n

rake spec:system will run the rspec-system specs with vagrant

\n\n

RS_DESTROY=no rake spec:system to avoid destroying the vm after running the tests

\n\n

License

\n\n

Copyright 2011-2013 MaestroDev

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": null, "license": null, "created_at": "2013-12-11 04:49:32 -0800", "updated_at": "2013-12-11 05:31:53 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/maestrodev-wget-1.3.1", "version": "1.3.1" }, { "uri": "/v3/releases/maestrodev-wget-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/maestrodev-wget-1.2.3", "version": "1.2.3" }, { "uri": "/v3/releases/maestrodev-wget-1.2.2", "version": "1.2.2" }, { "uri": "/v3/releases/maestrodev-wget-1.2.1", "version": "1.2.1" }, { "uri": "/v3/releases/maestrodev-wget-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/maestrodev-wget-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/maestrodev-wget-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/maestrodev-wget-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://github.com/maestrodev/puppet-wget", "issues_url": "http://github.com/maestrodev/puppet-wget/issues" }, { "uri": "/v3/modules/puppetlabs-puppetdb", "name": "puppetdb", "downloads": 32658, "created_at": "2012-09-19 16:49:18 -0700", "updated_at": "2014-01-06 14:20:12 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-puppetdb-3.0.0", "module": { "uri": "/v3/modules/puppetlabs-puppetdb", "name": "puppetdb", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "3.0.0", "metadata": { "types": [ { "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "puppetdb_server", "doc": "The DNS name or IP address of the server where puppetdb should be running." }, { "name": "puppetdb_port", "doc": "The port that the puppetdb server should be listening on." }, { "name": "use_ssl", "doc": "Whether the connection will be attemped using https" }, { "name": "timeout", "doc": "The max number of seconds that the validator should wait before giving up and deciding that puppetdb is not running; defaults to 15 seconds." } ], "providers": [ { "name": "puppet_https", "doc": "A provider for the resource type `puppetdb_conn_validator`,\n which validates the puppetdb connection by attempting an https\n connection to the puppetdb server. Uses the puppet SSL certificate\n setup from the local puppet environment to authenticate." } ], "name": "puppetdb_conn_validator", "doc": "Verify that a connection can be successfully established between a node\n and the puppetdb server. Its primary use is as a precondition to\n prevent configuration changes from being applied if the puppetdb\n server cannot be reached, but it could potentially be used for other\n purposes such as monitoring.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ] } ], "description": "PuppetDB resource types", "summary": "PuppetDB resource types", "source": "git://github.com/puppetlabs/puppetlabs-puppetdb.git", "checksums": { "manifests/main/report_processor.pp": "0bcf515ce1547166fb2aaeeea03d2108", "manifests/init.pp": "cdd9f0d32115802878d06abf920bd9ed", "manifests/database/postgresql.pp": "d7944858425f6cacb54ae8a46423bbd0", "lib/puppet/type/puppetdb_conn_validator.rb": "aa4846110f363047a8988f261378ec0e", "files/routes.yaml": "779d47e8d0c320b10f8c31cd9838fca1", "manifests/server/jetty_ini.pp": "4207efbf3ce27c57921368ebe46f3701", "manifests/params.pp": "abbcec237f977061315f58fb3b4cc763", "NOTICE": "dd0cc848426aa3648e668269e7a04252", "manifests/main/routes.pp": "b3c370dd0e1e18e8db0b30be8aa10056", "lib/puppet/util/puppetdb_validator.rb": "87dfd3cde4a06f898d88b9fda35c7dce", "CHANGELOG": "8d3b060589d25d936d06d61b891302da", "manifests/server/database_ini.pp": "bf8f6a936cdea3ec4c56bf3aefd8a8fa", "manifests/main/puppetdb_conf.pp": "a757975b360c74103cfea1417004b61a", "manifests/server/firewall.pp": "c09a3c3b65e47353d1fcc98514faaead", "manifests/server.pp": "ddccf98a84a0f4a889375cf7a7963867", "Modulefile": "d420eeddd4072b84f5dd08880b606136", "manifests/server/validate_db.pp": "163c5a161b79839c1827cf3ba1f06d2c", "manifests/main/storeconfigs.pp": "7bb67d0559564a44bfb6740f967a3bc2", "manifests/main/config.pp": "6b4509b30fa1d66a6c37799844907f70", "lib/puppet/provider/puppetdb_conn_validator/puppet_https.rb": "17c55730cd42c64fe959f12a87a96085", "lib/puppet/parser/functions/puppetdb_create_subsetting_resource_hash.rb": "61b6f5ebc352e9bff5a914a43a14dc22", "README.md": "0b168fe59aa1f041c44eb7755bc22112", "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57" }, "dependencies": [ { "version_requirement": "1.x", "name": "puppetlabs/inifile" }, { "version_requirement": ">= 3.1.0 <4.0.0", "name": "puppetlabs/postgresql" }, { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.0", "name": "puppetlabs/stdlib" } ], "author": "Puppet Labs", "project_page": "https://github.com/puppetlabs/puppetlabs-puppetdb", "version": "3.0.0", "name": "puppetlabs-puppetdb", "license": "ASL 2.0" }, "tags": [ "puppet", "puppetdb", "storeconfig" ], "file_uri": "/v3/files/puppetlabs-puppetdb-3.0.0.tar.gz", "file_size": 24498, "file_md5": "a65924f70c75ee6d48be49b9f1ee5e03", "downloads": 6887, "readme": "

puppetdb

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the PuppetDB module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with PuppetDB module
  6. \n
  7. Upgrading - Guide for upgrading from older revisions of this module
  8. \n
  9. Usage - The classes and parameters available for configuration
  10. \n
  11. Implementation - An under-the-hood peek at what the module is doing
  12. \n
  13. Limitations - OS compatibility, etc.
  14. \n
  15. Development - Guide for contributing to the module
  16. \n
  17. Release Notes - Notes on the most recent updates to the module
  18. \n
\n\n

Overview

\n\n

By guiding puppetdb setup and configuration with a primary Puppet server, the PuppetDB module provides fast, streamlined access to data on puppetized infrastructure.

\n\n

Module Description

\n\n

The PuppetDB module provides a quick way to get started using PuppetDB, an open source inventory resource service that manages storage and retrieval of platform-generated data. The module will install PostgreSQL and PuppetDB if you don't have them, as well as set up the connection to primary Puppet server. The module will also provide a dashboard you can use to view the current state of your system.

\n\n

For more information about PuppetDB please see the official PuppetDB documentation.

\n\n

Setup

\n\n

What PuppetDB affects:

\n\n
    \n
  • package/service/configuration files for PuppetDB
  • \n
  • package/service/configuration files for PostgreSQL (optional, but set as default)
  • \n
  • primary Puppet server's runtime (via plugins)
  • \n
  • primary Puppet server's configuration\n\n
      \n
    • note: Using the puppetdb::config class will cause your routes.yaml file to be overwritten entirely (see Usage below for options and more information )
    • \n
  • \n
  • system firewall (optional)
  • \n
  • listened-to ports
  • \n
\n\n

Introductory Questions

\n\n

To begin using PuppetDB, you’ll have to make a few decisions:

\n\n
    \n
  • Which database back-end should I use?\n\n
      \n
    • PostgreSQL (default) or our embedded database
    • \n
    • Embedded database
    • \n
    • note: We suggest using the embedded database only for experimental environments rather than production, as it does not scale well and can cause difficulty in migrating to PostgreSQL.
    • \n
  • \n
  • Should I run the database on the same node that I run PuppetDB on?
  • \n
  • Should I run PuppetDB on the same node that I run my primary Puppet server on?
  • \n
\n\n

The answers to those questions will be largely dependent on your answers to questions about your Puppet environment:

\n\n
    \n
  • How many nodes are you managing?
  • \n
  • What kind of hardware are you running on?
  • \n
  • Is your current load approaching the limits of your hardware?
  • \n
\n\n

Depending on your answers to all of the questions above, you will likely fall under one of these set-up options:

\n\n
    \n
  1. Single Node (Testing and Development)
  2. \n
  3. Multiple Node (Recommended)
  4. \n
\n\n

Single Node Setup

\n\n

This approach assumes you will use our default database (PostgreSQL) and run everything (PostgreSQL, PuppetDB, primary Puppet server) all on the same node. This setup will be great for a testing or experimental environment. In this case, your manifest will look like:

\n\n
node primary Puppet server {\n  # Configure puppetdb and its underlying database\n  class { 'puppetdb': }\n  # Configure the primary Puppet server to use puppetdb\n  class { 'puppetdb::config': }\n}\n
\n\n

You can provide some parameters for these classes if you’d like more control, but that is literally all that it will take to get you up and running with the default configuration.

\n\n

Multiple Node Setup

\n\n

This approach is for those who prefer not to install PuppetDB on the same node as the primary Puppet server. Your environment will be easier to scale if you are able to dedicate hardware to the individual system components. You may even choose to run the puppetdb server on a different node from the PostgreSQL database that it uses to store its data. So let’s have a look at what a manifest for that scenario might look like:

\n\n

This is an example of a very basic 3-node setup for PuppetDB.

\n\n

This node is our primary Puppet server:

\n\n
node puppet {\n  # Here we configure the primary Puppet server to use PuppetDB,\n  # and tell it that the hostname is ‘puppetdb’\n  class { 'puppetdb::config':\n    puppetdb_server => 'puppetdb',\n  }\n}\n
\n\n

This node is our postgres server:

\n\n
node puppetdb-postgres {\n  # Here we install and configure postgres and the puppetdb\n  # database instance, and tell postgres that it should\n  # listen for connections to the hostname ‘puppetdb-postgres’\n  class { 'puppetdb::database::postgresql':\n    listen_addresses => 'puppetdb-postgres',\n  }\n}\n
\n\n

This node is our main puppetdb server:

\n\n
node puppetdb {\n  # Here we install and configure PuppetDB, and tell it where to\n  # find the postgres database.\n  class { 'puppetdb::server':\n    database_host => 'puppetdb-postgres',\n  }\n}\n
\n\n

This should be all it takes to get a 3-node, distributed installation of PuppetDB up and running. Note that, if you prefer, you could easily move two of these classes to a single node and end up with a 2-node setup instead.

\n\n

Beginning with PuppetDB

\n\n

Whether you choose a single node development setup or a multi-node setup, a basic setup of PuppetDB will cause: PostgreSQL to install on the node if it’s not already there; PuppetDB postgres database instance and user account to be created; the postgres connection to be validated and, if successful, PuppetDB to be installed and configured; PuppetDB connection to be validated and, if successful, the primary Puppet server config files to be modified to use PuppetDB; and the primary Puppet server to be restarted so that it will pick up the config changes.

\n\n

If your logging level is set to INFO or finer, you should start seeing PuppetDB-related log messages appear in both your primary Puppet server log and your puppetdb log as subsequent agent runs occur.

\n\n

If you’d prefer to use PuppetDB’s embedded database rather than PostgreSQL, have a look at the database parameter on the puppetdb class:

\n\n
class { 'puppetdb':\n  database => 'embedded',\n}\n
\n\n

The embedded database can be useful for testing and very small production environments, but it is not recommended for production environments since it consumes a great deal of memory as your number of nodes increase.

\n\n

Cross-node Dependencies

\n\n

It is worth noting that there are some cross-node dependencies, which means that the first time you add the module's configurations to your manifests, you may see a few failed puppet runs on the affected nodes.

\n\n

PuppetDB handles cross-node dependencies by taking a sort of “eventual consistency†approach. There’s nothing that the module can do to control the order in which your nodes check in, but the module can check to verify that the services it depends on are up and running before it makes configuration changes--so that’s what it does.

\n\n

When your primary Puppet server node checks in, it will validate the connectivity to the puppetdb server before it applies its changes to the primary Puppet server config files. If it can’t connect to puppetdb, then the puppet run will fail and the previous config files will be left intact. This prevents your primary Puppet server from getting into a broken state where all incoming puppet runs fail because the primary Puppet server is configured to use a puppetdb server that doesn’t exist yet. The same strategy is used to handle the dependency between the puppetdb server and the postgres server.

\n\n

Hence the failed puppet runs. These failures should be limited to 1 failed run on the puppetdb node, and up to 2 failed runs on the primary Puppet server node. After that, all of the dependencies should be satisfied and your puppet runs should start to succeed again.

\n\n

You can also manually trigger puppet runs on the nodes in the correct order (Postgres, PuppetDB, primary Puppet server), which will avoid any failed runs.

\n\n

Upgrading

\n\n

Upgrading from 2.x to version 3.x

\n\n

For this release a major dependency has changed. The module pupppetlabs/postgresql must now be version 3.x. Upgrading the module should upgrade the puppetlabs/postgresql module for you, but if another module has a fixed dependency that module will have to be fixed before you can continue.

\n\n

Some other changes include:

\n\n
    \n
  • The parameter manage_redhat_firewall for the class puppetdb has now been removed completely in favor of open_postgres_port and open_ssl_listen_port.
  • \n
  • The parameter manage_redhat_firewall for the class puppetdb::database::postgresql, has now been renamed to manage_firewall.
  • \n
  • The parameter manage_redhat_firewall for the class puppetdb::server has now been removed completely in favor of open_listen_port and open_ssl_listen_port.
  • \n
  • The internal class: puppetdb::database::postgresql_db has been removed. If you were using this, it is now defunct.
  • \n
  • The class puppetdb::server::firewall has been marked as private, do not use it directly.
  • \n
  • The class puppetdb::server::jetty_ini and puppetdb::server::database_ini have been marked as private, do not use it directly.
  • \n
\n\n

Upgrading from 1.x to version 2.x

\n\n

A major dependency has been changed, so now when you upgrade to 2.0 the dependency cprice404/inifile has been replaced with puppetlabs/inifile. This may interfer with other modules as they may depend on the old cprice404/inifile instead, so upgrading should be done with caution. Check that your other modules use the newer puppetlabs/inifile module as interoperation with the old cprice404/inifile module will no longer be supported by this module.

\n\n

Depending on how you install your modules, changing the dependency may require manual intervention. Double check your modules contains the newer puppetlabs/inifile after installing this latest module.

\n\n

Otherwise, all existing parameters from 1.x should still work correctly.

\n\n

Usage

\n\n

PuppetDB supports a large number of configuration options for both configuring the puppetdb service and connecting that service to the primary Puppet server.

\n\n

puppetdb

\n\n

The puppetdb class is intended as a high-level abstraction (sort of an 'all-in-one' class) to help simplify the process of getting your puppetdb server up and running. It wraps the slightly-lower-level classes puppetdb::server and puppetdb::database::*, and it'll get you up and running with everything you need (including database setup and management) on the server side. For maximum configurability, you may choose not to use this class. You may prefer to use the puppetdb::server class directly, or manage your puppetdb setup on your own.

\n\n

You must declare the class to use it:

\n\n
class { 'puppetdb': }\n
\n\n

Parameters within puppetdb:

\n\n

listen_address

\n\n

The address that the web server should bind to for HTTP requests (defaults to localhost.'0.0.0.0' = all).

\n\n

listen_port

\n\n

The port on which the puppetdb web server should accept HTTP requests (defaults to '8080').

\n\n

open_listen_port

\n\n

If true, open the http_listen_port on the firewall (defaults to false).

\n\n

ssl_listen_address

\n\n

The address that the web server should bind to for HTTPS requests (defaults to $::clientcert). Set to '0.0.0.0' to listen on all addresses.

\n\n

ssl_listen_port

\n\n

The port on which the puppetdb web server should accept HTTPS requests (defaults to '8081').

\n\n

disable_ssl

\n\n

If true, the puppetdb web server will only serve HTTP and not HTTPS requests (defaults to false).

\n\n

open_ssl_listen_port

\n\n

If true, open the ssl_listen_port on the firewall (defaults to true).

\n\n

database

\n\n

Which database backend to use; legal values are postgres (default) or embedded. The embedded db can be used for very small installations or for testing, but is not recommended for use in production environments. For more info, see the puppetdb docs.

\n\n

database_port

\n\n

The port that the database server listens on (defaults to 5432; ignored for embedded db).

\n\n

database_username

\n\n

The name of the database user to connect as (defaults to puppetdb; ignored for embedded db).

\n\n

database_password

\n\n

The password for the database user (defaults to puppetdb; ignored for embedded db).

\n\n

database_name

\n\n

The name of the database instance to connect to (defaults to puppetdb; ignored for embedded db).

\n\n

database_ssl

\n\n

If true, puppetdb will use SSL to connect to the postgres database (defaults to false; ignored for embedded db).\nSetting up proper trust- and keystores has to be managed outside of the puppetdb module.

\n\n

node_ttl

\n\n

The length of time a node can go without receiving any new data before it's automatically deactivated. (defaults to '0', which disables auto-deactivation). This option is supported in PuppetDB >= 1.1.0.

\n\n

node_purge_ttl

\n\n

The length of time a node can be deactivated before it's deleted from the database. (defaults to '0', which disables purging). This option is supported in PuppetDB >= 1.2.0.

\n\n

report_ttl

\n\n

The length of time reports should be stored before being deleted. (defaults to '7d', which is a 7-day period). This option is supported in PuppetDB >= 1.1.0.

\n\n

gc_interval

\n\n

This controls how often, in minutes, to compact the database. The compaction process reclaims space and deletes unnecessary rows. If not supplied, the default is every 60 minutes. This option is supported in PuppetDB >= 0.9.

\n\n

log_slow_statements

\n\n

This sets the number of seconds before an SQL query is considered "slow." Slow SQL queries are logged as warnings, to assist in debugging and tuning. Note PuppetDB does not interrupt slow queries; it simply reports them after they complete.

\n\n

The default value is 10 seconds. A value of 0 will disable logging of slow queries. This option is supported in PuppetDB >= 1.1.

\n\n

conn_max_age

\n\n

The maximum time (in minutes), for a pooled connection to remain unused before it is closed off.

\n\n

If not supplied, we default to 60 minutes. This option is supported in PuppetDB >= 1.1.

\n\n

conn_keep_alive

\n\n

This sets the time (in minutes), for a connection to remain idle before sending a test query to the DB. This is useful to prevent a DB from timing out connections on its end.

\n\n

If not supplied, we default to 45 minutes. This option is supported in PuppetDB >= 1.1.

\n\n

conn_lifetime

\n\n

The maximum time (in minutes) a pooled connection should remain open. Any connections older than this setting will be closed off. Connections currently in use will not be affected until they are returned to the pool.

\n\n

If not supplied, we won't terminate connections based on their age alone. This option is supported in PuppetDB >= 1.4.

\n\n

puppetdb_package

\n\n

The puppetdb package name in the package manager.

\n\n

puppetdb_version

\n\n

The version of the puppetdb package that should be installed. You may specify an explicit version number, 'present', or 'latest' (defaults to 'present').

\n\n

puppetdb_service

\n\n

The name of the puppetdb service.

\n\n

puppetdb_service_status

\n\n

Sets whether the service should be running or stopped. When set to stopped the service doesn't start on boot either. Valid values are 'true', 'running', 'false', and 'stopped'.

\n\n

confdir

\n\n

The puppetdb configuration directory (defaults to /etc/puppetdb/conf.d).

\n\n

java_args

\n\n

Java VM options used for overriding default Java VM options specified in PuppetDB package (defaults to {}). See PuppetDB Configuration to get more details about the current defaults.

\n\n

Example: to set -Xmx512m -Xms256m options use { '-Xmx' => '512m', '-Xms' => '256m' }

\n\n

puppetdb:server

\n\n

The puppetdb::server class manages the puppetdb server independently of the underlying database that it depends on. It will manage the puppetdb package, service, config files, etc., but will still allow you to manage the database (e.g. postgresql) however you see fit.

\n\n
class { 'puppetdb::server':\n  database_host => 'puppetdb-postgres',\n}\n
\n\n

Parameters within puppetdb::server:

\n\n

Uses the same parameters as puppetdb, with one addition:

\n\n

database_host

\n\n

The hostname or IP address of the database server (defaults to localhost; ignored for embedded db).

\n\n

puppetdb::config

\n\n

The puppetdb::config class directs your primary Puppet server to use PuppetDB, which means that this class should be used on your primary Puppet server node. It’ll verify that it can successfully communicate with your puppetdb server, and then configure your primary Puppet server to use PuppetDB.

\n\n

Using this class involves allowing the module to manipulate your puppet configuration files; in particular: puppet.conf and routes.yaml. The puppet.conf changes are supplemental and should not affect any of your existing settings, but the routes.yaml file will be overwritten entirely. If you have an existing routes.yaml file, you will want to take care to use the manage_routes parameter of this class to prevent the module from managing that file, and you’ll need to manage it yourself.

\n\n
class { 'puppetdb::config':\n  puppetdb_server => 'my.host.name',\n  puppetdb_port   => 8081,\n}\n
\n\n

Parameters within puppetdb::config:

\n\n

puppetdb_server

\n\n

The dns name or ip of the puppetdb server (defaults to the certname of the current node).

\n\n

puppetdb_port

\n\n

The port that the puppetdb server is running on (defaults to 8081).

\n\n

puppetdb_soft_write_failure

\n\n

Boolean to fail in a soft-manner if PuppetDB is not accessable for command submission (defaults to false).

\n\n

manage_routes

\n\n

If true, the module will overwrite the primary Puppet server's routes file to configure it to use PuppetDB (defaults to true).

\n\n

manage_storeconfigs

\n\n

If true, the module will manage the primary Puppet server's storeconfig settings (defaults to true).

\n\n

manage_report_processor

\n\n

If true, the module will manage the 'reports' field in the puppet.conf file to enable or disable the puppetdb report processor. Defaults to 'false'.

\n\n

manage_config

\n\n

If true, the module will store values from puppetdb_server and puppetdb_port parameters in the puppetdb configuration file.\nIf false, an existing puppetdb configuration file will be used to retrieve server and port values.

\n\n

strict_validation

\n\n

If true, the module will fail if puppetdb is not reachable, otherwise it will preconfigure puppetdb without checking.

\n\n

enable_reports

\n\n

Ignored unless manage_report_processor is true, in which case this setting will determine whether or not the puppetdb report processor is enabled (true) or disabled (false) in the puppet.conf file.

\n\n

puppet_confdir

\n\n

Puppet's config directory (defaults to /etc/puppet).

\n\n

puppet_conf

\n\n

Puppet's config file (defaults to /etc/puppet/puppet.conf).

\n\n

puppetdb_version

\n\n

The version of the puppetdb package that should be installed. You may specify an explicit version number, 'present', or 'latest' (defaults to 'present').

\n\n

terminus_package

\n\n

Name of the package to use that represents the PuppetDB terminus code.

\n\n

puppet_service_name

\n\n

Name of the service that represents Puppet. You can change this to apache2 or httpd depending on your operating system, if you plan on having Puppet run using Apache/Passenger for example.

\n\n

puppetdb_startup_timeout

\n\n

The maximum amount of time that the module should wait for PuppetDB to start up. This is most important during the initial install of PuppetDB (defaults to 15 seconds).

\n\n

restart_puppet

\n\n

If true, the module will restart the primary Puppet server when PuppetDB configuration files are changed by the module. The default is 'true'. If set to 'false', you must restart the service manually in order to pick up changes to the config files (other than puppet.conf).

\n\n

puppetdb::database::postgresql

\n\n

The puppetdb::database::postgresql class manages a postgresql server for use by PuppetDB. It can manage the postgresql packages and service, as well as creating and managing the puppetdb database and database user accounts.

\n\n
class { 'puppetdb::database::postgresql':\n  listen_addresses => 'my.postgres.host.name',\n}\n
\n\n

listen_addresses

\n\n

The listen_address is a comma-separated list of hostnames or IP addresses on which the postgres server should listen for incoming connections. This defaults to localhost. This parameter maps directly to postgresql's listen_addresses config option; use a * to allow connections on any accessible address.

\n\n

manage_firewall

\n\n

If set to true this will enable open the local firewall for PostgreSQL protocol access. Defaults to false.

\n\n

database_name

\n\n

Sets the name of the database. Defaults to puppetdb.

\n\n

database_username

\n\n

Creates a user for access the database. Defaults to puppetdb.

\n\n

database_password

\n\n

Sets the password for the database user above. Defaults to puppetdb.

\n\n

Implementation

\n\n

Resource overview

\n\n

In addition to the classes and variables mentioned above, PuppetDB includes:

\n\n

puppetdb::routes

\n\n

Configures the primary Puppet server to use PuppetDB as the facts terminus. WARNING: the current implementation simply overwrites your routes.yaml file; if you have an existing routes.yaml file that you are using for other purposes, you should not use this.

\n\n
class { 'puppetdb::routes':\n  puppet_confdir => '/etc/puppet'\n}\n
\n\n

puppetdb::storeconfigs

\n\n

Configures the primary Puppet server to enable storeconfigs and to use PuppetDB as the storeconfigs backend.

\n\n
class { 'puppetdb::storeconfigs':\n  puppet_conf => '/etc/puppet/puppet.conf'\n}\n
\n\n

puppetdb::server::validate_db

\n\n

Validates that a successful database connection can be established between the node on which this resource is run and the specified puppetdb database instance (host/port/user/password/database name).

\n\n
puppetdb::server::validate_db { 'validate my puppetdb database connection':\n  database_host     => 'my.postgres.host',\n  database_username => 'mydbuser',\n  database_password => 'mydbpassword',\n  database_name     => 'mydbname',\n}\n
\n\n

Custom Types

\n\n

puppetdb_conn_validator

\n\n

Verifies that a connection can be successfully established between a node and the puppetdb server. Its primary use is as a precondition to prevent configuration changes from being applied if the puppetdb server cannot be reached, but it could potentially be used for other purposes such as monitoring.

\n\n

Limitations

\n\n

Currently, PuppetDB is compatible with:

\n\n
Puppet Version: 2.7+\n
\n\n

Platforms:

\n\n
    \n
  • RHEL6
  • \n
  • Debian6
  • \n
  • Ubuntu 10.04
  • \n
  • Archlinux
  • \n
\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n
", "changelog": "
## puppetlabs-puppetdb changelog\n\nRelease notes for the puppetlabs-puppetdb module.\n\n------------------------------------------\n\n#### 3.0.0 - 2013/10/27\n\nThis major release changes the main dependency for the postgresql module from\nversion 2.5.x to 3.x. Since the postgresql module is not backwards compatible,\nthis release is also not backwards compatible. As a consequence we have taken\nsome steps to deprecate some of the older functionality:\n\n* The parameter manage_redhat_firewall for the class puppetdb has now been removed completely in favor of open_postgres_port and open_ssl_listen_port.\n* The parameter manage_redhat_firewall for the class puppetdb::database::postgresql, has now been renamed to manage_firewall.\n* The parameter manage_redhat_firewall for the class puppetdb::server has now been removed completely in favor of open_listen_port and open_ssl_listen_port.\n* The internal class: puppetdb::database::postgresql_db has been removed. If you were using this, it is now defunct.\n* The class puppetdb::server::firewall has been marked as private, do not use it directly.\n* The class puppetdb::server::jetty_ini and puppetdb::server::database_ini have been marked as private, do not use it directly.\n\nAll of this is documented in the upgrade portion of the README.\n\nAdditionally some features have been included in this release as well:\n\n* soft_write_failure can now be enabled in your puppetdb.conf with this\n  module to handle failing silently when your PuppetDB is not available\n  during writes.\n* There is a new switch to enable SSL connectivity to PostgreSQL. While this\n  functionality is only in its infancy this is a good start.\n\nDetailed Changes:\n\n* FM-103: Add metadata.json to all modules. (Ashley Penney)\n* Add soft_write_failure to puppetdb.conf (Garrett Honeycutt)\n* Add switch to configure database SSL connection (Stefan Dietrich)\n* (GH-91) Update to use rspec-system-puppet 2.x (Ken Barber)\n* (GH-93) Switch to using puppetlabs-postgresql 3.x (Ken Barber)\n* Fix copyright and project notice (Ken Barber)\n* Adjust memory for PuppetDB tests to avoid OOM killer (Ken Barber)\n* Ensure ntpdate executes early during testing (Ken Barber)\n\n------------------------------------------\n\n#### 2.0.0 - 2013/10/04\n\nThis major release changes the main dependency for the inifile module from\nthe deprecated `cprice404/inifile` to `puppetlabs/inifile` to remove\ndeprecation warnings and to move onto the latest and greatest implementation\nof that code.\n\nIts a major release, because it may affect other dependencies since modules\ncannot have overlapping second part dependencies (that is inifile cannot be from\ntwo different locations).\n\nIt also adds the parameter `puppetdb_service_status` to the class `puppetdb` to\nallow users to specify whether the module manages the puppetdb service for you.\n\nThe `database_password` parameter is now optional, and initial Arch Linux\nsupport has been added.\n\nDetailed Changes:\n\n* (GH-73) Switch to puppetlabs/inifile from cprice/inifile (Ken Barber)\n* Make database_password an optional parameter (Nick Lewis)\n* add archlinux support (Niels Abspoel)\n* Added puppetdb service control (Akos Hencz)\n\n------------------------------------------\n\n#### 1.6.0 - 2013/08/07\n\nThis minor feature release provides extra parameters for new configuration\nitems available in PuppetDB 1.4, and also provides some older parameters\nthat were missed previously:\n\n* gc_interval\n* log_slow_statements\n* conn_max_age\n* conn_keep_alive\n* conn_lifetime\n\nConsult the README.md file, or the PuppetDB documentation for more details.\n\n------------------------------------------\n\n#### 1.5.0 - 2013/07/18\n\nThis minor feature release provides the following new functionality:\n\n* The module is now capable of managing PuppetDB on SUSE systems\n  for which PuppetDB packages are available\n* The ruby code for validating the PuppetDB connection now\n  supports validating on a non-SSL HTTP port.\n\n------------------------------------------\n\n#### 1.4.0 - 2013/05/13\n\nThis feature release provides support for managing the puppetdb report\nprocessor on your primary Puppet server.\n\nTo enable the report processor, you can do something like this:\n\n    class { 'puppetdb::config':\n        manage_report_processor => true,\n        enable_reports => true\n    }\n\nThis will add the 'puppetdb' report processor to the list of `reports`\ninside your primary Puppet server's `puppet.conf` file.\n\n------------------------------------------\n\n#### 1.3.0 - 2013/05/13\n\nThis feature release provides us with a few new features for the PuppetDB\nmodule.\n\nYou can now disable SSL when using the `puppetdb` class by using the new\nparameter `disable_ssl`:\n\n    class { 'puppetdb':\n      disable_ssl => true,\n    }\n\nThis will remove the SSL settings from your `jetty.ini` configuration file\ndisabling any SSL communication. This is useful when you want to offload SSL\nto another web server, such as Apache or Nginx.\n\nWe have now added an option `java_args` for passing in Java options to\nPuppetDB. The format is a hash that is passed in when declaring the use of the\n`puppetdb` class:\n\n    class { 'puppetdb':\n      java_args => {\n        '-Xmx' => '512m',\n        '-Xms' => '256m',\n      }\n    }\n\nAlso, the default `report-ttl` was set to `14d` in PuppetDB to align it with an\nupcoming PE release, so we've also reflected that default here now.\n\nAnd finally we've fixed the issue whereby the options `report_ttl`, `node_ttl`,\n`node_purge_ttl` and `gc_interval` were not making the correct changes. On top\nof that you can now set these values to zero in the module, and the correct\ntime modifier (`s`, `m`, `h` etc.) will automatically get applied for you.\n\nBehind the scenes we've also added system and unit testing, which was\npreviously non-existent. This should help us reduce regression going forward.\n\nThanks to all the contributing developers in the list below that made this\nrelease possible :-).\n\n#### Changes\n\n* Allows for 0 _ttl's without time signifier and enables tests (Garrett Honeycutt)\n* Add option to disable SSL in Jetty, including tests and documentation (Christian Berg)\n* Cleaned up ghoneycutt's code a tad (Ken Barber)\n* the new settings report_ttl, node_ttl and node_purge_ttl were added but they are not working, this fixes it (fsalum)\n* Also fix gc_interval (Ken Barber)\n* Support for remote puppetdb (Filip Hrbek)\n* Added support for Java VM options (Karel Brezina)\n* Add initial rspec-system tests and scaffolding (Ken Barber)\n\n------------------------------------------\n\n#### 1.2.1 - 2013/04/08\n\nThis is a minor bugfix that solves the PuppetDB startup exception:\n\n    java.lang.AssertionError: Assert failed: (string? s)\n\nThis was due to the default `node-ttl` and `node-purge-ttl` settings not having a time suffix by default. These settings required 's', 'm', 'd' etc. to be suffixed, even if they are zero.\n\n#### Changes\n\n* (Ken Barber) Add 's' suffix to period settings to avoid exceptions in PuppetDB\n\n------------------------------------------\n\n#### 1.2.0 - 2013/04/05\n\nThis release is primarily about providing full configuration file support in the module for PuppetDB 1.2.0. (The alignment of version is a coincidence I assure you :-).\n\nThis feature release adds the following new configuration parameters to the main `puppetdb` class:\n\n* node_ttl\n* node_purge_ttl (available in >=1.2.0)\n* report_ttl\n\nConsult the README for futher details about these new configurable items.\n\n##### Changes\n\n* (Nick Lewis) Add params and ini settings for node/purge/report ttls and document them\n\n------------------------------------------\n\n1.1.5\n=====\n\n2013-02-13 - Karel Brezina\n * Fix database creation so database_username, database_password and\n   database_name are correctly passed during database creation.\n\n2013-01-29 - Lauren Rother\n * Change README to conform to new style and various other README improvements\n\n2013-01-17 - Chris Price\n * Improve documentation in init.pp\n\n------------------------------------------\n\n1.1.4\n=====\n\nThis is a bugfix release, mostly around fixing backward-compatibility for the\ndeprecated `manage_redhat_firewall` parameter.  It wasn't actually entirely\nbackwards-compatible in the 1.1.3 release.\n\n2013-01-17 - Chris Price <chris@puppetlabs.com>\n * Fix backward compatibility of `manage_redhat_firewall` parameter (de20b44)\n\n2013-01-16 - Chris Price <chris@puppetlabs.com>\n * Fix deprecation warnings around manage_redhat_firewall (448f8bc)\n\n------------------------------------------\n\n1.1.3\n=====\n\nThis is mostly a maintenance release, to update the module dependencies to newer\nversions in preparation for some new features.  This release does include some nice\nadditions around the ability to set the listen address for the HTTP port on Jetty\nand manage the firewall for that port.  Thanks very much to Drew Blessing for those\nsubmissions!\n\n2013-01-15 - Chris Price <chris@puppetlabs.com>\n * Update Modulefile for 1.1.3 release (updates dependencies\n   on postgres and inifile modules to the latest versions) (76bfd9e)\n\n2012-12-19 - Garrett Honeycutt <garrett@puppetlabs.com>\n * (#18228) updates README for style (fd2e990)\n\n2012-11-29 - Drew Blessing <Drew.Blessing@Buckle.com>\n * 17594 - Fixes suggested by cprice-puppet (0cf9632)\n\n2012-11-14 - Drew Blessing <Drew.Blessing@Buckle.com>\n * Adjust examples in tests to include new port params (0afc276)\n\n2012-11-13 - Drew Blessing <Drew.Blessing@Buckle.com>\n * 17594 - PuppetDB - Add ability to set standard host listen address and open firewall\n\n------------------------------------------\n\n1.1.2\n=====\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.2)\n * 1.1.2 release\n\n2012-10-26 - Chris Price <chris@puppetlabs.com>\n * Add some more missing `inherit`s for `puppetdb::params` (a72cc7c)\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.2)\n * 1.1.1 release\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> (1.1.1)\n * Add missing `inherit` for `puppetdb::params` (ea9b379)\n\n2012-10-24 - Chris Price <chris@puppetlabs.com>\n * 1.1.0 release\n\n2012-10-24 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update postgres dependency to puppetlabs/postgresql (bea79b4)\n\n2012-10-17 - Reid Vandewiele <reid@puppetlabs.com> (1.1.0)\n * Fix embedded db setup in Puppet Enterprise (bf0ab45)\n\n2012-10-17 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update manifests/main/config.pp (b119a30)\n\n2012-10-16 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Make puppetdb startup timeout configurable (783b595)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add condition to detect PE installations and provide different parameters (63f1c52)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add example manifest code for pe primary Puppet server (a598edc)\n\n2012-10-01 - Chris Price <chris@puppetlabs.com> (1.1.0)\n * Update comments and docs w/rt PE params (b5df5d9)\n\n2012-10-01 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Adding pe_puppetdb tests class (850e039)\n\n2012-09-28 - Hunter Haugen <h.haugen@gmail.com> (1.1.0)\n * Add parameters to enable usage of enterprise versions of PuppetDB (df6f7cc)\n\n2012-09-23 - Chris Price <chris@puppetlabs.com>\n * 1.0.3 release\n\n2012-09-23 - Chris Price <chris@puppetlabs.com>\n * Add a parameter for restarting primary Puppet server (179b337)\n\n2012-09-21 - Chris Price <chris@puppetlabs.com>\n * 1.0.2 release\n\n2012-09-21 - Chris Price <chris@puppetlabs.com>\n * Pass 'manage_redhat_firewall' param through to postgres (f21740b)\n\n2012-09-20 - Chris Price <chris@puppetlabs.com>\n * 1.0.1 release\n\n2012-09-20 - Garrett Honeycutt <garrett@puppetlabs.com>\n * complies with style guide (1aab5d9)\n\n2012-09-19 - Chris Price <chris@puppetlabs.com>\n * Fix invalid subname in database.ini (be683b7)\n\n2011-09-18 Chris Price <chris@puppetlabs.com> - 1.0.0\n* Initial 1.0.0 release\n
", "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-10-29 13:14:09 -0700", "updated_at": "2013-10-29 13:14:09 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-puppetdb-3.0.0", "version": "3.0.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.6.0", "version": "1.6.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.5.0", "version": "1.5.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.4.0", "version": "1.4.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.2.1", "version": "1.2.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.5", "version": "1.1.5" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.4", "version": "1.1.4" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.3", "version": "1.1.3" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.2", "version": "1.1.2" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.1", "version": "1.1.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.3", "version": "1.0.3" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.2", "version": "1.0.2" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-puppetdb-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-puppetdb.git", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/cprice404-inifile", "name": "inifile", "downloads": 31025, "created_at": "2012-08-16 15:48:35 -0700", "updated_at": "2014-01-06 11:58:05 -0800", "owner": { "uri": "/v3/users/cprice404", "username": "cprice404", "gravatar_id": "dd3fc674f6ca99328430094de4d217b7" }, "current_release": { "uri": "/v3/releases/cprice404-inifile-0.10.4", "module": { "uri": "/v3/modules/cprice404-inifile", "name": "inifile", "owner": { "uri": "/v3/users/cprice404", "username": "cprice404", "gravatar_id": "dd3fc674f6ca99328430094de4d217b7" } }, "version": "0.10.4", "metadata": { "name": "cprice404-inifile", "version": "0.10.4", "source": "git://github.com/cprice-puppet/puppetlabs-inifile.git", "author": "Chris Price", "license": "Apache", "summary": "Resource types for managing settings in INI files", "description": "Resource types for managing settings in INI files", "project_page": "https://github.com/cprice-puppet/puppetlabs-inifile", "dependencies": [ ], "types": [ { "name": "ini_setting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the setting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] }, { "name": "ini_subsetting", "doc": "", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value of the subsetting to be defined." } ], "parameters": [ { "name": "name", "doc": "An arbitrary name used as the identity of the resource." }, { "name": "section", "doc": "The name of the section in the ini file in which the setting should be defined." }, { "name": "setting", "doc": "The name of the setting to be defined." }, { "name": "subsetting", "doc": "The name of the subsetting to be defined." }, { "name": "subsetting_separator", "doc": "The separator string between subsettings. Defaults to \" \"" }, { "name": "path", "doc": "The ini file Puppet will ensure contains the specified setting." }, { "name": "key_val_separator", "doc": "The separator string to use between each setting name and value. Defaults to \" = \", but you could use this to override e.g. whether or not the separator should include whitespace." } ], "providers": [ { "name": "ruby", "doc": "" } ] } ], "checksums": { "CHANGELOG": "7b843996c96ef8ff9b0b6f01083c1d49", "Gemfile": "c1c42b64b4095324c99d2d2b359b6d91", "LICENSE": "519b25a3992e0598a9855e4ccd7f66a1", "Modulefile": "bbd23d74c3b0d8047a53657c33f4d4a6", "README.markdown": "b7529219961d006c6a44701b3613c2fd", "lib/puppet/provider/ini_setting/ruby.rb": "6f528a4f961da1a6dbf352be1a062df6", "lib/puppet/provider/ini_subsetting/ruby.rb": "99991c9d3ccf54c2aa1fcacf491d0cfc", "lib/puppet/type/ini_setting.rb": "7a537b5bcbc57d19cf7f80cd97c34e20", "lib/puppet/type/ini_subsetting.rb": "2b7e64f0127552e38b039aa88557fe1e", "lib/puppet/util/external_iterator.rb": "69ad1eb930ca6d8d6b6faea343b4a22e", "lib/puppet/util/ini_file/section.rb": "77757399ed9b9ce352ddcc8b8f9273c4", "lib/puppet/util/ini_file.rb": "bf340178a6c65e1d7a0d95f712ef319d", "lib/puppet/util/setting_value.rb": "a9db550b94d66164b8643612dbf7cbb2", "spec/spec_helper.rb": "7ac8d5b0b5a15c3cf9e730a8e416a7e9", "spec/unit/puppet/provider/ini_setting/ruby_spec.rb": "ca7107e565fcf3a8f480bbf13171d9a0", "spec/unit/puppet/provider/ini_subsetting/ruby_spec.rb": "b05cf15a5830feb249ad7177f7d966ca", "spec/unit/puppet/util/external_iterator_spec.rb": "35cc6e56e0064e496e9151dd778f751f", "spec/unit/puppet/util/ini_file_spec.rb": "d1fc8b3a91d598196e84dab7c0218425", "spec/unit/puppet/util/setting_value_spec.rb": "64db9b766063db958e73e713a3e584fa", "tests/ini_setting.pp": "9c8a9d2c453901cedb106cada253f1f6", "tests/ini_subsetting.pp": "71c82234fa8bb8cb442ff01436ce2cf3" } }, "tags": [ "files", "settings", "ini" ], "file_uri": "/v3/files/cprice404-inifile-0.10.4.tar.gz", "file_size": 18274, "file_md5": "6bc620a4e1043a1888596a6826c7a862", "downloads": 9442, "readme": "

\"Build

\n\n

NOTE: this module has been moved to the Puppet Labs namespace.

\n\n
\n\n

INI-file module

\n\n

This module provides resource types for use in managing INI-style configuration\nfiles. The main resource type is ini_setting, which is used to manage an\nindividual setting in an INI file. Here's an example usage:

\n\n
ini_setting { "sample setting":\n  path    => '/tmp/foo.ini',\n  section => 'foo',\n  setting => 'foosetting',\n  value   => 'FOO!',\n  ensure  => present,\n}\n
\n\n

A supplementary resource type is ini_subsetting, which is used to manage\nsettings that consist of several arguments such as

\n\n
JAVA_ARGS="-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof "\n\nini_subsetting {'sample subsetting':\n  ensure  => present,\n  section => '',\n  key_val_separator => '=',\n  path => '/etc/default/pe-puppetdb',\n  setting => 'JAVA_ARGS',\n  subsetting => '-Xmx',\n  value   => '512m',\n}\n
\n\n

implementing child providers:

\n\n

The ini_setting class can be overridden by child providers in order to implement the management of ini settings for a specific configuration file.

\n\n

In order to implement this, you will need to specify your own Type (as shown below). This type needs to implement a namevar (name), and a property called value:

\n\n

example:

\n\n
#my_module/lib/puppet/type/glance_api_config.rb\nPuppet::Type.newtype(:glance_api_config) do\n  ensurable\n  newparam(:name, :namevar => true) do\n    desc 'Section/setting name to manage from glance-api.conf'\n    # namevar should be of the form section/setting\n    newvalues(/\\S+\\/\\S+/)\n  end\n  newproperty(:value) do\n    desc 'The value of the setting to be defined.'\n    munge do |v|\n      v.to_s.strip\n    end\n  end\nend\n
\n\n

This type also must have a provider that utilizes the ini_setting provider as its parent:

\n\n

example:

\n\n
# my_module/lib/puppet/provider/glance_api_config/ini_setting.rb\nPuppet::Type.type(:glance_api_config).provide(\n  :ini_setting,\n  # set ini_setting as the parent provider\n  :parent => Puppet::Type.type(:ini_setting).provider(:ruby)\n) do\n  # implement section as the first part of the namevar\n  def section\n    resource[:name].split('/', 2).first\n  end\n  def setting\n    # implement setting as the second part of the namevar\n    resource[:name].split('/', 2).last\n  end\n  # hard code the file path (this allows purging)\n  def self.file_path\n    '/etc/glance/glance-api.conf'\n  end\nend\n
\n\n

Now, the individual settings of the /etc/glance/glance-api.conf file can be managed as individual resources:

\n\n
glance_api_config { 'HEADER/important_config':\n  value => 'secret_value',\n}\n
\n\n

Provided that self.file_path has been implemented, you can purge with the following puppet syntax:

\n\n
resources { 'glance_api_config'\n  purge => true,\n}\n
\n\n

If the above code is added, then the resulting configured file will only contain lines implemented as Puppet resources

\n\n

A few noteworthy features:

\n\n
    \n
  • The module tries hard not to manipulate your file any more than it needs to.\nIn most cases, it should leave the original whitespace, comments, ordering,\netc. perfectly intact.
  • \n
  • Supports comments starting with either '#' or ';'.
  • \n
  • Will add missing sections if they don't exist.
  • \n
  • Supports a "global" section (settings that go at the beginning of the file,\nbefore any named sections) by specifying a section name of "".
  • \n
\n
", "changelog": "
2013-05-28 - Chris Price <chris@puppetlabs.com> - 0.10.3\n * Fix bug in subsetting handling for new settings (cbea5dc)\n\n2013-05-22 - Chris Price <chris@puppetlabs.com> - 0.10.2\n * Better handling of quotes for subsettings (1aa7e60)\n\n2013-05-21 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Change constants to class variables to avoid ruby warnings (6b19864)\n\n2013-04-10 - Erik Dalén <dalen@spotify.com> - 0.10.1\n * Style fixes (c4af8c3)\n\n2013-04-02 - Dan Bode <dan@puppetlabs.com> - 0.10.1\n * Add travisfile and Gemfile (c2052b3)\n\n2013-04-02 - Chris Price <chris@puppetlabs.com> - 0.10.1\n * Update README.markdown (ad38a08)\n\n2013-02-15 - Karel Brezina <karel.brezina@gmail.com> - 0.10.0\n * Added 'ini_subsetting' custom resource type (4351d8b)\n\n2013-03-11 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * guard against nil indentation values (5f71d7f)\n\n2013-01-07 - Dan Bode <dan@puppetlabs.com> - 0.10.0\n * Add purging support to ini file (2f22483)\n\n2013-02-05 - James Sweeny <james.sweeny@puppetlabs.com> - 0.10.0\n * Fix test to use correct key_val_parameter (b1aff63)\n\n2012-11-06 - Chris Price <chris@puppetlabs.com> - 0.10.0\n * Added license file w/Apache 2.0 license (5e1d203)\n\n2012-11-02 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Version 0.9.0 released\n\n2012-10-26 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add detection for commented versions of settings (a45ab65)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Refactor to clarify implementation of `save` (f0d443f)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Add example for `ensure=absent` (e517148)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Better handling of whitespace lines at ends of sections (845fa70)\n\n2012-10-20 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Respect indentation / spacing for existing sections and settings (c2c26de)\n\n2012-10-17 - Chris Price <chris@puppetlabs.com> - 0.9.0\n * Minor tweaks to handling of removing settings (cda30a6)\n\n2012-10-10 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Add support for removing lines (1106d70)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make value a property (cbc90d3)\n\n2012-10-02 - Dan Bode <dan@puppetlabs.com> - 0.9.0\n * Make ruby provider a better parent. (1564c47)\n\n2012-09-29 - Reid Vandewiele <reid@puppetlabs.com> - 0.9.0\n * Allow values with spaces to be parsed and set (3829e20)\n\n2012-09-24 - Chris Price <chris@pupppetlabs.com> - 0.0.3\n * Version 0.0.3 released\n\n2012-09-20 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Add validation for key_val_separator (e527908)\n\n2012-09-19 - Chris Price <chris@puppetlabs.com> - 0.0.3\n * Allow overriding separator string between key/val pairs (8d1fdc5)\n\n2012-08-20 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Version 0.0.2 released\n\n2012-08-17 - Chris Price <chris@pupppetlabs.com> - 0.0.2\n * Add support for "global" section at beginning of file (c57dab4)\n
", "license": "
                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!) The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2012 Chris Price\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-07-24 17:17:16 -0700", "updated_at": "2013-07-24 17:17:16 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/cprice404-inifile-0.10.4", "version": "0.10.4" }, { "uri": "/v3/releases/cprice404-inifile-0.10.3", "version": "0.10.3" }, { "uri": "/v3/releases/cprice404-inifile-0.10.2", "version": "0.10.2" }, { "uri": "/v3/releases/cprice404-inifile-0.10.1", "version": "0.10.1" }, { "uri": "/v3/releases/cprice404-inifile-0.10.0", "version": "0.10.0" }, { "uri": "/v3/releases/cprice404-inifile-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/cprice404-inifile-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/cprice404-inifile-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/cprice404-inifile-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/cprice-puppet/puppetlabs-inifile", "issues_url": "" }, { "uri": "/v3/modules/puppetlabs-ruby", "name": "ruby", "downloads": 29188, "created_at": "2010-05-20 22:45:54 -0700", "updated_at": "2014-01-06 14:24:16 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-ruby-0.1.0", "module": { "uri": "/v3/modules/puppetlabs-ruby", "name": "ruby", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.0", "metadata": { "name": "puppetlabs-ruby", "version": "0.1.0", "summary": "Puppet Labs Ruby Module", "source": "https://github.com/puppetlabs/puppetlabs-ruby", "project_page": "https://github.com/puppetlabs/puppetlabs-ruby", "author": "Puppet Labs", "license": "Apache License 2.0", "operatingsystem_support": [ "RedHat", "OpenSUSE", "SLES", "SLED", "Debian", "Ubuntu" ], "puppet_version": [ 2.7, 3.0, 3.1, 3.2, 3.3 ], "description": "Ruby Module for Puppet", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "2eb56073328fd920b96b388d95c73473", "Gemfile": "19e0d6f8d04c49bdf6b633a2758c9204", "Gemfile.lock": "f4391024d9564fc7b9475743007aeae3", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "eaed4b7018419f7385c58567216a5cbd", "README.md": "fa51ccf53fb061ea8119e23cf717d663", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/facter/gemhome.rb": "a9eeb4dda783c97f89c37541af28afb7", "manifests/dev.pp": "ee5276a5772eee8c68204c4463842f03", "manifests/init.pp": "cea631d674f6ee5ca36752cc7d35ae2d", "manifests/params.pp": "b89d96c85b942d8f4d4447d597519c2b", "spec/classes/ruby_spec.rb": "ffcf18046ac223aad3f1bdc09422caf6", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "tests/dev.pp": "4d74853324ca33cc13995f7819948f83", "tests/init.pp": "c3c821d5d8b70fcc6ecbd0b15ed53109", "tests/params.pp": "624af9411bd668264baef475bcc9e54b" } }, "tags": [ "ruby" ], "file_uri": "/v3/files/puppetlabs-ruby-0.1.0.tar.gz", "file_size": 4888, "file_md5": "9bc92c6474e6fddb4e7a0ff747fb3b7d", "downloads": 6724, "readme": "

Ruby Module

\n\n

This module manages Ruby and Rubygems on Debian and Redhat based systems.

\n\n

Parameters

\n\n
    \n
  • version: (default installed) -\nSet the version of Ruby to install

  • \n
  • gems_version: (default installed) -\nSet the version of Rubygems to be installed

  • \n
  • rubygems_update: (default true) -\nIf set to true, the module will ensure that the rubygems package is installed\nbut will use rubygems-update (same as gem update --system but versionable) to\nupdate Rubygems to the version defined in $gems_version. If set to false then\nthe rubygems package resource will be versioned from $gems_version

  • \n
  • ruby_package: (default ruby) -\nSet the package name for ruby

  • \n
  • rubygems_package: (default rubygems) -\nSet the package name for rubygems

  • \n
\n\n

Usage

\n\n

For a standard install using the latest Rubygems provided by rubygems-update on\nCentOS or Redhat use:

\n\n
class { 'ruby':\n  gems_version  => 'latest'\n}\n
\n\n

On Redhat this is equivilant to

\n\n
$ yum install ruby rubygems\n$ gem update --system\n
\n\n

To install a specific version of ruby and rubygems but not use\nrubygems-update use:

\n\n
class { 'ruby':\n  version         => '1.8.7',\n  gems_version    => '1.8.24',\n  rubygems_update => false\n}\n
\n\n

On Redhat this is equivilant to

\n\n
$ yum install ruby-1.8.7 rubygems-1.8.24\n
\n\n

If you need to use different packages for either ruby or rubygems you\ncan. This could be for different versions or custom packages. For\ninstance the following installs ruby 1.9 on Ubuntu 12.04.

\n\n
class { 'ruby':\n  ruby_package     => 'ruby1.9.1-full',\n  rubygems_package => 'rubygems1.9.1',\n  gems_version     => 'latest',\n}\n
\n
", "changelog": "
2013-10-08 - Version 0.1.0\n\nSummary:\n\nRelease an updated version of this. Highlights include OpenSUSE and general\nspring cleaning done by our wonderful community members!\n\nFeatures:\n- OpenSUSE support\n- Allow `rubygems_package` override.\n- Add gemhome fact.\n- Add ri package.\n\nFixes:\n- Lint fixes.\n- Remove virtual irb package.\n- Update dev packages for Ubuntu/Debian\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-10-08 13:01:22 -0700", "updated_at": "2013-10-08 13:01:22 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-ruby-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-ruby-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-ruby-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-ruby", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/puppetlabs-nodejs", "name": "nodejs", "downloads": 28365, "created_at": "2012-05-01 06:38:03 -0700", "updated_at": "2014-01-06 14:19:50 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-nodejs-0.4.0", "module": { "uri": "/v3/modules/puppetlabs-nodejs", "name": "nodejs", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.0", "metadata": { "name": "puppetlabs-nodejs", "version": "0.4.0", "source": "git://github.com/puppetlabs/puppetlabs-nodejs", "author": "Puppet Labs", "license": "Apache 2.0", "summary": "Nodejs & NPM Puppet Module", "description": "Nodejs & NPM Puppet Module.", "project_page": "https://github.com/puppetlabs/puppetlabs-nodejs", "dependencies": [ { "name": "puppetlabs/apt", "version_requirement": ">= 0.0.3" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.0.0" } ], "types": [ ], "checksums": { "CHANGELOG": "7955a904dbe650f532e271ec8566a9e9", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "f6d07e6b82e6c5f0d10b0d8017d86e4a", "README.md": "db4e5ffa9aaa9e6d7d2594c2475e7e47", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/puppet/provider/package/npm.rb": "14e5a15858244609b0d71469d586a5ba", "manifests/init.pp": "697f5262ce210efa6fc3b8fb1c998553", "manifests/npm.pp": "0f3119aa5166655b62b5b9ffaa386182", "manifests/params.pp": "7a41985705a36dfdc4346239747a5ae7", "spec/classes/nodejs_spec.rb": "9599dc4af20bad5c793e125572fc60e8", "spec/fixtures/unit/puppet/provider/pakages/npm/npm_global": "b978830ded964a9000c961528dfd6ef1", "spec/puppetlabs_spec/files.rb": "5f7d2da815b3545f1e3347fac84a36c8", "spec/puppetlabs_spec/fixtures.rb": "795629c4bcad28bf3bb91ff6e5ce97b1", "spec/puppetlabs_spec/matchers.rb": "8e77dc7317de7fc2ff289fb716623b6c", "spec/puppetlabs_spec_helper.rb": "b8e2c657fb91ba7129e679d133169986", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/unit/puppet/provider/pakages/npm_spec.rb": "3c3eebfb16c72d6015416b32fd328338", "tests/init.pp": "575b1a56d1cbce7c4fb2142b4fabc36a", "tests/npm.pp": "eecedf53999fd2f11b25bd34a543c5d6" } }, "tags": [ "debian", "nodejs", "ubuntu", "npm" ], "file_uri": "/v3/files/puppetlabs-nodejs-0.4.0.tar.gz", "file_size": 10243, "file_md5": "4f23875723b6fc070e516b2132367efc", "downloads": 9765, "readme": "

puppet-nodejs module

\n\n

Overview

\n\n

Install nodejs package and npm package provider for Debian, Ubuntu, Fedora, and RedHat.

\n\n

Usage

\n\n

class nodejs

\n\n

Installs nodejs and npm per nodejs documentation.

\n\n
    \n
  • dev_package: whether to install optional dev packages. dev packages not available on all platforms, default: false.
  • \n
\n\n

Example:

\n\n
include nodejs\n
\n\n

You may want to use apt::pin to pin package installation priority on sqeeze. See puppetlabs-apt for more information.

\n\n
apt::pin { 'sid': priority => 100 }\n
\n\n

npm package

\n\n

Two types of npm packages are supported.

\n\n
    \n
  • npm global packages are supported via ruby provider for puppet package type.
  • \n
  • npm local packages are supported via puppet define type nodejs::npm.
  • \n
\n\n

For more information regarding global vs. local installation see nodejs blog

\n\n

package

\n\n

npm package provider is an extension of puppet package type which supports versionable and upgradeable. The package provider only handles global installation:

\n\n

Example:

\n\n
package { 'express':\n  ensure   => latest,\n  provider => 'npm',\n}\n\npackage { 'mime':\n  ensure   => '1.2.4',\n  provider => 'npm',\n}\n
\n\n

nodejs::npm

\n\n

nodejs::npm is suitable for local installation of npm packages:

\n\n
nodejs::npm { '/opt/razor:express':\n  ensure  => present,\n  version => '2.5.9',\n}\n
\n\n

nodejs::npm title consists of filepath and package name seperate via ':', and support the following attributes:

\n\n
    \n
  • ensure: present, absent.
  • \n
  • version: package version (optional).
  • \n
  • source: package source (optional).
  • \n
  • install_opt: option flags invoked during installation such as --link (optional).
  • \n
  • remove_opt: option flags invoked during removal (optional).
  • \n
\n\n

Supported Platforms

\n\n

The module have been tested on the following operating systems. Testing and patches for other platforms are welcomed.

\n\n
    \n
  • Debian Wheezy.
  • \n
  • RedHat EL5.
  • \n
\n
", "changelog": null, "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-08-29 09:00:53 -0700", "updated_at": "2013-08-29 09:00:53 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-nodejs-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-nodejs-0.1.0", "version": "0.1.0" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-nodejs", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/puppetlabs-java", "name": "java", "downloads": 26816, "created_at": "2011-05-25 23:33:22 -0700", "updated_at": "2014-01-06 14:37:21 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-java-1.0.1", "module": { "uri": "/v3/modules/puppetlabs-java", "name": "java", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "1.0.1", "metadata": { "name": "puppetlabs-java", "version": "1.0.1", "source": "git://github.com/puppetlabs/puppetlabs-java", "author": "puppetlabs", "license": "Apache", "summary": "Manage the official Java runtime", "description": "Manage the official Java runtime", "project_page": "https://github.com/puppetlabs/puppetlabs-java", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 0.1.6" } ], "types": [ ], "checksums": { "CHANGELOG": "1aa60de915896b859621be4d46e0f5b7", "Gemfile": "f98e8d931aa0824e21bf184ef0379d01", "Gemfile.lock": "6368f283786fab8823ee646361eaa6ba", "LICENSE": "927881786db06d253bfed0ecf1b42b21", "Modulefile": "6b756d1301e0503d6c718ccffb1d2525", "README.markdown": "d5821001972761ee2b5091676bab6c7a", "Rakefile": "c6a91ef43608c5d4b22bc7e50a94d6a5", "manifests/config.pp": "c7fb36d4ebed20342fbb69369b4dbd0e", "manifests/init.pp": "500f2b08b4c672b650f30fe879d60fec", "manifests/params.pp": "25a266f6009595eab396721bc9b5b546", "spec/classes/java_spec.rb": "52be772dfe3eeb7a71c2223cec6f88ad", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "tests/init.pp": "91a343f9a46d8122c30df67c3d143508" } }, "tags": [ "java", "puppetlabs", "stdlib", "runtime", "jdk", "jre" ], "file_uri": "/v3/files/puppetlabs-java-1.0.1.tar.gz", "file_size": 5733, "file_md5": "62a7f17679f96460f4e81cfca458552a", "downloads": 15597, "readme": "

Java

\n\n

Manage the Java runtime for use with other application software.

\n\n

Currently this deploys the correct Java package on a variety of platforms.

\n
", "changelog": "
1.0.1 (2013-08-01)\n\nMatthaus Owens <matthaus@puppetlabs.com>\n* Update java packages for Fedora systems\n\n1.0.0 (2013-07-29)\n\nKrzysztof Suszyński <krzysztof.suszynski@coi.gov.pl>\n* Adding support for Oracle Enterprise Linux\n\nPeter Drake <pdrake@allplayers.com>\n* Add support for natty\n\nRobert Munteanu <rmuntean@adobe.com>\n* Add support for OpenSUSE\n\nMartin Jackson <martin@uncommonsense-uk.com>\n* Added support Amazon Linux using facter >= 1.7.x\n\nGareth Rushgrove <gareth@morethanseven.net>\nBrett Porter <brett@apache.org>\n* Fixes for older versions of CentOS\n* Improvements to module build and tests\n\nNathan R Valentine <nrvale0@gmail.com>\n* Add support for Ubuntu quantal and raring\n\nSharif Nassar <sharif@mediatemple.net>\n* Add support for Debian alternatives, and more than one JDK/JRE per platform.\n\n2013-04-04 Reid Vandewiele <reid@puppetlabs.com> - 0.3.0\n* Refactor, introduce params pattern\n\n2012-11-15 Scott Schneider <sschneider@puppetlabs.com> - 0.2.0\n* Add Solaris support\n\n2011-06-16 Jeff McCune <jeff@puppetlabs.com> - 0.1.5\n* Add Debian based distro (Lucid) support\n\n2011-06-02 Jeff McCune <jeff@puppetlabs.com> - 0.1.4\n* Fix class composition ordering problems\n\n2011-05-28 Jeff McCune <jeff@puppetlabs.com> - 0.1.3\n* Remove stages\n\n2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2\n* Changes JRE/JDK selection class parameter to $distribution\n\n2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1\n* Re-did versioning to follow semantic versioning\n\n2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 1.0.1\n* Add validation of class parameters\n\n2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 1.0.0\n* Default to JDK version 6u25\n\n2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1\n* Initial release\n
", "license": "
Puppet Java Module - Puppet module for managing Java\n\nCopyright (C) 2011 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-08-01 15:29:02 -0700", "updated_at": "2013-08-01 15:29:02 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-java-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/puppetlabs-java-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/puppetlabs-java-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-java-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-java-0.1.6", "version": "0.1.6" }, { "uri": "/v3/releases/puppetlabs-java-0.1.5", "version": "0.1.5" }, { "uri": "/v3/releases/puppetlabs-java-0.1.4", "version": "0.1.4" }, { "uri": "/v3/releases/puppetlabs-java-0.1.3", "version": "0.1.3" }, { "uri": "/v3/releases/puppetlabs-java-0.1.2", "version": "0.1.2" }, { "uri": "/v3/releases/puppetlabs-java-0.1.1", "version": "0.1.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-java", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/saz-sudo", "name": "sudo", "downloads": 25441, "created_at": "2011-11-23 16:04:49 -0800", "updated_at": "2014-01-06 13:45:36 -0800", "owner": { "uri": "/v3/users/saz", "username": "saz", "gravatar_id": "d24714d241768d79a194d73fc1bdf1ef" }, "current_release": { "uri": "/v3/releases/saz-sudo-2.4.3", "module": { "uri": "/v3/modules/saz-sudo", "name": "sudo", "owner": { "uri": "/v3/users/saz", "username": "saz", "gravatar_id": "d24714d241768d79a194d73fc1bdf1ef" } }, "version": "2.4.3", "metadata": { "name": "saz-sudo", "version": "2.4.3", "summary": "UNKNOWN", "author": "saz", "description": "Manage sudo configuration via Puppet", "dependencies": [ ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "dcb51b5492d3dff3b16327c29422d72f", ".gemfile": "14bd1a18be3e43568e7825c12a3dc0aa", ".gemfile.lock": "046ddaaada79e593701a10a101e7ad21", ".travis.yml": "5df7e090f1137cd317578d3b95b90b79", "LICENSE": "c43ad7837d4770c3823fdab29a78f0e3", "Modulefile": "9465a23df124711d9afff43da85404e8", "README.md": "286bca3e6cfa36bea97d773736d94c5a", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "files/sudoers.aix": "cd782a48b45d845b34262063e4c8c0b1", "files/sudoers.archlinux": "f0038cf3a90e11997ec39131a39b8a50", "files/sudoers.deb": "ebd77e09715c4da6be84d56233139fff", "files/sudoers.freebsd": "4e2d60b0bdc7c3d77ceae7fd9224f47f", "files/sudoers.omnios": "cd782a48b45d845b34262063e4c8c0b1", "files/sudoers.rhel5": "68ba7e0c1d117579112e5ef95464aac5", "files/sudoers.rhel6": "4093e52552d97099d003c645f15f9372", "files/sudoers.solaris": "2d2d9d5be3b5905e42466556f6f1d5ad", "files/sudoers.suse": "40468b19c03962cf383caf5ababed6d0", "files/sudoers.ubuntu": "e8e73f16ed73309df7574c12fbcc0af7", "files/sudoers.wheezy": "730c932c78e53458817e742050edb089", "manifests/allow.pp": "888e9ed1f5e4c6ec4d7309b7dc390296", "manifests/conf.pp": "4faa2945f8bd96c74a56c8ca15dcec12", "manifests/init.pp": "de9b80e6aa05dcd6607d738323d25edf", "manifests/package.pp": "6527c890d10c069af70f6f567e6df8b5", "manifests/package/aix.pp": "d307058ec65d2761a152932f8506ab35", "manifests/params.pp": "aa4148ed4829af2b73f70b30304d7de0", "spec/classes/sudo_spec.rb": "2106485c69f91fddcc29876a23272f75", "spec/defines/sudo_spec.rb": "b7abb219ab26f544c3ad10ab1aa56c4b", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "templates/users_groups.erb": "93854eda68a164a05d3c2aed3efbea6e", "tests/init.pp": "63f528ee1d1698fadd336da35dd4ec7a" }, "source": "UNKNOWN", "project_page": "https://github.com/saz/puppet-sudo", "license": "Apache License, Version 2.0" }, "tags": [ "scientific", "OmniOS", "debian", "ubuntu", "redhat", "security", "sudo", "CentOS", "Gentoo", "solaris", "SuSE", "OpenSUSE", "fedora", "freebsd", "archlinux" ], "file_uri": "/v3/files/saz-sudo-2.4.3.tar.gz", "file_size": 12445, "file_md5": "8b64be688d0aefc71e8f330d950f49b8", "downloads": 1104, "readme": "

puppet-sudo \"Build

\n\n

Manage sudo configuration via Puppet

\n\n

Show some love

\n\n

If you find this module useful, send some bitcoins to 1Na3YFUmdxKxJLiuRXQYJU2kiNqA3KY2j9

\n\n

Usage

\n\n

Install sudo with default sudoers

\n\n
    class { 'sudo': }\n
\n\n

Adding sudoers configuration snippet

\n\n
    class { 'sudo': }\n    sudo::conf { 'web':\n      source => 'puppet:///files/etc/sudoers.d/web',\n    }\n    sudo::conf { 'admins':\n      priority => 10,\n      content  => "%admins ALL=(ALL) NOPASSWD: ALL",\n    }\n    sudo::conf { 'joe':\n      priority => 60,\n      source   => 'puppet:///files/etc/sudoers.d/users/joed',\n    }\n
\n\n

sudo::conf notes

\n\n
    \n
  • You can pass template() through content parameter.
  • \n
  • One of content or source must be set.
  • \n
\n\n

Additional class parameters

\n\n
    \n
  • ensure: present or absent, default: present
  • \n
  • autoupgrade: true or false, default: false
  • \n
  • package: string, default: OS specific. Set package name, if platform is not supported.
  • \n
  • config_file: string, default: OS specific. Set config_file, if platform is not supported.
  • \n
  • config_file_replace: true or false, default: true. Replace config file with module config file.
  • \n
  • config_dir: string, default: OS specific. Set config_dir, if platform is not supported.
  • \n
  • source: string, default: OS specific. Set source, if platform is not supported.
  • \n
\n\n

sudo::conf parameters

\n\n
    \n
  • ensure: present or absent, default: present
  • \n
  • priority: number, default: 10
  • \n
  • content: string, default: undef
  • \n
  • source: string, default: undef
  • \n
  • sudo_config_dir: string, default: OS specific. Set sudo_config_dir, if platform is not supported.
  • \n
\n
", "changelog": null, "license": "
   Copyright 2012 Steffen Zieger\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-12-09 06:12:37 -0800", "updated_at": "2013-12-09 06:12:39 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/saz-sudo-2.4.3", "version": "2.4.3" }, { "uri": "/v3/releases/saz-sudo-2.4.2", "version": "2.4.2" }, { "uri": "/v3/releases/saz-sudo-2.4.1", "version": "2.4.1" }, { "uri": "/v3/releases/saz-sudo-2.4.0", "version": "2.4.0" }, { "uri": "/v3/releases/saz-sudo-2.3.0", "version": "2.3.0" }, { "uri": "/v3/releases/saz-sudo-2.2.0", "version": "2.2.0" }, { "uri": "/v3/releases/saz-sudo-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/saz-sudo-2.0.9", "version": "2.0.9" }, { "uri": "/v3/releases/saz-sudo-2.0.8", "version": "2.0.8" }, { "uri": "/v3/releases/saz-sudo-2.0.7", "version": "2.0.7" }, { "uri": "/v3/releases/saz-sudo-2.0.6", "version": "2.0.6" }, { "uri": "/v3/releases/saz-sudo-2.0.5", "version": "2.0.5" }, { "uri": "/v3/releases/saz-sudo-2.0.4", "version": "2.0.4" }, { "uri": "/v3/releases/saz-sudo-2.0.3", "version": "2.0.3" }, { "uri": "/v3/releases/saz-sudo-2.0.2", "version": "2.0.2" }, { "uri": "/v3/releases/saz-sudo-2.0.1", "version": "2.0.1" }, { "uri": "/v3/releases/saz-sudo-2.0.0", "version": "2.0.0" }, { "uri": "/v3/releases/saz-sudo-1.0.2", "version": "1.0.2" }, { "uri": "/v3/releases/saz-sudo-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/saz-sudo-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/saz/puppet-sudo", "issues_url": "https://github.com/saz/puppet-sudo/issues" }, { "uri": "/v3/modules/puppetlabs-mongodb", "name": "mongodb", "downloads": 23281, "created_at": "2012-05-03 00:45:07 -0700", "updated_at": "2014-01-06 13:45:06 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-mongodb-0.4.0", "module": { "uri": "/v3/modules/puppetlabs-mongodb", "name": "mongodb", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.0", "metadata": { "name": "puppetlabs-mongodb", "version": "0.4.0", "source": "git@github.com:puppetlabs/puppetlabs-mongodb.git", "author": "puppetlabs", "license": "Apache License Version 2.0", "summary": "mongodb puppet module", "description": "10gen mongodb puppet module", "project_page": "https://github.com/puppetlabs/puppetlabs-mongodb", "dependencies": [ { "name": "puppetlabs/apt", "version_requirement": ">= 1.0.0" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.0" } ], "types": [ ], "checksums": { "CHANGELOG": "5f66955b867f38eabe036af074810f40", "Gemfile": "9ed4e2f4cfc1722bf8983483cb7e40d3", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "50f5e144476dd1aedd9f049d0dc5b3d6", "README.md": "07fe7973016520c422d306156d8062d5", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/globals.pp": "600d8923fc55a6daaeb8832e558d479c", "manifests/init.pp": "53eea67456b249bb6259963e5256a7ce", "manifests/params.pp": "0c62018db94ecfcd82264a7ed92a5ba9", "manifests/repo/apt.pp": "3a6235c6e1b83b4ba41e52cbfdc6ba31", "manifests/repo/yum.pp": "0aa5725de002581554b2050e9a1e0656", "manifests/repo.pp": "23b342a75ec156eb9118b07a47086563", "manifests/server/config.pp": "78b62b9aa3759682c4a4f0bf70ef3fed", "manifests/server/install.pp": "95ba8e7a1227163d45427338407b25df", "manifests/server/service.pp": "c79706e48c0635ba72f47a7edef697d3", "manifests/server.pp": "671f2a0739b835cc31dda845fc3bfd97", "spec/classes/repo_spec.rb": "c0ffab073e47ec187d43e2d0ec9762e8", "spec/classes/server_config_spec.rb": "139e54f5646af132aa96da5e683397f8", "spec/classes/server_install_spec.rb": "1e19688c0e2a59c2dedb8116b94eae1a", "spec/classes/server_spec.rb": "e41eafd9f4d458d7730f21ee20849fe5", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "0e2c886ed3570f4491401a0ceccdf762", "spec/system/basic_spec.rb": "0a5b33d18254bedcb7886e34846ebff6", "spec/system/server_10gen_spec.rb": "e6eca5c8001740d20c4611debb99ca35", "spec/system/server_distro_spec.rb": "b051637d82059a884fd2056e0a876989", "templates/mongodb.conf.erb": "446e9521a48df24e787c47603bff9a10", "tests/globals.pp": "1b274b3a5fe7d2347f2f70f285dd7518", "tests/init.pp": "9a09da130383dc0c05eded5ef0744876", "tests/server.pp": "0b47cb9016186fda7c0dc3a66d03d667" } }, "tags": [ "mongodb" ], "file_uri": "/v3/files/puppetlabs-mongodb-0.4.0.tar.gz", "file_size": 14873, "file_md5": "ec56c205fb566e93a5845476d7cd2966", "downloads": 542, "readme": "

mongodb puppet module

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with mongodb
  6. \n
  7. Usage - Configuration options and additional functionality
  8. \n
  9. Reference - An under-the-hood peek at what the module is doing and how
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
\n\n

Overview

\n\n

Installs MongoDB on RHEL/Ubuntu/Debian from OS repo, or alternatively from\n10gen repository installation documentation.

\n\n

Deprecation Warning

\n\n

This release is a major refactoring of the module which means that the API may\nhave changed in backwards incompatible ways. If your project depends on the old API, \nplease pin your dependencies to 0.3 version to ensure your environments don't break.

\n\n

The current module design is undergoing review for potential 1.0 release. We welcome\nany feedback with regard to the APIs and patterns used in this release.

\n\n

Module Description

\n\n

The MongoDB module manages mongod server installation and configuration of the mongod daemon. For the time being it supports only a single\nMongoDB server instance, without sharding and limited replica set \nfunctionality (you can define the replica set parameter in the config file, however\nrs.initiate() has to be done manually).

\n\n

Setup

\n\n

What MongoDB affects

\n\n
    \n
  • MongoDB package.
  • \n
  • MongoDB configuration files.
  • \n
  • MongoDB service.
  • \n
  • 10gen/mongodb apt/yum repository.
  • \n
\n\n

Beginning with MongoDB

\n\n

If you just want a server installation with the default options you can run\ninclude '::mongodb:server'. If you need to customize configuration\noptions you need to do the following:

\n\n
class {'::mongodb::server':\n  port    => 27018,\n  verbose => true,\n}\n
\n\n

Although most distro comes with a prepacked MongoDB server we recommend to\nuse the 10gen/MongoDB software repository, because most of the current OS\npackages are outdated and not appropriate for a production environment.\nTo install MongoDB from 10gen repository:

\n\n
class {'::mongodb::globals':\n  manage_package_repo => true,\n}->\nclass {'::mongodb::server': }\n
\n\n

Usage

\n\n

Most of the interaction for the server is done via mongodb::server. For\nmore options please have a look at monogbd::server.\nAlso in this version we introduced mongodb::globals, which is meant more\nfor future implementation, where you can configure the main settings for\nthis module in a global way, to be used by other classes and defined resources. \nOn its own it does nothing.

\n\n

Reference

\n\n

Classes

\n\n

Public classes

\n\n
    \n
  • mongodb::server: Installs and configure MongoDB
  • \n
  • mongodb::globals: Configure main settings on a global way
  • \n
\n\n

Private classes

\n\n
    \n
  • mongodb::repo: Manage 10gen/MongoDB software repository
  • \n
  • mongodb::repo::apt: Manage Debian/Ubuntu apt 10gen/MongoDB repository
  • \n
  • mongodb::repo::yum: Manage Redhat/CentOS apt 10gen/MongoDB repository
  • \n
  • mongodb::server::config: Configures MongoDB configuration files
  • \n
  • mongodb::server::install: Install MongoDB software packages
  • \n
  • mongodb::server::service: Manages service
  • \n
\n\n

Class: mongodb::globals

\n\n

Note: most server specific defaults should be overridden in the mongodb::server\nclass. This class should only be used if you are using a non-standard OS or\nif you are changing elements such as version or manage_package_repo that\ncan only be changed here.

\n\n

This class allows you to configure the main settings for this module in a\nglobal way, to be used by the other classes and defined resources. On its\nown it does nothing.

\n\n
server_package_name
\n\n

This setting can be used to override the default MongoDB server package\nname. If not specified, the module will use whatever package name is the\ndefault for your OS distro.

\n\n
service_name
\n\n

This setting can be used to override the default MongoDB service name. If not\nspecified, the module will use whatever service name is the default for your OS distro.

\n\n
service_provider
\n\n

This setting can be used to override the default MongoDB service provider. If\nnot specified, the module will use whatever service provider is the default for\nyour OS distro.

\n\n
service_status
\n\n

This setting can be used to override the default status check command for\nyour MongoDB service. If not specified, the module will use whatever service\nname is the default for your OS distro.

\n\n
user
\n\n

This setting can be used to override the default MongoDB user and owner of the\nservice and related files in the file system. If not specified, the module will\nuse the default for your OS distro.

\n\n
group
\n\n

This setting can be used to override the default MongoDB user group to be used\nfor related files in the file system. If not specified, the module will use\nthe default for your OS distro.

\n\n
bind_ip
\n\n

This setting can be used to configure MonogDB process to bind to and listen\nfor connections from applications on this address. If not specified, the\nmodule will use the default for your OS distro.\nNote: This value should be passed an an array.

\n\n
version
\n\n

The version of MonogDB to install/manage. This is a simple way of providing\na specific version such as '2.2' or '2.4' for example. If not specified,\nthe module will use the default for your OS distro.

\n\n

Class: mongodb::server

\n\n

Most of the parameters manipulates the mongod.conf file.

\n\n

For more details about configuration parameters consult the MongoDB Configuration File Options.

\n\n
ensure
\n\n

enable or disable the service

\n\n
config
\n\n

Path of the config file. If not specified, the module will use the default\nfor your OS distro.

\n\n
dbpath
\n\n

Set this value to designate a directory for the mongod instance to store\nit's data. If not specified, the module will use the default for your OS distro.

\n\n
pidfilepath
\n\n

Specify a file location to hold the PID or process ID of the mongod process.\nIf not specified, the module will use the default for your OS distro.

\n\n
logpath
\n\n

Specify the path to a file name for the log file that will hold all diagnostic\nlogging information. Unless specified, mongod will output all log information\nto the standard output.

\n\n
bind_ip
\n\n

Set this option to configure the mongod or mongos process to bind to and listen\nfor connections from applications on this address. If not specified, the module\nwill use the default for your OS distro. Example: bind_ip=['127.0.0.1', '192.168.0.3']\nNote: bind_ip accept array as a value.

\n\n
logappend
\n\n

Set to true to add new entries to the end of the logfile rather than overwriting\nthe content of the log when the process restarts. Default: True

\n\n
fork
\n\n

Set to true to enable database authentication for users connecting from remote\nhosts. If not specified, the module will use the default for your OS distro.

\n\n
port
\n\n

Specifies a TCP port for the server instance to listen for client connections. \nDefault: 27017

\n\n
journal
\n\n

Set to true to enable operation journaling to ensure write durability and\ndata consistency. Default: on 64-bit systems true and on 32-bit systems false

\n\n
nojournal
\n\n

Set nojournal = true to disable durability journaling. By default, mongod\nenables journaling in 64-bit versions after v2.0. \nDefault: on 64-bit systems false and on 32-bit systems true

\n\n

Note: You must use journal to enable journaling on 32-bit systems.

\n\n
smallfiles
\n\n

Set to true to modify MongoDB to use a smaller default data file size. \nSpecifically, smallfiles reduces the initial size for data files and\nlimits them to 512 megabytes. Default: false

\n\n
cpu
\n\n

Set to true to force mongod to report every four seconds CPU utilization\nand the amount of time that the processor waits for I/O operations to\ncomplete (i.e. I/O wait.) Default: false

\n\n
auth
\n\n

Set to true to enable database authentication for users connecting from\nremote hosts. If no users exist, the localhost interface will continue\nto have access to the database until you create the first user. \nDefault: false

\n\n
noauth
\n\n

Disable authentication. Currently the default. Exists for future compatibility\n and clarity.

\n\n
verbose
\n\n

Increases the amount of internal reporting returned on standard output or in\nthe log file generated by logpath. Default: false

\n\n
verbositylevel
\n\n

MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv.\nDefault: None

\n\n
objcheck
\n\n

Forces the mongod to validate all requests from clients upon receipt to ensure\nthat clients never insert invalid documents into the database. \nDefault: on v2.4 default to true and on earlier version to false

\n\n
quota
\n\n

Set to true to enable a maximum limit for the number data files each database\ncan have. The default quota is 8 data files, when quota is true. Default: false

\n\n
quotafiles
\n\n

Modify limit on the number of data files per database. This option requires the\nquota setting. Default: 8

\n\n
diaglog
\n\n

Creates a very verbose diagnostic log for troubleshooting and recording various\nerrors. Valid values: 0, 1, 2, 3 and 7. \nFor more information please refer to MongoDB Configuration File Options.

\n\n
directoryperdb
\n\n

Set to true to modify the storage pattern of the data directory to store each\ndatabase’s files in a distinct folder. Default: false

\n\n
profile
\n\n

Modify this value to changes the level of database profiling, which inserts\ninformation about operation performance into output of mongod or the\nlog file if specified by logpath.

\n\n
maxconns
\n\n

Specifies a value to set the maximum number of simultaneous connections\nthat MongoDB will accept. Default: depends on system (i.e. ulimit and file descriptor)\nlimits. Unless set, MongoDB will not limit its own connections.

\n\n
oplog_size
\n\n

Specifies a maximum size in megabytes for the replication operation log \n(e.g. oplog.) mongod creates an oplog based on the maximum amount of space\navailable. For 64-bit systems, the oplog is typically 5% of available disk space.

\n\n
nohints
\n\n

Ignore query hints. Default: None

\n\n
nohttpinterface
\n\n

Set to true to disable the HTTP interface. This command will override the rest\nand disable the HTTP interface if you specify both. Default: false

\n\n
noscripting
\n\n

Set noscripting = true to disable the scripting engine. Default: false

\n\n
notablescan
\n\n

Set notablescan = true to forbid operations that require a table scan. Default: false

\n\n
noprealloc
\n\n

Set noprealloc = true to disable the preallocation of data files. This will shorten\nthe start up time in some cases, but can cause significant performance penalties\nduring normal operations. Default: false

\n\n
nssize
\n\n

Use this setting to control the default size for all newly created namespace f\niles (i.e .ns). Default: 16

\n\n
mms_token
\n\n

MMS token for mms monitoring. Default: None

\n\n
mms_name
\n\n

MMS identifier for mms monitoring. Default: None

\n\n
mms_interval
\n\n

MMS interval for mms monitoring. Default: None

\n\n
replset
\n\n

Use this setting to configure replication with replica sets. Specify a replica\nset name as an argument to this set. All hosts must have the same set name.

\n\n
rest
\n\n

Set to true to enable a simple REST interface. Default: false

\n\n
slowms
\n\n

Sets the threshold for mongod to consider a query “slow†for the database profiler. \nDefault: 100 ms

\n\n
keyfile
\n\n

Specify the path to a key file to store authentication information. This option \nis only useful for the connection between replica set members. Default: None

\n\n
primary Puppet server
\n\n

Set to true to configure the current instance to act as primary Puppet server instance in a\nreplication configuration. Default: False Note: deprecated – use replica sets

\n\n
replica
\n\n

Set to true to configure the current instance to act as replica instance in a\nreplication configuration. Default: false\nNote: deprecated – use replica sets

\n\n
only
\n\n

Used with the replica option, only specifies only a single database to\nreplicate. Default: <> \nNote: deprecated – use replica sets

\n\n
source
\n\n

Used with the replica setting to specify the primary Puppet server instance from which\nthis replica instance will replicate. Default: <> \nNote: deprecated – use replica sets

\n\n

Limitation

\n\n

This module has been tested on:

\n\n
    \n
  • Debian 7.* (Wheezy)
  • \n
  • Debian 6.* (squeeze)
  • \n
  • Ubuntu 12.04.2 (precise)
  • \n
  • Ubuntu 10.04.4 LTS (lucid)
  • \n
  • RHEL 5/6
  • \n
  • CentOS 5/6
  • \n
\n\n

For a for list of tested OS please have a look at the .nodeset.xml definition.

\n\n

Development

\n\n

Puppet Labs modules on the Puppet Forge are open projects, and community\ncontributions are essential for keeping them great. We can’t access the\nhuge number of platforms and myriad of hardware, software, and deployment\nconfigurations that Puppet is intended to serve.

\n\n

We want to keep it as easy as possible to contribute changes so that our\nmodules work in your environment. There are a few guidelines that we need\ncontributors to follow so that we can have a chance of keeping on top of things.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Testing

\n\n

There are two types of tests distributed with this module. Unit tests with\nrspec-puppet and system tests using rspec-system.

\n\n

unit tests should be run under Bundler with the gem versions as specified\nin the Gemfile. To install the necessary gems:

\n\n
bundle install --path=vendor\n
\n\n

Test setup and teardown is handled with rake tasks, so the\nsupported way of running tests is with

\n\n
bundle exec rake spec\n
\n\n

For system test you will also need to install vagrant > 1.3.x and virtualbox > 4.2.10.\nTo run the system tests

\n\n
bundle exec rake spec:system\n
\n\n

To run the tests on different operating systems, see the sets available in .nodeset.xml\nand run the specific set with the following syntax:

\n\n
RSPEC_SET=ubuntu-server-12042-x64 bundle exec rake spec:system\n
\n\n

Authors

\n\n

We would like to thank everyone who has contributed issues and pull requests to this modules.\nA complete list of contributors can be found on the \nGitHub Contributor Graph\nfor the puppetlabs-mongodb module.

\n
", "changelog": "
2013-10-31 - Version 0.3.0\n\nSummary:\n\nAdds a number of parameters and fixes some platform\nspecific bugs in module deployment.\n\n2013-09-25 - Version 0.2.0\n\nSummary:\n\nThis release fixes a duplicate parameter.\n\nFixes:\n- Fix a duplicated parameter.\n\n2012-07-13 Puppet Labs <info@puppetlabs.com> - 0.1.0\n* Add support for RHEL/CentOS\n* Change default mongodb install location to OS repo\n\n2012-05-29 Puppet Labs <info@puppetlabs.com> - 0.0.2\n* Fix Modulefile typo.\n* Remove repo pin.\n* Update spec tests and add travis support.\n\n2012-05-03 Puppet Labs <info@puppetlabs.com> - 0.0.1\n* Initial Release.\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-18 11:21:51 -0800", "updated_at": "2013-12-18 11:21:51 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-mongodb-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.3.0-rc1", "version": "0.3.0-rc1" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-mongodb-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-mongodb", "issues_url": "https://tickets.puppetlabs.com" } ] } puppet_forge-5.0.3/spec/fixtures/v3/modules__owner=puppetlabs.headers0000644000004100000410000000062314515571425026166 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:08 GMT Content-Type: application/json;charset=utf-8 Content-Length: 690107 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 06 Jan 2014 22:42:07 GMT X-Node: forgeapi04 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/releases__module=puppetlabs-apache.json0000644000004100000410000167155214515571425027251 0ustar www-datawww-data{ "pagination": { "limit": 20, "offset": 0, "first": "/v3/releases?module=puppetlabs-apache&limit=20&offset=0", "previous": null, "current": "/v3/releases?module=puppetlabs-apache&limit=20&offset=0", "next": null, "total": 17 }, "results": [ { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.6.0", "metadata": { "summary": "Puppet module for Apache", "author": "puppetlabs", "version": "0.6.0", "types": [ { "doc": "Manage Apache 2 modules", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" }, { "doc": "Module identifier string used by LoadModule. Default: module-name_module", "name": "identifier" } ], "name": "a2mod" } ], "checksums": { "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/defines/vhost/proxy_spec.rb": "de5cd37d9137791383b6a521feddfb82", "templates/httpd.conf.erb": "63e07e1d3428ecc3da8e812eb2524978", "spec/defines/vhost/redirect_spec.rb": "98f2a7022b7302a771d811e424454639", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "Gemfile": "e87c237ce1d9c2a91e439b8b6d5535a9", "CHANGELOG": "c682326786c52fa91a2f13ae48b4d018", "manifests/vhost/proxy.pp": "1b907bd712e0ac17385cd822a992d87d", "Modulefile": "32454a7842eb7df4461e4b0bf52a15bb", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "spec/classes/php_spec.rb": "7c176dcb6cf35adce2d0ff3d17678f8a", "manifests/params.pp": "df442b5ea6cd7ec31e7eca15ac6b6f87", "manifests/mod/disk_cache.pp": "a6ce6b0d3393bff8287f6267dd49bc82", "manifests/vhost/redirect.pp": "7fb0fe676efa6bbc7de653d0651235c1", "manifests/mod/proxy_html.pp": "8cb51fa968a18d957274a2b68cca8216", "README.md": "9e8a84ba0cf502551d3b1c0e34320864", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "templates/vhost-default.conf.erb": "6d0ca4c613f92f58f5e960ec0512d3f4", "spec/classes/mod/ssl_spec.rb": "df737098c4bd03179e29d0c22a80a565", "templates/vhost-proxy.conf.erb": "21b2be5facb504dc7874f705c7c0882f", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "spec/classes/dev_spec.rb": "64d66d5074a1d634d765db182bea5e43", "spec/classes/python_spec.rb": "ce7b11e4fb4e7bfe5b5c18ded9d24897", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "spec/classes/mod/python_spec.rb": "99f05654c0b748ab18096c5cf4b74781", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "manifests/mod/dev.pp": "71234485e642f0e8cdd8774670d48b7f", "spec/classes/mod/wsgi_spec.rb": "7a05c23e66b027d4738ce1368f6d9f43", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "manifests/vhost.pp": "1643658d86e883b2bb68c4e8a2674035", "manifests/mod/dav_fs.pp": "c6acce86fe14f75521dc8c2920ccedf7", "manifests/mod/php.pp": "6de0671e78c1411cc0713f80075ef61f", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "manifests/mod/python.pp": "344f7b359d801ee6942211726004fa93", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/defines/mod_spec.rb": "c7e74bfdc295af1c0280a7df9828dea0", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/mod.pp": "f8e6c202844b424d4b4b730813f4c6d3", "lib/puppet/provider/a2mod/redhat.rb": "90b9add30cf9acf2289a51d9f4c31bd7", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "spec/classes/apache_spec.rb": "10f2a7629c7e596864f5c0b3c2ece6cf", "manifests/dev.pp": "c263f8db2a35361e9dfdef30477f8ee3", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "spec/classes/ssl_spec.rb": "67c8ccf6b5055f50f40978b221873c88", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/init.pp": "91cc24165436ab241855eb897fcc71b9", "manifests/mod/ssl.pp": "2ffd543847785cd2f916f244f8742448", "spec/classes/params_spec.rb": "41f4e90e9cbe23e5c81831248b2f3cd4", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/passenger.pp": "0bb9e5d4a49b72e56b7a909da42c47bc", "spec/classes/mod/auth_kerb_spec.rb": "6b71ffa45b4a0a1476ee56c75c26e6db", "spec/defines/vhost_spec.rb": "ccea97121bfcab1b50517d4413a55c99", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd" }, "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "name": "puppetlabs-apache", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ], "description": "Module for Apache configuration", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.6.0.tar.gz", "file_size": 31302, "file_md5": "89fa11aef710c060e0bf9f9ff2cae455", "downloads": 25919, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::mod::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Dependencies

\n\n

Some functionality is dependent on other modules:

\n\n\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-03-28 15:44:52 -0700", "updated_at": "2013-03-28 15:44:52 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.9.0", "metadata": { "name": "puppetlabs-apache", "version": "0.9.0", "summary": "Puppet module for Apache", "author": "puppetlabs", "description": "Module for Apache configuration", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo" }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs" }, { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" } ], "name": "a2mod", "doc": "Manage Apache 2 modules" } ], "checksums": { ".bundle/config": "b898efea5e8783d6593fcdabec67e925", ".fixtures.yml": "b67781fff881cf708d92df4851cf0e70", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "d0bd592680200f18b2ef4088c2569701", "CHANGELOG.md": "483202a1f4f08294d798c0685c518108", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "74613ef355389b668fc4b51a0f9eac39", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "fef4b236b7d7885250ca64dbe6074e0a", "README.md": "d3cb59220928734b6d41a6f3a0302c64", "README.passenger.md": "9007ae9e57138bed0c01ae58607ec2aa", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/default_mods.pp": "8493f16440d3eb7b9d392049dfef680b", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/dev.pp": "606c3cbe27f32b61cfcbd15fb211890c", "manifests/init.pp": "b0d1433c1848ee81f18d528fcdf5abec", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod.pp": "fc66b79d9086d8d296c372d605d31890", "manifests/mod/alias.pp": "f5d65ca4755f5464b32c5f95fd42a052", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "63bd38d692ec78f351a6f234f29c2f16", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "93fce4f45e7a85e9d6eb2b745390eaba", "manifests/mod/dav_svn.pp": "85a9a3efe5cce6096d89cf29195e6dc1", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "da3b7f47ce079f20db2d20e2d6539c11", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "852588a26f2635979abf24fd33f1a9ff", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "c9ff4215f9308fd729e96a8d76d3fe1d", "manifests/mod/mime_magic.pp": "9c3a73f877de39c1db2178b827c4a86d", "manifests/mod/mpm_event.pp": "c1540d87cfb2b4a4631c4cc5d3e191f5", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/passenger.pp": "29fca0851862aaaa836acf25718c08cc", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/php.pp": "247915331ce4ee815a0c032897a83157", "manifests/mod/prefork.pp": "2eb8a29fa3a81b4b8ade96989ef06742", "manifests/mod/proxy.pp": "e0e9f9963f720501d9b53ab9fb35f256", "manifests/mod/proxy_balancer.pp": "c71c8ae1eb91d29ec26e19899db2bfec", "manifests/mod/proxy_html.pp": "25cbac9bc2553bc3a18ede060a1a14fd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "80ee4f522104719f07aa2be33d320973", "manifests/mod/status.pp": "1619d96a0d9b9534145209c98c683cbe", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "36bdeaa252d3ba3c14296bbcf2acb9b0", "manifests/mod/wsgi.pp": "092d35c267e671444d42e2243606bc99", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/params.pp": "525b2ac104a0a4922f6be584bc5c6e9d", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "8e5145ad7866adb9b1f26494559ba6a7", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost.pp": "2242685bed5db4a4fa08ebfe1f836084", "spec/classes/apache_spec.rb": "dbeb82d859d03037b86c754d2e9437b9", "spec/classes/dev_spec.rb": "ecc212316f7801f427fa4c30ca65e259", "spec/classes/mod/auth_kerb_spec.rb": "70e2d94d84724a1b54aff6a9dede1ca6", "spec/classes/mod/dav_svn_spec.rb": "6b014a30e017a6cf30bdc4221e4a15b9", "spec/classes/mod/dev_spec.rb": "27a9d92460a3e62842b5e64f7154f893", "spec/classes/mod/dir_spec.rb": "e462dbea87eb1211e496f60e40538370", "spec/classes/mod/fcgid_spec.rb": "3bd6c0638347b763a88e44d5d7216cb0", "spec/classes/mod/info_spec.rb": "3921a934a1d41c6e1cce328a45b3cc1d", "spec/classes/mod/itk_spec.rb": "e9edc7ebebeda4cea0bf896c597c2267", "spec/classes/mod/passenger_spec.rb": "959b0a3235999e5201980871ea2b862a", "spec/classes/mod/perl_spec.rb": "0ba258605762d1fa25398a08e90157e4", "spec/classes/mod/php_spec.rb": "c4050e546d010f0dcb5a8bd580b5f3ed", "spec/classes/mod/prefork_spec.rb": "0f7de99f1fb58670f11fde4f7280e99e", "spec/classes/mod/proxy_html_spec.rb": "bf313b5dfdd2c9f3054f4b791c32a84c", "spec/classes/mod/python_spec.rb": "2b8079e833cbe6313435a72d9fc00cb9", "spec/classes/mod/ssl_spec.rb": "53b8ecefa9ce0af2562d8183c063167d", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "f3324663e5f93d1b73911276bd984e79", "spec/classes/mod/wsgi_spec.rb": "c41bc8e4cc95a87d1448e06b7d8001eb", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "3448d0a4256bd806902c45f2c13bf5a6", "spec/defines/mod_spec.rb": "d82643d472be88a65cd202381099ed6f", "spec/defines/vhost_spec.rb": "4535046a2cf7d7f9745020b92503f2e4", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "ada9b7ebb090d6b4e62db22b3c82b330", "spec/system/default_mods_spec.rb": "b57b9deb89c3905a7a7d9ca9e573f62f", "spec/system/itk_spec.rb": "cbce8cac9e311b2cfce48eb2369ced7b", "spec/system/mod_php_spec.rb": "9bc01054af24b981fa1c49ac723469fc", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "d7b05867fd73464971919fd4393b3719", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "2e3c1fa5ab5a6e4f8513c68904e52269", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/httpd.conf.erb": "154af1419ad44722c9f33bd1eb9a9637", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "669fc0a80839be3a81e2f4d4150c3ad6", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "2fa646fe615e44d137a5d629f868c107", "templates/mod/mime_magic.conf.erb": "8a4f61bd7539871cb507cc95f5dbd205", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/passenger.conf.erb": "6e0c2d796b5e67aa366eadc53c963a5e", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "ae1cd187ffbd5cc9b74f8711e313e96b", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "2567261763976c62a4388abb62ae1e03", "templates/mod/status.conf.erb": "da061291068f8e20cf33812373319c40", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "7e098b0013f6e64e935bf244f7efcd67", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost.conf.erb": "bc0f0bae3b149c8b78d9127714f2d28c", "templates/vhost/_aliases.erb": "319183dd74f4b231747fffa7b4a939f3", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "5131331896f3839221e1231e28b6e509", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "8faa613a00584432f99956f4b0ac1fbd", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "0373372000ca3198594f32ac637a9462", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "5451565f3c34abdd50024af607ed9dc1", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/vhost.pp": "70ce947e12f9b344a24f95a08e622c6c", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" }, "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.9.0.tar.gz", "file_size": 62433, "file_md5": "97ab32e19f65dbe6d7f42b3e5c3ada8e", "downloads": 18449, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to 'true', meaning the service is enabled/running.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'false'.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended concequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::prefork, apache::mod::worker and apache::mod::itk classes. Must be set to false to explicitly declare apache::mod::worker, apache::mod::worker or apache::mod::itk classes with parameters. Valid values are worker, prefork, itk (Debian), or the boolean false. Defaults to prefork on RedHat and worker on Debian.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • deflate
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • fcgid
  • \n
  • info
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template

\n\n
    class { 'apache::mod::ssl': }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [ { alias => '/alias', path => '/path/to/directory' } ],\n
\n\n

For Alias to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

The directives will be embedded within the Directory directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow, Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
sslproxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": null, "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-09-06 14:49:24 -0700", "updated_at": "2013-09-06 14:49:24 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.8.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.8.1", "metadata": { "name": "puppetlabs-apache", "version": "0.8.1", "summary": "Puppet module for Apache", "author": "puppetlabs", "description": "Module for Apache configuration", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" }, { "name": "ripienaar/concat", "version_requirement": ">= 0.2.0" } ], "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs" }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo" } ], "name": "a2mod", "doc": "Manage Apache 2 modules" } ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "abe7da15beecab9f2023d55185f90bbb", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "e18e7deea7676026028b8b287c36935a", "CHANGELOG": "adba9a757b6a95b68ed92d6963a2f8fd", "Gemfile": "3a276fb813c6fccbac8fa8893cff9299", "Gemfile.lock": "7d8f10dc30686dcf4c3365d1903390b1", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "46b069926a4730f17d1462f1d4e82ad8", "README.md": "195dc5cf038b80a61a1574c9d52e8a31", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/provider/a2mod/a2mod.rb": "c54df991f0cd63b90ceafad68d6670a5", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "89f0a44bc469b6197bd648b8e606ff6b", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/balancer.pp": "7ecb1536337337a1b81e34b5ea75ac84", "manifests/balancermember.pp": "d24354d979dd3dc112757f89d69902f5", "manifests/default_mods.pp": "a4bb67920d93a0cea882bd9ab196f3c6", "manifests/dev.pp": "606c3cbe27f32b61cfcbd15fb211890c", "manifests/init.pp": "ae2d79ff4bcfefe6b9d5573891dc30a3", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod.pp": "fc66b79d9086d8d296c372d605d31890", "manifests/mod/alias.pp": "f5d65ca4755f5464b32c5f95fd42a052", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "63bd38d692ec78f351a6f234f29c2f16", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "93fce4f45e7a85e9d6eb2b745390eaba", "manifests/mod/dav_svn.pp": "85a9a3efe5cce6096d89cf29195e6dc1", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "da3b7f47ce079f20db2d20e2d6539c11", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "c9ff4215f9308fd729e96a8d76d3fe1d", "manifests/mod/mime_magic.pp": "9c3a73f877de39c1db2178b827c4a86d", "manifests/mod/mpm_event.pp": "c1540d87cfb2b4a4631c4cc5d3e191f5", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/passenger.pp": "4bb1e37a8c2c25319d5cc8e28f6112b4", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/php.pp": "247915331ce4ee815a0c032897a83157", "manifests/mod/prefork.pp": "f629fc3968e4ef8864d61d2552765995", "manifests/mod/proxy.pp": "e0e9f9963f720501d9b53ab9fb35f256", "manifests/mod/proxy_html.pp": "25cbac9bc2553bc3a18ede060a1a14fd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "80ee4f522104719f07aa2be33d320973", "manifests/mod/status.pp": "1619d96a0d9b9534145209c98c683cbe", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "d3097be363188d34ca84cb438e4754e0", "manifests/mod/wsgi.pp": "86b284ccc6571fb702eb2647c975d3a3", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/params.pp": "8d13a3b62cf742f40c018b330d72bcac", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost.pp": "2febd978c6f3ade1e8d8780e3b6c83f4", "spec/classes/apache_spec.rb": "0f0b7d9910cf54eaad5a53acf5b2286d", "spec/classes/dev_spec.rb": "ecc212316f7801f427fa4c30ca65e259", "spec/classes/mod/auth_kerb_spec.rb": "70e2d94d84724a1b54aff6a9dede1ca6", "spec/classes/mod/dav_svn_spec.rb": "6b014a30e017a6cf30bdc4221e4a15b9", "spec/classes/mod/dev_spec.rb": "27a9d92460a3e62842b5e64f7154f893", "spec/classes/mod/dir_spec.rb": "e462dbea87eb1211e496f60e40538370", "spec/classes/mod/fcgid_spec.rb": "3bd6c0638347b763a88e44d5d7216cb0", "spec/classes/mod/info_spec.rb": "3921a934a1d41c6e1cce328a45b3cc1d", "spec/classes/mod/passenger_spec.rb": "521ed527cc9f43d8f9a4ccde03e84daf", "spec/classes/mod/perl_spec.rb": "0ba258605762d1fa25398a08e90157e4", "spec/classes/mod/php_spec.rb": "c4050e546d010f0dcb5a8bd580b5f3ed", "spec/classes/mod/prefork_spec.rb": "0f7de99f1fb58670f11fde4f7280e99e", "spec/classes/mod/proxy_html_spec.rb": "bf313b5dfdd2c9f3054f4b791c32a84c", "spec/classes/mod/python_spec.rb": "2b8079e833cbe6313435a72d9fc00cb9", "spec/classes/mod/ssl_spec.rb": "53b8ecefa9ce0af2562d8183c063167d", "spec/classes/mod/worker_spec.rb": "f3324663e5f93d1b73911276bd984e79", "spec/classes/mod/wsgi_spec.rb": "33dc2afdcc040397d8dec6726d439346", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/defines/mod_spec.rb": "d82643d472be88a65cd202381099ed6f", "spec/defines/vhost_spec.rb": "1cf770757c53757aec11086cb2e6baf7", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/fixtures/system/distro_commands.yaml": "d9617961568154565a6725a3831408d3", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "61560d4eb97f7531d378462050a7c423", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "61b330fe643b16041cd3c1830fff48a6", "spec/system/mod_php_spec.rb": "b2c39f0a5f35f5c860e99798b6605413", "spec/system/prefork_worker_spec.rb": "d7b05867fd73464971919fd4393b3719", "spec/system/vhost_spec.rb": "8c1f24de9e391fb6c4ae88ed3084d9a3", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/httpd.conf.erb": "faf2a55d29d91b2bde7cbc004d4c95e3", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "669fc0a80839be3a81e2f4d4150c3ad6", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "2fa646fe615e44d137a5d629f868c107", "templates/mod/mime_magic.conf.erb": "8a4f61bd7539871cb507cc95f5dbd205", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/passenger.conf.erb": "d9c51acf8e19cd8eaf5621ebfd6edba4", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "ae1cd187ffbd5cc9b74f8711e313e96b", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "2567261763976c62a4388abb62ae1e03", "templates/mod/status.conf.erb": "da061291068f8e20cf33812373319c40", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost.conf.erb": "9ea8ebbd06ae5b6176e8b176947d15d1", "templates/vhost/_aliases.erb": "3296d4b5fc00e7277b46356c33e71a70", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "e16574ce24a1d351e3efd610eca305bd", "templates/vhost/_proxy.erb": "3b43dc6a606719681c9b5274be65d60c", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "25959fb11677e6f0cc61b76d8a9fcde4", "templates/vhost/_scriptalias.erb": "0373372000ca3198594f32ac637a9462", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "c405c430a1e7daf0568c5703d59dad92", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/vhost.pp": "70ce947e12f9b344a24f95a08e622c6c", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" }, "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.8.1.tar.gz", "file_size": 52306, "file_md5": "debec531e3b92b356b6d01dbb9a8d6d4", "downloads": 6639, "readme": "

apache

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
class { 'apache':\n  default_mods => false,\n  …\n}\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
apache::vhost { 'first.example.com':\n  port    => '80',\n  docroot => '/var/www/first',\n}\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
apache::vhost { 'second.example.com':\n  port          => '80',\n  docroot       => '/var/www/second',\n  docroot_owner => 'third',\n  docroot_group => 'third',\n}\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
apache::vhost { 'ssl.example.com':\n  port    => '443',\n  docroot => '/var/www/ssl',\n  ssl     => true,\n}\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
apache::vhost { 'fourth.example.com':\n  port     => '443',\n  docroot  => '/var/www/fourth',\n  ssl      => true,\n  ssl_cert => '/etc/ssl/fourth.example.com.cert',\n  ssl_key  => '/etc/ssl/fourth.example.com.key',\n}\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory \nhttp://examle.com.loc => /var/www/example.com

\n\n
apache::vhost { 'subdomain.loc':\n  vhost_name => '*',\n  port       => '80',\n  virtual_docroot' => '/var/www/%-2+',\n  docroot          => '/var/www',\n  serveraliases    => ['*.loc',],\n}\n
\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
apache::vhost { 'default-ssl':\n  port            => 443,\n  ssl             => true,\n  docroot         => $docroot,\n  scriptalias     => $scriptalias,\n  serveradmin     => $serveradmin,\n  access_log_file => "ssl_${access_log_file}",\n  }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to 'true', meaning the service is enabled/running.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'false'.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::worker or apache::mod::prefork classes with parameters. Valid values are worker, prefork, or the boolean false. Defaults to prefork on RedHat and worker on Debian.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
apache::mod { 'rewrite': }\napache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • deflate
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • fcgid
  • \n
  • info
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status
  • \n
  • userdir*
  • \n
  • worker*
  • \n
  • wsgi
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template

\n\n
class { 'apache::mod::ssl': }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
class { 'apache':\n  default_vhost => false,\n}\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [ { alias => '/alias', path => '/path/to/directory' } ],\n
\n\n

For Alias to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. Usage will typically look like:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [\n    { path => '/path/to/directory', <directive> => <value> },\n    { path => '/path/to/another/directory', <directive> => <value> },\n  ],\n}\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

The directives will be embedded within the Directory directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory',\n    addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n  } ],\n}\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n}\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n}\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n}\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n}\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', order => 'Allow, Deny' } ],\n}\n
\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n}\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  options => ['Indexes','FollowSymLinks','MultiViews'],\n}\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:\n$proxy_pass = [\n { 'path' => '/a', 'url' => 'http://backend-a/' },\n { 'path' => '/b', 'url' => 'http://backend-b/' },\n { 'path' => '/c', 'url' => 'http://backend-a/c' },\n]

\n\n

apache::vhost { 'site.name.fdqn':\n …\n proxy_pass => $proxy_pass,\n}

\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_source => ['/images','/downloads'],\n  redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n}\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_status => ['temp','permanent'],\n}\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  request_headers => [\n    'append MirrorID "mirror 12"',\n    'unset MirrorID',\n  ],\n}\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n  rewrite_base => '/blog/',\n}\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n}\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n}\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
apache::vhost { 'third.example.com':\n  port        => '80',\n  docroot     => '/var/www/third',\n  serveradmin => 'admin@example.com',\n}\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
apache::vhost { 'sixth.example.com':\n  serveraliases => [\n    'sixth.example.org',\n    'sixth.example.net',\n  ],\n  port          => '80',\n  docroot       => '/var/www/fifth',\n}\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
apache::vhost { 'eleventh.example.com':\n  port        => '80',\n  docroot     => '/var/www/eleventh',\n  scriptalias => '/usr/lib/cgi-bin',\n}\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
apache::vhost { 'fifteenth.example.com':\n  port           => '80',\n  docroot        => '/var/www/fifteenth',\n  rack_base_uris => ['/rackapp1', '/rackapp2'],\n}\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
#The non-ssl vhost\napache::vhost { 'first.example.com non-ssl':\n  servername => 'first.example.com',\n  port       => '80',\n  docroot    => '/var/www/first',\n}\n\n#The SSL vhost at the same domain\napache::vhost { 'first.example.com ssl':\n  servername => 'first.example.com',\n  port       => '443',\n  docroot    => '/var/www/first',\n  ssl        => true,\n}\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
apache::vhost { 'sixteenth.example.com non-ssl':\n  servername      => 'sixteenth.example.com',\n  port            => '80',\n  docroot         => '/var/www/sixteenth',\n  redirect_status => 'permanent'\n  redirect_dest   => 'https://sixteenth.example.com/' \n}\napache::vhost { 'sixteenth.example.com ssl':\n  servername => 'sixteenth.example.com',\n  port       => '443',\n  docroot    => '/var/www/sixteenth',\n  ssl        => true,\n}\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
apache::listen { '80': }\napache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
apache::vhost { 'first.example.com':\n  ip       => '10.0.0.10',\n  docroot  => '/var/www/first',\n  ip_based => true,\n}\napache::vhost { 'second.example.com':\n  ip       => '10.0.0.11',\n  docroot  => '/var/www/second',\n  ip_based => true,\n}\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
apache::vhost { 'The first IP-based vhost, non-ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '80',\n  ip_based   => true,\n  docroot    => '/var/www/first',\n}\napache::vhost { 'The first IP-based vhost, ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '443',\n  ip_based   => true,\n  docroot    => '/var/www/first-ssl',\n  ssl        => true,\n}\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
apache::vhost { 'second.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/second',\n}\napache::vhost { 'third.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/third',\n}\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
apache::vhost { 'fourth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fourth',\n  add_listen => false,\n}\napache::vhost { 'fifth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fifth',\n  add_listen => false,\n}\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
class { 'apache::dev': }\n
\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
apache::listen { '80': }\napache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
  @@apache::balancermember { "${::fqdn}-puppet00":\n    balancer_cluster => 'puppet00',\n    url              => "ajp://${::fqdn}:8009"\n    options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n  }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
  apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
  apache::balancer { 'puppet01':\n    proxy_set => {'stickysession' => 'JSESSIONID'},\n  }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2013-07-26 Release 0.8.1\nBugfixes:\n- Update `apache::mpm_module` detection for worker/prefork\n- Update `apache::mod::cgi` and `apache::mod::cgid` detection for\nworker/prefork\n\n2013-07-16 Release 0.8.0\nFeatures:\n- Add `servername` parameter to `apache` class\n- Add `proxy_set` parameter to `apache::balancer` define\n\nBugfixes:\n- Fix ordering for multiple `apache::balancer` clusters\n- Fix symlinking for sites-available on Debian-based OSs\n- Fix dependency ordering for recursive confdir management\n- Fix `apache::mod::*` to notify the service on config change\n- Documentation updates\n\n2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-07-26 10:57:40 -0700", "updated_at": "2013-07-26 10:57:40 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.10.0", "metadata": { "name": "puppetlabs-apache", "version": "0.10.0", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "author": "puppetlabs", "license": "Apache 2.0", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`, `apache2ctl`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs\n\nRequired binaries: `apachectl`. Default for `osfamily` == `redhat`." } ] } ], "checksums": { "CHANGELOG.md": "2ed7b976e9c4542fd1626006cb44783b", "CONTRIBUTING.md": "5520c75162725951733fa7d88e57f31f", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "13733647826ec5cff955b593fd9a9c5c", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "560b5e9d2b04ddbc23f3803645bfbda5", "README.md": "c937c2d34a76185fe8cfc61d671c47ec", "README.passenger.md": "0316c4a152fd51867ece8ea403250fcb", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/confd/no_accf.pp": "c44b75749a3a56c0306433868d6b762c", "manifests/default_confd_files.pp": "7cbc2f15bfd34eb2f5160c671775c0f6", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/default_mods.pp": "ea267ac599fc3d76db6298c3710cee60", "manifests/dev.pp": "639ba24711be5d7cea0c792e05008c86", "manifests/init.pp": "ffc69874d88f7ac581138fbf47d04d04", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod/alias.pp": "3c144a2aa8231de61e68eced58dc9287", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/authnz_ldap.pp": "10c795251b2327614ef0b433591ed128", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "d218c11d4798453d6075f8f1553c94de", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "a166fc9b780abea2eec1ab723ce3a773", "manifests/mod/dav_svn.pp": "641911969d921123865e6566954c0edb", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "f19193d4f119224e19713e0c96a0de6d", "manifests/mod/event.pp": "e48aefd215dd61980f0b9c4d16ef094a", "manifests/mod/expires.pp": "a9b7537846258af84f12b8ce3510dfa8", "manifests/mod/fastcgi.pp": "fec8afea5424f25109a0b7ca912b16b1", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "7c32234950dc74354b06a2da15197179", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "0fa7835f270e511616927afe01a0526c", "manifests/mod/mime_magic.pp": "fe249dd7e1faa5ec5dd936877c64e856", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/nss.pp": "f7a7efaac854599aa7b872665eb5d93c", "manifests/mod/passenger.pp": "e6c48c22a69933b0975609f2bacf2b5d", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/peruser.pp": "3a2eaab65d7be2373740302eac33e5b1", "manifests/mod/php.pp": "a3725f487f58eb354c84a4fee704daa9", "manifests/mod/prefork.pp": "84b64cb7b46ab0c544dfecb476d65e3d", "manifests/mod/proxy.pp": "eb1e8895edee5e97edc789923fc128c8", "manifests/mod/proxy_ajp.pp": "f9b72f1339cc03f068fa684f38793120", "manifests/mod/proxy_balancer.pp": "5ab6987614f8a1afde3a8b701fbbe22a", "manifests/mod/proxy_html.pp": "1a96fd029a305eb88639bf5baf06abdd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/rpaf.pp": "1125f0c5296ca584fa71de474c95475f", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "c8ab5728fda7814dace9a8eebf13476c", "manifests/mod/status.pp": "d7366470082970ac62984581a0ea3fd7", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "b1809ac41b322b090be410d41e57157e", "manifests/mod/wsgi.pp": "a0073502c2267d7e72caaf9f4942ab7c", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/mod.pp": "2d4ab8907db92e50c5ed6e1357fed9fb", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/package.pp": "c32ba42fe3ab4acc49d2e28258108ba1", "manifests/params.pp": "221fa0dcbdd00066e074bc443c0d8fdb", "manifests/peruser/multiplexer.pp": "712017c1d1cee710cd7392a4c4821044", "manifests/peruser/processor.pp": "293fcb9d2e7ae98b36f544953e33074e", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "56e90e48165989a7df3360dc55b01360", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost/custom.pp": "58bd40d3d12d01549545b85667855d38", "manifests/vhost.pp": "41c68c9ef48c3ef9d1c4feb167d71dd2", "spec/classes/apache_spec.rb": "70ebba6cbb794fe0239b0e353796bae9", "spec/classes/dev_spec.rb": "051fcee20c1b04a7d52481c4a23682b3", "spec/classes/mod/auth_kerb_spec.rb": "229c730ac88b05c4ea4e64d395f26f27", "spec/classes/mod/authnz_ldap_spec.rb": "19cef4733927bc3548af8c75a66a8b11", "spec/classes/mod/dav_svn_spec.rb": "b41e721c0b5c7bac1295187f89d27ab7", "spec/classes/mod/dev_spec.rb": "81d37ad0a51e6cae22e79009e719d648", "spec/classes/mod/dir_spec.rb": "a8d473ce36e0aaec0f9f3463cd4bb549", "spec/classes/mod/event_spec.rb": "cce445ab0a7140bdb50897c6f692ec17", "spec/classes/mod/fastcgi_spec.rb": "ff35691208f95aee61150682728c2891", "spec/classes/mod/fcgid_spec.rb": "ca3ee773bdf9ac82e63edee4411d0281", "spec/classes/mod/info_spec.rb": "90f35932812cc86058b6ccfd48eba6e8", "spec/classes/mod/itk_spec.rb": "261aa7759e232f07d70b102f0e8ab828", "spec/classes/mod/mime_magic_spec.rb": "a3748b9bd66514b56aa29a377a233606", "spec/classes/mod/passenger_spec.rb": "ece983e4b228f99f670a5f98878f964b", "spec/classes/mod/perl_spec.rb": "123e73d8de752e83336bed265a354c08", "spec/classes/mod/peruser_spec.rb": "72d00a427208a3bc0dda5578d36e7b0e", "spec/classes/mod/php_spec.rb": "3907e0075049b0d3cdadb17445acae2d", "spec/classes/mod/prefork_spec.rb": "537882d6f314a17c3ead6f51a67b20b8", "spec/classes/mod/proxy_html_spec.rb": "3587873d56172c431f93a78845b7d24e", "spec/classes/mod/python_spec.rb": "9011cd2ac1d452daec091e5cf337dbe7", "spec/classes/mod/rpaf_spec.rb": "b419712d8e6acbe00f5c4034161e40af", "spec/classes/mod/ssl_spec.rb": "969111556de99092152735764194d267", "spec/classes/mod/status_spec.rb": "a1f70673810840e591ac25a1803c39d7", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "cf005d3606362360f7fcccce04e53be6", "spec/classes/mod/wsgi_spec.rb": "37ad1d623b1455e237a75405776d58d9", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "d522ae1652cc87a4b9c6e33034ee5774", "spec/defines/mod_spec.rb": "80d167b475191b63713087462e960a44", "spec/defines/vhost_spec.rb": "89905755a72b938e99f4a01ef64203e9", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "6f29d603a809ae6208243911c0b250e4", "spec/system/default_mods_spec.rb": "fff758602ee95ee67cad2abc71bc54fb", "spec/system/itk_spec.rb": "c645ac3b306da4d3733c33f662959e36", "spec/system/mod_php_spec.rb": "b823cdcfe4288359a3d2dfd70868691d", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "a6f1b3fb3024a0dce75e45a7c2d6cfd0", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "86e147833f1acebf2b08451f02919581", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0", "templates/httpd.conf.erb": "6e768a748deb4737a8faf82ea80196c1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "e65c27aafd88c825ab35b34dd04221ea", "templates/mod/authnz_ldap.conf.erb": "12c9a1482694ddad3143e5eef03fb531", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/event.conf.erb": "dc4223dfb2729e54d4a33cdec03bd518", "templates/mod/fastcgi.conf.erb": "8692d14c4462335c845eede011f6db2f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "8f953519790a5900369fb656054cae35", "templates/mod/mime_magic.conf.erb": "f910e66299cba6ead5f0444e522a0c76", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/nss.conf.erb": "9a9667d308f0783448ca2689b9fc2b93", "templates/mod/passenger.conf.erb": "68a350cf4cf037c2ae64f015cc7a61a3", "templates/mod/peruser.conf.erb": "ac1c2bf2a771ed366f688ec337d6da02", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "38668e1cb5a19d7708e9d26f99e21264", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "907dc25931c6bdb7ce4b61a81be788f8", "templates/mod/status.conf.erb": "afb05015a8337b232127199aa085a023", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "125949c9120aee15303ad755e105d852", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost/_aliases.erb": "e5e3ba8a9ce994334644bd19ad342d8b", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "eca2a0abc3a23d1e08b1132baeade372", "templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2", "templates/vhost/_fastcgi.erb": "e0a1702445e9be189dabe04b829acd7f", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "1f9cc42aaafb80a658294fc39cf61395", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "9c714277eaad73d05d073c1b6c62106a", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "e9fca0c12325af10797b80d827dfddee", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "templates/vhost.conf.erb": "5dc0337da18ff36184df07343982dc93", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mod_load_params.pp": "5981af4d625a906fce1cedeb3f70cb90", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "60e7939034d531dd6b95af35338bcbe7", "tests/vhost.pp": "164bec943d7d5eee1ad6d6c41fe7c28e", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.10.0.tar.gz", "file_size": 85004, "file_md5": "4036f35903264c9b6e3289455cfee225", "downloads": 6389, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
  • /etc/make.conf on FreeBSD
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods        => false,\n      default_confd_files => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with IP address different than '*'

\n\n
    apache::vhost { 'subdomain.example.com':\n      ip      => '127.0.0.1',\n      port    => '80',\n      docrout => '/var/www/subdomain',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n      directories         => { path => '/home/appuser/myphpapp',\n        'suphp'           => { user => 'myappuser', group => 'myappgroup' },\n      }\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

Starting 2.2.16, httpd supports FallbackResource which is a simple replace for common RewriteRules:

\n\n
    apache::vhost { 'wordpress.example.com':\n      port                => '80',\n      docroot             => '/var/www/wordpress',\n      fallbackresource    => '/index.php',\n    }\n
\n\n

Please note that the disabled argument to FallbackResource is only supported since 2.2.24.

\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_confd_files
\n\n

Generates default set of include-able apache configuration files under ${apache::confd_dir} directory. These configuration files correspond to what is usually installed with apache package on given platform.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian, /usr/local/etc/apache22/server.crt for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian, /usr/local/etc/apache22/server.key for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_name
\n\n

Name of apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted. Defaults to 'true'.

\n\n
service_ensure
\n\n

Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.

\n\n
purge_configs
\n\n

Removes all other apache configs and vhosts, which is automatically set to true. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise managed configuration. It is recommended that you move your configuration entirely to resources within this module.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat, /etc/apache2 on Debian and /usr/local on FreeBSD.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat and /etc/apache2 on Debian.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork or apache::mod::worker classes with parameters. All possible values are event, itk, peruser, prefork, worker (valid values depend on agent's OS), or the boolean false. Defaults to prefork on RedHat and FreeBSD and worker on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing $mpm_module one has to deinstall all packages that depend on currently installed apache.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
log_level
\n\n

Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are emerg, alert, crit, error, warn, notice, info or debug.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n
server_tokens
\n\n

Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'.

\n\n
server_signature
\n\n

Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'.

\n\n
trace_enable
\n\n

Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for 'TraceEnable'. Defaults to 'On'.

\n\n
manage_user
\n\n

Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.

\n\n
manage_group
\n\n

Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.

\n\n
package_ensure
\n\n

Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • dav_svn
  • \n
  • deflate
  • \n
  • dev
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • event
  • \n
  • fastcgi
  • \n
  • fcgid
  • \n
  • headers
  • \n
  • info
  • \n
  • itk
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic*
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • nss*
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • peruser
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_ajp
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • rewrite
  • \n
  • rpaf*
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status*
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • vhost_alias
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template. These are the defaults:

\n\n
    class { 'apache::mod::ssl':\n      ssl_compression => false,\n      ssl_options     => [ 'StdEnvVars' ],\n  }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n      wsgi_python_path   => '/path/to/virtenv/site-packages',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias or AliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [\n  { aliasmatch => '^/image/(.*)\\.jpg$', path => '/files/jpg.images/$1.jpg' }\n  { alias      => '/image',             path => '/ftp/pub/image' },\n],\n
\n\n

For Alias and AliasMatch to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block. The Alias and AliasMatch directives are created in the order specified in the aliases paramter. As described in the mod_alias documentation more specific Alias or AliasMatch directives should come before the more general ones to avoid shadowing.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. An optional provider defaults to directory. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

provider can be set to any of directory, files, or location. If the pathspec starts with a ~, httpd will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch, respectively.

\n\n
    apache::vhost { 'files.example.net':\n      docroot     => '/var/www/files',\n      directories => [\n        { path => '~ (\\.swp|\\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },\n      ],\n    }\n
\n\n

The directives will be embedded within the Directory (Files, or Location) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this directory. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      directories => [ { path => '/srv/www'\n        error_documents => [\n          { 'error_code' => '503', 'document' => '/service-unavail' },\n        ],\n      }]\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
index_options
\n\n

Styles the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],\n    }\n
\n\n
index_order_default
\n\n

Sets the order of the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
ssl_options
\n\n

String or list of SSLOptions for the given <Directory> block. This overrides, or refines the SSLOptions of the parent block (either vhost, or server).

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', ssl_options => '+ExportCertData' }\n        { path => '/path/to/different/dir', ssl_options => [ '-StdEnvVars', '+ExportCertData'] },\n      ],\n    }\n
\n\n
suphp
\n\n

An array containing two values: User and group for the suPHP_UserGroup setting.\nThis directive must be used with suphp_engine => on in the vhost declaration. This directive only works in <Directory> or <Location>.

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', suphp => { user =>  'myappuser', group => 'myappgroup' }\n      ],\n    }\n
\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
directoryindex
\n\n

Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this vhost. Defaults to []. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      error_documents => [\n        { 'error_code' => '503', 'document' => '/service-unavail' },\n        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },\n      ],\n    }\n
\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
fastcgi_server
\n\n

Specifies the filename as an external FastCGI application. Defaults to 'undef'.

\n\n
fastcgi_socket
\n\n

Filename used to communicate with the web server. Defaults to 'undef'.

\n\n
fastcgi_dir
\n\n

Directory to enable for FastCGI. Defaults to 'undef'.

\n\n
additional_includes
\n\n

Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
log_level
\n\n

Specifies the verbosity level of the error log. Defaults to warn for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for log_level is one of emerg, alert, crit, error, warn, notice, info or debug.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
scriptaliases
\n\n

Passes a list of hashes to the vhost to create ScriptAlias or ScriptAliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
    scriptaliases => [\n      {\n        alias => '/myscript',\n        path  => '/usr/share/myscript',\n      },\n      {\n        aliasmatch => '^/foo(.*)',\n        path       => '/usr/share/fooscripts$1',\n      },\n      {\n        aliasmatch => '^/bar/(.*)',\n        path       => '/usr/share/bar/wrapper.sh/$1',\n      },\n      {\n        alias => '/neatscript',\n        path  => '/usr/share/neatscript',\n      },\n    ]\n
\n\n

These directives are created in the order specified. As with Alias and AliasMatch directives the more specific aliases should come before the more general ones to avoid shadowing.

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_protocol
\n\n

Specifies the SSL Protocol (SSLProtocol).

\n\n
ssl_cipher
\n\n

Specifies the SSLCipherSuite.

\n\n
ssl_honorcipherorder
\n\n

Sets SSLHonorCipherOrder directive, used to prefer the server's cipher preference order

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs on Debian and /etc/pki/tls/certs on RedHat.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
ssl_verify_client
\n\n

Sets SSLVerifyClient directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_client => 'optional',\n    }\n
\n\n
ssl_verify_depth
\n\n

Sets SSLVerifyDepth directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_depth => 1,\n    }\n
\n\n
ssl_options
\n\n

Sets SSLOptions directives as per the Apache Core documentation. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => '+ExportCertData',\n    }\n
\n\n

An array of strings example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => [ '+StrictRequire', '+ExportCertData' ],\n    }\n
\n\n
ssl_proxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

On FreeBSD you're required to define apache::package or apache class before apache::dev.

\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "

2013-12-05 Release 0.10.0

\n\n

Summary:

\n\n

This release adds FreeBSD osfamily support and various other improvements to some mods.

\n\n

Features:

\n\n
    \n
  • Add suPHP_UserGroup directive to directory context
  • \n
  • Add support for ScriptAliasMatch directives
  • \n
  • Set SSLOptions StdEnvVars in server context
  • \n
  • No implicit entry for ScriptAlias path
  • \n
  • Add support for overriding ErrorDocument
  • \n
  • Add support for AliasMatch directives
  • \n
  • Disable default "allow from all" in vhost-directories
  • \n
  • Add WSGIPythonPath as an optional parameter to mod_wsgi.
  • \n
  • Add mod_rpaf support
  • \n
  • Add directives: IndexOptions, IndexOrderDefault
  • \n
  • Add ability to include additional external configurations in vhost
  • \n
  • need to use the provider variable not the provider key value from the directory hash for matches
  • \n
  • Support for FreeBSD and few other features
  • \n
  • Add new params to apache::mod::mime class
  • \n
  • Allow apache::mod to specify module id and path
  • \n
  • added $server_root parameter
  • \n
  • Add Allow and ExtendedStatus support to mod_status
  • \n
  • Expand vhost/_directories.pp directive support
  • \n
  • Add initial support for nss module (no directives in vhost template yet)
  • \n
  • added peruser and event mpms
  • \n
  • added $service_name parameter
  • \n
  • add parameter for TraceEnable
  • \n
  • Make LogLevel configurable for server and vhost
  • \n
  • Add documentation about $ip
  • \n
  • Add ability to pass ip (instead of wildcard) in default vhost files
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Don't listen on port or set NameVirtualHost for non-existent vhost
  • \n
  • only apply Directory defaults when provider is a directory
  • \n
  • Working mod_authnz_ldap support on Debian/Ubuntu
  • \n
\n\n

2013-09-06 Release 0.9.0

\n\n

Summary:

\n\n

This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.

\n\n

Backwards-incompatible Changes:

\n\n
    \n
  • Remove many default mods that are not normally needed.
  • \n
  • Remove rewrite_base apache::vhost parameter; did not work anyway.
  • \n
  • Specify dependencies on stdlib >=2.4.0 (this was already the case, but\nmaking explicit)
  • \n
  • Deprecate a2mod in favor of the apache::mod::* classes and apache::mod\ndefined resource.
  • \n
\n\n

Features:

\n\n
    \n
  • apache class\n\n
      \n
    • Add httpd_dir parameter to change the location of the configuration\nfiles.
    • \n
    • Add logroot parameter to change the logroot
    • \n
    • Add ports_file parameter to changes the ports.conf file location
    • \n
    • Add keepalive parameter to enable persistent connections
    • \n
    • Add keepalive_timeout parameter to change the timeout
    • \n
    • Update default_mods to be able to take an array of mods to enable.
    • \n
  • \n
  • apache::vhost\n\n
      \n
    • Add wsgi_daemon_process, wsgi_daemon_process_options,\nwsgi_process_group, and wsgi_script_aliases parameters for per-vhost\nWSGI configuration.
    • \n
    • Add access_log_syslog parameter to enable syslogging.
    • \n
    • Add error_log_syslog parameter to enable syslogging of errors.
    • \n
    • Add directories hash parameter. Please see README for documentation.
    • \n
    • Add sslproxyengine parameter to enable SSLProxyEngine
    • \n
    • Add suphp_addhandler, suphp_engine, and suphp_configpath for\nconfiguring SuPHP.
    • \n
    • Add custom_fragment parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)
    • \n
  • \n
  • Add apache::mod::suphp class for configuring SuPHP.
  • \n
  • Add apache::mod::itk class for configuring ITK mpm module.
  • \n
  • Update apache::mod::wsgi class for global WSGI configuration with\nwsgi_socket_prefix and wsgi_python_home parameters.
  • \n
  • Add README.passenger.md to document the apache::mod::passenger usage.\nAdded passenger_high_performance, passenger_pool_idle_time,\npassenger_max_requests, passenger_stat_throttle_rate, rack_autodetect,\nand rails_autodetect parameters.
  • \n
  • Separate the httpd service resource into a new apache::service class for\ndependency chaining of Class['apache'] -> <resource> ~>\nClass['apache::service']
  • \n
  • Added apache::mod::proxy_balancer class for apache::balancer
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Change dependency to puppetlabs-concat
  • \n
  • Fix ruby 1.9 bug for a2mod
  • \n
  • Change servername to be $::hostname if there is no $::fqdn
  • \n
  • Make /etc/ssl/certs the default ssl certs directory for RedHat non-5.
  • \n
  • Make php the default php package for RedHat non-5.
  • \n
  • Made aliases able to take a single alias hash instead of requiring an\narray.
  • \n
\n\n

2013-07-26 Release 0.8.1

\n\n

Bugfixes:

\n\n
    \n
  • Update apache::mpm_module detection for worker/prefork
  • \n
  • Update apache::mod::cgi and apache::mod::cgid detection for\nworker/prefork
  • \n
\n\n

2013-07-16 Release 0.8.0

\n\n

Features:

\n\n
    \n
  • Add servername parameter to apache class
  • \n
  • Add proxy_set parameter to apache::balancer define
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix ordering for multiple apache::balancer clusters
  • \n
  • Fix symlinking for sites-available on Debian-based OSs
  • \n
  • Fix dependency ordering for recursive confdir management
  • \n
  • Fix apache::mod::* to notify the service on config change
  • \n
  • Documentation updates
  • \n
\n\n

2013-07-09 Release 0.7.0

\n\n

Changes:

\n\n
    \n
  • Essentially rewrite the module -- too many to list
  • \n
  • apache::vhost has many abilities -- see README.md for details
  • \n
  • apache::mod::* classes provide httpd mod-loading capabilities
  • \n
  • apache base class is much more configurable
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Many. And many more to come
  • \n
\n\n

2013-03-2 Release 0.6.0

\n\n
    \n
  • update travis tests (add more supported versions)
  • \n
  • add access log_parameter
  • \n
  • make purging of vhost dir configurable
  • \n
\n\n

2012-08-24 Release 0.4.0

\n\n

Changes:

\n\n
    \n
  • include apache is now required when using apache::mod::*
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix syntax for validate_re
  • \n
  • Fix formatting in vhost template
  • \n
  • Fix spec tests such that they pass

    \n\n

    2012-05-08 Puppet Labs info@puppetlabs.com - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache

  • \n
\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-05 15:29:14 -0800", "updated_at": "2013-12-05 15:29:14 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.0.4", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.4", "metadata": { "description": "Module for Apache configuration", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "manifests/python.pp": "daa8000b529be1fd931538516373afcd", "manifests/params.pp": "27f043698624d6ff5f92f7a220ed8c39", "tests/vhost.pp": "1f627c432582a8fc91b8375460d9794e", "spec/classes/ssl_spec.rb": "d93e4f61548ce6b077bb8947daaae651", "spec/defines/vhost/proxy_spec.rb": "9d3a5a9361d1d49eb82dcbdc51edea80", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "lib/puppet/provider/a2mod/a2mod.rb": "0acf42d3d670a9915c5a3f46ae7335f1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/defines/vhost_spec.rb": "c5d180e4c1db180b296cdcf6e167af6e", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "manifests/ssl.pp": "00d85958c17bc62f27df8e4ca86043a0", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-proxy.conf.erb": "4b67009e57758dcb0ef06fcbda89515c", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/vhost.pp": "b4f3cd713a95ead5ad2c7fcdbd8a64c8", "lib/puppet/type/a2mod.rb": "8b3005913ca51cb51e94d568f249880e", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-default.conf.erb": "e30ec34eabb2e7a8d57c9842f74cb059", "templates/test.vhost.erb": "2c0ae13f2a32177e128e3ff49c37ffbd", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "Modulefile": "cb1e5a87875ad86a43d6cfdba04eb45b", "manifests/vhost/proxy.pp": "1c774f8370d418b86a6ee08e530305d7", "manifests/init.pp": "cb62a3aba1af2eebb7a08e45ee399065" }, "summary": "Puppet module for Apache", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" } ], "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "author": "puppetlabs", "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " } ], "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" } ], "version": "0.0.4", "name": "puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.4.tar.gz", "file_size": 9707, "file_md5": "5d1d4ec6ce20986d4be3a4bd0ecba07a", "downloads": 6249, "readme": null, "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-05-08 16:43:59 -0700", "updated_at": "2012-05-08 16:43:59 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.4.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.4.0", "metadata": { "description": "Module for Apache configuration", "summary": "Puppet module for Apache", "dependencies": [ { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "author": "puppetlabs", "version": "0.4.0", "types": [ { "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "doc": "Manage Apache 2 modules on Debian and Ubuntu", "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" } ] } ], "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "license": "Apache 2.0", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "name": "puppetlabs-apache", "checksums": { "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "manifests/mod.pp": "148cc4249f39ec2ff1292fa5bae8d2a6", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/params.pp": "3822d676834eb7ac81c47239b0112c79", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "manifests/mod/python.pp": "344f7b359d801ee6942211726004fa93", "lib/puppet/provider/a2mod/redhat.rb": "cb8db52784eef2a50cd495773a5c46a5", "manifests/mod/proxy_http.pp": "f1a0fd5eb51ba564c2bd68e6669bc7dc", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "spec/defines/vhost_spec.rb": "9a741b3cdb0bf1f7d4f5c849044e20dd", "spec/classes/mod/ssl_spec.rb": "df737098c4bd03179e29d0c22a80a565", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/mod/php.pp": "ff7549863eba4c7722240ff9c2f140f3", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/vhost/proxy.pp": "6a09bd5018f556025de54632cb02d061", "Modulefile": "7784d240b14cf9b6b06ae51b66f55ee0", "manifests/mod/disk_cache.pp": "8488851c7301f50e75e92890d40e6300", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "manifests/mod/proxy_html.pp": "fb43e85c277b11681463a48a9653d06a", "spec/classes/ssl_spec.rb": "67c8ccf6b5055f50f40978b221873c88", "lib/puppet/type/a2mod.rb": "30ea8400197a833dc3fee3e095b01d9e", "manifests/mod/dev.pp": "71234485e642f0e8cdd8774670d48b7f", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/ssl.pp": "2ffd543847785cd2f916f244f8742448", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "CHANGELOG": "f65b75627c2a8c4f753193f914d2a1a9", "manifests/init.pp": "333146fe0bbc882207c7b78dc4b2e8cd", "spec/classes/php_spec.rb": "7c176dcb6cf35adce2d0ff3d17678f8a", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/classes/mod/auth_kerb_spec.rb": "6b71ffa45b4a0a1476ee56c75c26e6db", "spec/classes/dev_spec.rb": "64d66d5074a1d634d765db182bea5e43", "spec/classes/mod/python_spec.rb": "99f05654c0b748ab18096c5cf4b74781", "spec/defines/vhost/redirect_spec.rb": "98f2a7022b7302a771d811e424454639", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "manifests/dev.pp": "c263f8db2a35361e9dfdef30477f8ee3", "templates/vhost-default.conf.erb": "680587f275662a31cdb486a309db8214", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "spec/classes/mod/wsgi_spec.rb": "7a05c23e66b027d4738ce1368f6d9f43", "manifests/vhost.pp": "8d31a51ddbff60ffc03b79781957718f", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "spec/classes/python_spec.rb": "ce7b11e4fb4e7bfe5b5c18ded9d24897", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "spec/defines/vhost/proxy_spec.rb": "bc34ea522d04c9ffd067a83374ac832f", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "spec/classes/apache_spec.rb": "bc29c3787a043098b10aa6ca1028a43e", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "templates/httpd.conf.erb": "93971da2f62ebaee55cc8691b2073860", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "manifests/vhost/redirect.pp": "c4b1b5eefb11d4a4025096e1aa13d6cf", "spec/classes/params_spec.rb": "41f4e90e9cbe23e5c81831248b2f3cd4", "manifests/mod/dav_fs.pp": "1240d81890bc436838a0d0568d019a5a", "README.md": "9342c60532e2950fae48eac3bbcf8d73", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.4.0.tar.gz", "file_size": 27860, "file_md5": "996659ad952e1729f286524e4dba4c04", "downloads": 6232, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::mod::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-11-06 00:26:27 -0800", "updated_at": "2012-11-06 00:26:27 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.5.0-rc1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.5.0-rc1", "metadata": { "description": "Module for Apache configuration", "summary": "Puppet module for Apache", "types": [ { "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "doc": "Manage Apache 2 modules", "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" }, { "doc": "Module identifier string used by LoadModule. Default: module-name_module", "name": "identifier" } ] } ], "author": "puppetlabs", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "name": "puppetlabs-apache", "checksums": { "spec/classes/mod/wsgi_spec.rb": "7a05c23e66b027d4738ce1368f6d9f43", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/dav_fs.pp": "c6acce86fe14f75521dc8c2920ccedf7", "spec/defines/vhost_spec.rb": "9a741b3cdb0bf1f7d4f5c849044e20dd", "spec/classes/mod/ssl_spec.rb": "df737098c4bd03179e29d0c22a80a565", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "spec/defines/mod_spec.rb": "e96ca54b19c0948310b333a6c3b0e384", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/passenger.pp": "0bb9e5d4a49b72e56b7a909da42c47bc", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/php.pp": "6de0671e78c1411cc0713f80075ef61f", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "templates/vhost-default.conf.erb": "680587f275662a31cdb486a309db8214", "manifests/mod.pp": "f8e6c202844b424d4b4b730813f4c6d3", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "manifests/mod/dev.pp": "71234485e642f0e8cdd8774670d48b7f", "spec/classes/mod/python_spec.rb": "99f05654c0b748ab18096c5cf4b74781", "spec/classes/params_spec.rb": "41f4e90e9cbe23e5c81831248b2f3cd4", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "spec/classes/mod/auth_kerb_spec.rb": "6b71ffa45b4a0a1476ee56c75c26e6db", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "manifests/mod/ssl.pp": "2ffd543847785cd2f916f244f8742448", "manifests/vhost.pp": "8d31a51ddbff60ffc03b79781957718f", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "manifests/dev.pp": "c263f8db2a35361e9dfdef30477f8ee3", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "CHANGELOG": "f65b75627c2a8c4f753193f914d2a1a9", "manifests/params.pp": "df442b5ea6cd7ec31e7eca15ac6b6f87", "Modulefile": "7e660c223c4e1e5ad9639bde687f4ece", "manifests/init.pp": "8fac5acb69de49122fdbfcffacc08125", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "manifests/vhost/redirect.pp": "7fb0fe676efa6bbc7de653d0651235c1", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "lib/puppet/provider/a2mod/redhat.rb": "90b9add30cf9acf2289a51d9f4c31bd7", "spec/defines/vhost/proxy_spec.rb": "cd3e28ebba818b3966fcf6ed4053a357", "spec/defines/vhost/redirect_spec.rb": "98f2a7022b7302a771d811e424454639", "README.md": "9e8a84ba0cf502551d3b1c0e34320864", "manifests/vhost/proxy.pp": "592f535ba5efabcdd8dbfbcf211f6f5b", "spec/classes/dev_spec.rb": "64d66d5074a1d634d765db182bea5e43", "manifests/mod/proxy_html.pp": "8cb51fa968a18d957274a2b68cca8216", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "spec/classes/python_spec.rb": "ce7b11e4fb4e7bfe5b5c18ded9d24897", "manifests/mod/disk_cache.pp": "a6ce6b0d3393bff8287f6267dd49bc82", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/python.pp": "344f7b359d801ee6942211726004fa93", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "spec/classes/apache_spec.rb": "10f2a7629c7e596864f5c0b3c2ece6cf", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/classes/ssl_spec.rb": "67c8ccf6b5055f50f40978b221873c88", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "spec/classes/php_spec.rb": "7c176dcb6cf35adce2d0ff3d17678f8a", "templates/httpd.conf.erb": "63e07e1d3428ecc3da8e812eb2524978", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997" }, "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ], "license": "Apache 2.0", "version": "0.5.0-rc1" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.5.0-rc1.tar.gz", "file_size": 28866, "file_md5": "f62139bda531ac4c8f55ecf09f77d0e9", "downloads": 6125, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::mod::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Dependencies

\n\n

Some functionality is dependent on other modules:

\n\n\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-12-01 10:53:30 -0800", "updated_at": "2012-12-01 10:53:30 -0800", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.8.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.8.0", "metadata": { "name": "puppetlabs-apache", "version": "0.8.0", "summary": "Puppet module for Apache", "author": "puppetlabs", "description": "Module for Apache configuration", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" }, { "name": "ripienaar/concat", "version_requirement": ">= 0.2.0" } ], "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo" }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs" }, { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" } ], "name": "a2mod", "doc": "Manage Apache 2 modules" } ], "checksums": { ".bundle/config": "b898efea5e8783d6593fcdabec67e925", ".fixtures.yml": "abe7da15beecab9f2023d55185f90bbb", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "e18e7deea7676026028b8b287c36935a", "CHANGELOG": "5cbc39b9a7bf1ffa662b9bd76c6f1ad2", "Gemfile": "d44cd671d70f6ba0143fe2194f43ce33", "Gemfile.lock": "53c429f143c6903972b71652b5ac571d", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "890fb7a17031a6697564df72c9d69f30", "README.md": "195dc5cf038b80a61a1574c9d52e8a31", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/provider/a2mod/a2mod.rb": "c54df991f0cd63b90ceafad68d6670a5", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "89f0a44bc469b6197bd648b8e606ff6b", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/balancer.pp": "7ecb1536337337a1b81e34b5ea75ac84", "manifests/balancermember.pp": "d24354d979dd3dc112757f89d69902f5", "manifests/default_mods.pp": "91b0fd1d4a448c68d96c27cc304ff7f6", "manifests/dev.pp": "606c3cbe27f32b61cfcbd15fb211890c", "manifests/init.pp": "ae2d79ff4bcfefe6b9d5573891dc30a3", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod.pp": "fc66b79d9086d8d296c372d605d31890", "manifests/mod/alias.pp": "f5d65ca4755f5464b32c5f95fd42a052", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "manifests/mod/cgid.pp": "465b8603b0b74a769edb4b47a98aec2f", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "93fce4f45e7a85e9d6eb2b745390eaba", "manifests/mod/dav_svn.pp": "85a9a3efe5cce6096d89cf29195e6dc1", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "da3b7f47ce079f20db2d20e2d6539c11", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "c9ff4215f9308fd729e96a8d76d3fe1d", "manifests/mod/mime_magic.pp": "9c3a73f877de39c1db2178b827c4a86d", "manifests/mod/mpm_event.pp": "c1540d87cfb2b4a4631c4cc5d3e191f5", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/passenger.pp": "4bb1e37a8c2c25319d5cc8e28f6112b4", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/php.pp": "247915331ce4ee815a0c032897a83157", "manifests/mod/prefork.pp": "5ca6538c012828300f6f24cc19f13945", "manifests/mod/proxy.pp": "e0e9f9963f720501d9b53ab9fb35f256", "manifests/mod/proxy_html.pp": "25cbac9bc2553bc3a18ede060a1a14fd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "80ee4f522104719f07aa2be33d320973", "manifests/mod/status.pp": "1619d96a0d9b9534145209c98c683cbe", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "e2d1bf1a9b428ae9688e705dc428701a", "manifests/mod/wsgi.pp": "86b284ccc6571fb702eb2647c975d3a3", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/params.pp": "8d13a3b62cf742f40c018b330d72bcac", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost.pp": "2febd978c6f3ade1e8d8780e3b6c83f4", "spec/classes/apache_spec.rb": "0f0b7d9910cf54eaad5a53acf5b2286d", "spec/classes/dev_spec.rb": "ecc212316f7801f427fa4c30ca65e259", "spec/classes/mod/auth_kerb_spec.rb": "70e2d94d84724a1b54aff6a9dede1ca6", "spec/classes/mod/dav_svn_spec.rb": "6b014a30e017a6cf30bdc4221e4a15b9", "spec/classes/mod/dev_spec.rb": "27a9d92460a3e62842b5e64f7154f893", "spec/classes/mod/dir_spec.rb": "e462dbea87eb1211e496f60e40538370", "spec/classes/mod/fcgid_spec.rb": "3bd6c0638347b763a88e44d5d7216cb0", "spec/classes/mod/info_spec.rb": "3921a934a1d41c6e1cce328a45b3cc1d", "spec/classes/mod/passenger_spec.rb": "521ed527cc9f43d8f9a4ccde03e84daf", "spec/classes/mod/perl_spec.rb": "0ba258605762d1fa25398a08e90157e4", "spec/classes/mod/php_spec.rb": "c4050e546d010f0dcb5a8bd580b5f3ed", "spec/classes/mod/prefork_spec.rb": "0f7de99f1fb58670f11fde4f7280e99e", "spec/classes/mod/proxy_html_spec.rb": "bf313b5dfdd2c9f3054f4b791c32a84c", "spec/classes/mod/python_spec.rb": "2b8079e833cbe6313435a72d9fc00cb9", "spec/classes/mod/ssl_spec.rb": "53b8ecefa9ce0af2562d8183c063167d", "spec/classes/mod/worker_spec.rb": "f3324663e5f93d1b73911276bd984e79", "spec/classes/mod/wsgi_spec.rb": "33dc2afdcc040397d8dec6726d439346", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/defines/mod_spec.rb": "d82643d472be88a65cd202381099ed6f", "spec/defines/vhost_spec.rb": "1cf770757c53757aec11086cb2e6baf7", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/fixtures/system/distro_commands.yaml": "d9617961568154565a6725a3831408d3", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "271b9ac8eebcc9a24f6691e4ef122021", "spec/system/basic_spec.rb": "ad17556c443caa7eec6e2054bc96193f", "spec/system/class_spec.rb": "61b330fe643b16041cd3c1830fff48a6", "spec/system/mod_php_spec.rb": "b2c39f0a5f35f5c860e99798b6605413", "spec/system/vhost_spec.rb": "8c1f24de9e391fb6c4ae88ed3084d9a3", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/httpd.conf.erb": "faf2a55d29d91b2bde7cbc004d4c95e3", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "669fc0a80839be3a81e2f4d4150c3ad6", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "2fa646fe615e44d137a5d629f868c107", "templates/mod/mime_magic.conf.erb": "8a4f61bd7539871cb507cc95f5dbd205", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/passenger.conf.erb": "d9c51acf8e19cd8eaf5621ebfd6edba4", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "ae1cd187ffbd5cc9b74f8711e313e96b", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "2567261763976c62a4388abb62ae1e03", "templates/mod/status.conf.erb": "da061291068f8e20cf33812373319c40", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost.conf.erb": "9ea8ebbd06ae5b6176e8b176947d15d1", "templates/vhost/_aliases.erb": "3296d4b5fc00e7277b46356c33e71a70", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "e16574ce24a1d351e3efd610eca305bd", "templates/vhost/_proxy.erb": "3b43dc6a606719681c9b5274be65d60c", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "25959fb11677e6f0cc61b76d8a9fcde4", "templates/vhost/_scriptalias.erb": "0373372000ca3198594f32ac637a9462", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "c405c430a1e7daf0568c5703d59dad92", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/vhost.pp": "70ce947e12f9b344a24f95a08e622c6c", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" }, "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.8.0.tar.gz", "file_size": 52540, "file_md5": "d77e65d987d670d5dac2538e2c98c0b5", "downloads": 1586, "readme": "

apache

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
class { 'apache':\n  default_mods => false,\n  …\n}\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
apache::vhost { 'first.example.com':\n  port    => '80',\n  docroot => '/var/www/first',\n}\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
apache::vhost { 'second.example.com':\n  port          => '80',\n  docroot       => '/var/www/second',\n  docroot_owner => 'third',\n  docroot_group => 'third',\n}\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
apache::vhost { 'ssl.example.com':\n  port    => '443',\n  docroot => '/var/www/ssl',\n  ssl     => true,\n}\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
apache::vhost { 'fourth.example.com':\n  port     => '443',\n  docroot  => '/var/www/fourth',\n  ssl      => true,\n  ssl_cert => '/etc/ssl/fourth.example.com.cert',\n  ssl_key  => '/etc/ssl/fourth.example.com.key',\n}\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory \nhttp://examle.com.loc => /var/www/example.com

\n\n
apache::vhost { 'subdomain.loc':\n  vhost_name => '*',\n  port       => '80',\n  virtual_docroot' => '/var/www/%-2+',\n  docroot          => '/var/www',\n  serveraliases    => ['*.loc',],\n}\n
\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
apache::vhost { 'default-ssl':\n  port            => 443,\n  ssl             => true,\n  docroot         => $docroot,\n  scriptalias     => $scriptalias,\n  serveradmin     => $serveradmin,\n  access_log_file => "ssl_${access_log_file}",\n  }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to 'true', meaning the service is enabled/running.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'false'.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::worker or apache::mod::prefork classes with parameters. Valid values are worker, prefork, or the boolean false. Defaults to prefork on RedHat and worker on Debian.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
apache::mod { 'rewrite': }\napache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • deflate
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • fcgid
  • \n
  • info
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status
  • \n
  • userdir*
  • \n
  • worker*
  • \n
  • wsgi
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template

\n\n
class { 'apache::mod::ssl': }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
class { 'apache':\n  default_vhost => false,\n}\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [ { alias => '/alias', path => '/path/to/directory' } ],\n
\n\n

For Alias to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. Usage will typically look like:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [\n    { path => '/path/to/directory', <directive> => <value> },\n    { path => '/path/to/another/directory', <directive> => <value> },\n  ],\n}\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

The directives will be embedded within the Directory directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory',\n    addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n  } ],\n}\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n}\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n}\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n}\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n}\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', order => 'Allow, Deny' } ],\n}\n
\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
apache::vhost { 'sample.example.net':\n  docroot     => '/path/to/directory',\n  directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n}\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  options => ['Indexes','FollowSymLinks','MultiViews'],\n}\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:\n$proxy_pass = [\n { 'path' => '/a', 'url' => 'http://backend-a/' },\n { 'path' => '/b', 'url' => 'http://backend-b/' },\n { 'path' => '/c', 'url' => 'http://backend-a/c' },\n]

\n\n

apache::vhost { 'site.name.fdqn':\n …\n proxy_pass => $proxy_pass,\n}

\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_source => ['/images','/downloads'],\n  redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n}\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_status => ['temp','permanent'],\n}\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  request_headers => [\n    'append MirrorID "mirror 12"',\n    'unset MirrorID',\n  ],\n}\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n  rewrite_base => '/blog/',\n}\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n}\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n}\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
apache::vhost { 'third.example.com':\n  port        => '80',\n  docroot     => '/var/www/third',\n  serveradmin => 'admin@example.com',\n}\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
apache::vhost { 'sixth.example.com':\n  serveraliases => [\n    'sixth.example.org',\n    'sixth.example.net',\n  ],\n  port          => '80',\n  docroot       => '/var/www/fifth',\n}\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
apache::vhost { 'eleventh.example.com':\n  port        => '80',\n  docroot     => '/var/www/eleventh',\n  scriptalias => '/usr/lib/cgi-bin',\n}\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
apache::vhost { 'fifteenth.example.com':\n  port           => '80',\n  docroot        => '/var/www/fifteenth',\n  rack_base_uris => ['/rackapp1', '/rackapp2'],\n}\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
#The non-ssl vhost\napache::vhost { 'first.example.com non-ssl':\n  servername => 'first.example.com',\n  port       => '80',\n  docroot    => '/var/www/first',\n}\n\n#The SSL vhost at the same domain\napache::vhost { 'first.example.com ssl':\n  servername => 'first.example.com',\n  port       => '443',\n  docroot    => '/var/www/first',\n  ssl        => true,\n}\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
apache::vhost { 'sixteenth.example.com non-ssl':\n  servername      => 'sixteenth.example.com',\n  port            => '80',\n  docroot         => '/var/www/sixteenth',\n  redirect_status => 'permanent'\n  redirect_dest   => 'https://sixteenth.example.com/' \n}\napache::vhost { 'sixteenth.example.com ssl':\n  servername => 'sixteenth.example.com',\n  port       => '443',\n  docroot    => '/var/www/sixteenth',\n  ssl        => true,\n}\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
apache::listen { '80': }\napache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
apache::vhost { 'first.example.com':\n  ip       => '10.0.0.10',\n  docroot  => '/var/www/first',\n  ip_based => true,\n}\napache::vhost { 'second.example.com':\n  ip       => '10.0.0.11',\n  docroot  => '/var/www/second',\n  ip_based => true,\n}\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
apache::vhost { 'The first IP-based vhost, non-ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '80',\n  ip_based   => true,\n  docroot    => '/var/www/first',\n}\napache::vhost { 'The first IP-based vhost, ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '443',\n  ip_based   => true,\n  docroot    => '/var/www/first-ssl',\n  ssl        => true,\n}\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
apache::vhost { 'second.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/second',\n}\napache::vhost { 'third.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/third',\n}\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
apache::vhost { 'fourth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fourth',\n  add_listen => false,\n}\napache::vhost { 'fifth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fifth',\n  add_listen => false,\n}\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
class { 'apache::dev': }\n
\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
apache::listen { '80': }\napache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
  @@apache::balancermember { "${::fqdn}-puppet00":\n    balancer_cluster => 'puppet00',\n    url              => "ajp://${::fqdn}:8009"\n    options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n  }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
  apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
  apache::balancer { 'puppet01':\n    proxy_set => {'stickysession' => 'JSESSIONID'},\n  }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2013-07-16 Release 0.8.0\nFeatures:\n- Add `servername` parameter to `apache` class\n- Add `proxy_set` parameter to `apache::balancer` define\n\nBugfixes:\n- Fix ordering for multiple `apache::balancer` clusters\n- Fix symlinking for sites-available on Debian-based OSs\n- Fix dependency ordering for recursive confdir management\n- Fix `apache::mod::*` to notify the service on config change\n- Documentation updates\n\n2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-07-17 07:37:53 -0700", "updated_at": "2013-07-17 07:37:53 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.7.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.7.0", "metadata": { "name": "puppetlabs-apache", "version": "0.7.0", "summary": "Puppet module for Apache", "author": "puppetlabs", "description": "Module for Apache configuration", "dependencies": [ { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" }, { "name": "ripienaar/concat", "version_requirement": ">= 0.2.0" } ], "types": [ { "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs" }, { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu" }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo" } ], "name": "a2mod", "doc": "Manage Apache 2 modules" } ], "checksums": { ".bundle/config": "b898efea5e8783d6593fcdabec67e925", ".fixtures.yml": "abe7da15beecab9f2023d55185f90bbb", ".nodeset.yml": "f2b857f9fc7a701ff118e28591c12925", ".travis.yml": "e18e7deea7676026028b8b287c36935a", "CHANGELOG": "47e11d1cafc4b8d98b1bef86361d740a", "Gemfile": "d44cd671d70f6ba0143fe2194f43ce33", "Gemfile.lock": "e5157995a55ffdf1330b3f0290bed2b2", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "f4a47cb161d42ed52ffbd5df6c80f748", "README.md": "3cc924ee96b5d3cbb250aca430927e66", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/provider/a2mod/a2mod.rb": "c54df991f0cd63b90ceafad68d6670a5", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "89f0a44bc469b6197bd648b8e606ff6b", "lib/puppet/type/a2mod.rb": "f230e4c3e6a111bc6dc79ab2287c9a29", "manifests/balancer.pp": "5af4450ac33d3150a16ed327c68bdf0c", "manifests/balancermember.pp": "d24354d979dd3dc112757f89d69902f5", "manifests/default_mods.pp": "0d603665ec37b0d13fbc3ba36a739318", "manifests/dev.pp": "606c3cbe27f32b61cfcbd15fb211890c", "manifests/init.pp": "33dad1b7fd29fa2475c55de9616cfa30", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod.pp": "bfedd416024e0b6e534f2b91d2ba3877", "manifests/mod/alias.pp": "727bd190840c846a3fc2b3fb827c7694", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/autoindex.pp": "d4944c390b708411f7d918bcf5fdd11c", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "manifests/mod/cgid.pp": "e2c08a1500fb894d9ff7a617fe48ef13", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "5a44c5dda1c942b9e8c5e470864df8ab", "manifests/mod/dav_svn.pp": "85a9a3efe5cce6096d89cf29195e6dc1", "manifests/mod/deflate.pp": "08ec9f33afca64a7b9993758a6401dea", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "212e04396b2a961b82bd0c6a38a98f63", "manifests/mod/disk_cache.pp": "d907cd9a341da70632aaac4e95292ebb", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "7404ff73f716bd4b8afce8674d1eb18c", "manifests/mod/ldap.pp": "297f34a47ca0790eda7e12c5b73595e0", "manifests/mod/mime.pp": "39cf838e44e94eaab866c492c3d81cd8", "manifests/mod/mime_magic.pp": "24b3c65c677103c34a53f7f94df407c9", "manifests/mod/mpm_event.pp": "02783d5d6c60863f1f91d6fe3c0a21e9", "manifests/mod/negotiation.pp": "b783e50edb38cc53d4959dbbbf861498", "manifests/mod/passenger.pp": "0020b9f5f2df5ee0c8f5cdd48d4438a3", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/php.pp": "d86b116772c6da431e31983455a72941", "manifests/mod/prefork.pp": "115d2c91fe1c422bde5867bacf9d3902", "manifests/mod/proxy.pp": "66aa7ceb1cebedbe90088eb49075a248", "manifests/mod/proxy_html.pp": "897d150599f9d55b4f8df0ca64c6facc", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "96ef75c5a1e37c6765543a19532b15e8", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/setenvif.pp": "0a3f31f66f96ac7f33bb7cfb6cd7383a", "manifests/mod/ssl.pp": "33869e73d42bbc3cc3e621e4df0b50bc", "manifests/mod/status.pp": "a33573ec5a7851037127f7584adb1e99", "manifests/mod/userdir.pp": "b5ba8a8790e69f04ed66494ec534edd1", "manifests/mod/worker.pp": "9d4e77e079ecd69c765e6788799a5b20", "manifests/mod/wsgi.pp": "86b284ccc6571fb702eb2647c975d3a3", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/params.pp": "fa57d03c141b29f3410cb13f1328ad9c", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost.pp": "b62bde2d1763f040d2d55a50f63688e5", "spec/classes/apache_spec.rb": "0f0b7d9910cf54eaad5a53acf5b2286d", "spec/classes/dev_spec.rb": "ecc212316f7801f427fa4c30ca65e259", "spec/classes/mod/auth_kerb_spec.rb": "70e2d94d84724a1b54aff6a9dede1ca6", "spec/classes/mod/dav_svn_spec.rb": "6b014a30e017a6cf30bdc4221e4a15b9", "spec/classes/mod/dev_spec.rb": "27a9d92460a3e62842b5e64f7154f893", "spec/classes/mod/dir_spec.rb": "e462dbea87eb1211e496f60e40538370", "spec/classes/mod/fcgid_spec.rb": "3bd6c0638347b763a88e44d5d7216cb0", "spec/classes/mod/info_spec.rb": "3921a934a1d41c6e1cce328a45b3cc1d", "spec/classes/mod/passenger_spec.rb": "521ed527cc9f43d8f9a4ccde03e84daf", "spec/classes/mod/perl_spec.rb": "0ba258605762d1fa25398a08e90157e4", "spec/classes/mod/php_spec.rb": "c4050e546d010f0dcb5a8bd580b5f3ed", "spec/classes/mod/prefork_spec.rb": "0f7de99f1fb58670f11fde4f7280e99e", "spec/classes/mod/proxy_html_spec.rb": "bf313b5dfdd2c9f3054f4b791c32a84c", "spec/classes/mod/python_spec.rb": "2b8079e833cbe6313435a72d9fc00cb9", "spec/classes/mod/ssl_spec.rb": "53b8ecefa9ce0af2562d8183c063167d", "spec/classes/mod/worker_spec.rb": "f3324663e5f93d1b73911276bd984e79", "spec/classes/mod/wsgi_spec.rb": "33dc2afdcc040397d8dec6726d439346", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/defines/mod_spec.rb": "d82643d472be88a65cd202381099ed6f", "spec/defines/vhost_spec.rb": "173d47eaca7bb6bf040223c0cf2d6b55", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/fixtures/system/distro_commands.yaml": "d9617961568154565a6725a3831408d3", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "271b9ac8eebcc9a24f6691e4ef122021", "spec/system/basic_spec.rb": "813983916c4bd577f4291857f0ea6de7", "spec/system/class_spec.rb": "8fa0bba2db3956b8e45944a30453fd37", "spec/system/mod_php_spec.rb": "5b8a2ee664fdb53390fc7c237c4a93aa", "spec/system/vhost_spec.rb": "8c1f24de9e391fb6c4ae88ed3084d9a3", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/httpd.conf.erb": "2b4002a63f0bf30fe7568da5f350b7a1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "669fc0a80839be3a81e2f4d4150c3ad6", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "2fa646fe615e44d137a5d629f868c107", "templates/mod/mime_magic.conf.erb": "8a4f61bd7539871cb507cc95f5dbd205", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/passenger.conf.erb": "d9c51acf8e19cd8eaf5621ebfd6edba4", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "ae1cd187ffbd5cc9b74f8711e313e96b", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "2567261763976c62a4388abb62ae1e03", "templates/mod/status.conf.erb": "da061291068f8e20cf33812373319c40", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost.conf.erb": "9ea8ebbd06ae5b6176e8b176947d15d1", "templates/vhost/_aliases.erb": "3296d4b5fc00e7277b46356c33e71a70", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "e16574ce24a1d351e3efd610eca305bd", "templates/vhost/_proxy.erb": "3b43dc6a606719681c9b5274be65d60c", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "25959fb11677e6f0cc61b76d8a9fcde4", "templates/vhost/_scriptalias.erb": "0373372000ca3198594f32ac637a9462", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "c405c430a1e7daf0568c5703d59dad92", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "tests/vhost.pp": "70ce947e12f9b344a24f95a08e622c6c", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" }, "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.7.0.tar.gz", "file_size": 51129, "file_md5": "c8ab994e2dcee7681acda5538ba4ce0b", "downloads": 1228, "readme": "

apache

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
class { 'apache':\n  default_mods => false,\n  …\n}\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
apache::vhost { 'first.example.com':\n  port    => '80',\n  docroot => '/var/www/first',\n}\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
apache::vhost { 'second.example.com':\n  port          => '80',\n  docroot       => '/var/www/second',\n  docroot_owner => 'third',\n  docroot_group => 'third',\n}\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
apache::vhost { 'ssl.example.com':\n  port    => '443',\n  docroot => '/var/www/ssl',\n  ssl     => true,\n}\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
apache::vhost { 'fourth.example.com':\n  port     => '443',\n  docroot  => '/var/www/fourth',\n  ssl      => true,\n  ssl_cert => '/etc/ssl/fourth.example.com.cert',\n  ssl_key  => '/etc/ssl/fourth.example.com.key',\n}\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory \nhttp://examle.com.loc => /var/www/example.com

\n\n
apache::vhost { 'subdomain.loc':\n  vhost_name => '*',\n  port       => '80',\n  virtual_docroot' => '/var/www/%-2+',\n  docroot          => '/var/www',\n  serveraliases    => ['*.loc',],\n}\n
\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
apache::vhost { 'default-ssl':\n  port            => 443,\n  ssl             => true,\n  docroot         => $docroot,\n  scriptalias     => $scriptalias,\n  serveradmin     => $serveradmin,\n  access_log_file => "ssl_${access_log_file}",\n  }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to 'true', meaning the service is enabled/running.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'false'.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::worker or apache::mod::prefork classes with parameters. Valid values are worker, prefork, or the boolean false. Defaults to prefork on RedHat and worker on Debian.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
apache::mod { 'rewrite': }\napache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • deflate
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • fcgid
  • \n
  • info
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status
  • \n
  • userdir*
  • \n
  • worker*
  • \n
  • wsgi
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template

\n\n
class { 'apache::mod::ssl': }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
class { 'apache':\n  default_vhost => false,\n}\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [ { alias => '/alias', path => '/path/to/directory' } ],\n
\n\n

For Alias to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. Each hash should be of the form of:

\n\n
directory => [ { path => '/path/to/directory', <directive> => <value> } ],\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

The directives will be embedded within the Directory directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
directory => [ { path => '/path/to/directory',\n  addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ]\n} ]\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
directory => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
directory => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
directory => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
  directory => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }]\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
directory => [ { path => '/path/to/directory', order => 'Allow, Deny' } ],\n
\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
directory => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  options => ['Indexes','FollowSymLinks','MultiViews'],\n}\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:\n$proxy_pass = [\n { 'path' => '/a', 'url' => 'http://backend-a/' },\n { 'path' => '/b', 'url' => 'http://backend-b/' },\n { 'path' => '/c', 'url' => 'http://backend-a/c' },\n]

\n\n

apache::vhost { 'site.name.fdqn':\n …\n proxy_pass => $proxy_pass,\n}

\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_source => ['/images','/downloads'],\n  redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n}\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  redirect_status => ['temp','permanent'],\n}\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  request_headers => [\n    'append MirrorID "mirror 12"',\n    'unset MirrorID',\n  ],\n}\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n  rewrite_base => '/blog/',\n}\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n}\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
apache::vhost { 'site.name.fdqn':\n  …\n  rewrite_rule => '^index\\.html$ welcome.html',\n}\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
apache::vhost { 'third.example.com':\n  port        => '80',\n  docroot     => '/var/www/third',\n  serveradmin => 'admin@example.com',\n}\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
apache::vhost { 'sixth.example.com':\n  serveraliases => [\n    'sixth.example.org',\n    'sixth.example.net',\n  ],\n  port          => '80',\n  docroot       => '/var/www/fifth',\n}\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
apache::vhost { 'eleventh.example.com':\n  port        => '80',\n  docroot     => '/var/www/eleventh',\n  scriptalias => '/usr/lib/cgi-bin',\n}\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
apache::vhost { 'fifteenth.example.com':\n  port           => '80',\n  docroot        => '/var/www/fifteenth',\n  rack_base_uris => ['/rackapp1', '/rackapp2'],\n}\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
#The non-ssl vhost\napache::vhost { 'first.example.com non-ssl':\n  servername => 'first.example.com',\n  port       => '80',\n  docroot    => '/var/www/first',\n}\n\n#The SSL vhost at the same domain\napache::vhost { 'first.example.com ssl':\n  servername => 'first.example.com',\n  port       => '443',\n  docroot    => '/var/www/first',\n  ssl        => true,\n}\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
apache::vhost { 'sixteenth.example.com non-ssl':\n  servername      => 'sixteenth.example.com',\n  port            => '80',\n  docroot         => '/var/www/sixteenth',\n  redirect_status => 'permanent'\n  redirect_dest   => 'https://sixteenth.example.com/' \n}\napache::vhost { 'sixteenth.example.com ssl':\n  servername => 'sixteenth.example.com',\n  port       => '443',\n  docroot    => '/var/www/sixteenth',\n  ssl        => true,\n}\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
apache::listen { '80': }\napache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
apache::vhost { 'first.example.com':\n  ip       => '10.0.0.10',\n  docroot  => '/var/www/first',\n  ip_based => true,\n}\napache::vhost { 'second.example.com':\n  ip       => '10.0.0.11',\n  docroot  => '/var/www/second',\n  ip_based => true,\n}\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
apache::vhost { 'The first IP-based vhost, non-ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '80',\n  ip_based   => true,\n  docroot    => '/var/www/first',\n}\napache::vhost { 'The first IP-based vhost, ssl':\n  servername => 'first.example.com',\n  ip         => '10.0.0.10',\n  port       => '443',\n  ip_based   => true,\n  docroot    => '/var/www/first-ssl',\n  ssl        => true,\n}\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
apache::vhost { 'second.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/second',\n}\napache::vhost { 'third.example.com':\n  ip      => '10.0.0.20',\n  port    => '80',\n  docroot => '/var/www/third',\n}\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
apache::vhost { 'fourth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fourth',\n  add_listen => false,\n}\napache::vhost { 'fifth.example.com':\n  port       => '80',\n  docroot    => '/var/www/fifth',\n  add_listen => false,\n}\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
class { 'apache::dev': }\n
\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
apache::listen { '80': }\napache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
  @@apache::balancermember { "${::fqdn}-puppet00":\n    balancer_cluster => 'puppet00',\n    url              => "ajp://${::fqdn}:8009"\n    options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n  }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
  apache::balancer { 'puppet00': }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-07-09 12:47:10 -0700", "updated_at": "2013-07-09 12:47:10 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.0.3", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.3", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.3", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "8728cf041cdd94bb0899170eb2b417d9", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "8a5ca4035b1c22892923f3fde55e3d5e", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "bc54a5af648cb04b7b3bb0e3f7be6543", "manifests/ssl.pp": "11ed1861298c72cca3a706480bb0b67c", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "7806a6c098e217da046d0555314756c4", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "ed64a53af0d7bad762176a98c9ea3e62", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "9b7a414bf15b06afe2f011068fcaff52", "manifests/init.pp": "9ef7e081c832bca8f861c3a9feb9949d" }, "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.3.tar.gz", "file_size": 3929, "file_md5": "cad6c53e9e79698253187610ae8382fc", "downloads": 798, "readme": null, "changelog": null, "license": null, "created_at": "2010-06-26 16:19:57 -0700", "updated_at": "2010-06-26 16:19:57 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.0.2", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.2", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.2", "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "f137ab035e6cd5bdbbd50beeac4c68b0", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "8a5ca4035b1c22892923f3fde55e3d5e", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "bc54a5af648cb04b7b3bb0e3f7be6543", "manifests/ssl.pp": "11ed1861298c72cca3a706480bb0b67c", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "b43a4d6efb4563341efe8092677aac6f", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "9055aed946e1111c30ab81fedac2c8b0", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "86f48ebf97e079cf0dc395881d87ecef", "manifests/init.pp": "168dfe06fb9ad8d67a2effeea4477f57" }, "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.2.tar.gz", "file_size": 4006, "file_md5": "e6bca59ddbe26ae653611935d1f24e70", "downloads": 436, "readme": null, "changelog": null, "license": null, "created_at": "2010-05-23 09:52:55 -0700", "updated_at": "2010-05-23 09:52:55 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.1.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.1.1", "metadata": { "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "checksums": { "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "manifests/vhost/proxy.pp": "39a7983c5be0db66dde1d2f47f883321", "manifests/proxy.pp": "03db2be400cc08939b3566063bc58789", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "manifests/ssl.pp": "af7b58dbaf198b74f4b3785ceacb44c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "lib/puppet/type/a2mod.rb": "8b3005913ca51cb51e94d568f249880e", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/params.pp": "c1a03be37c7e2bcd0030442553488589", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "manifests/python.pp": "5f00d0b2f5fc916fdabff20d35e11846", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "Modulefile": "458789fa5a3035e3e094c128f53c4624", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/a2mod.rb": "0acf42d3d670a9915c5a3f46ae7335f1", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "README.md": "9576bc9c836ef349cc62f78c635db815", "manifests/vhost.pp": "56daed888b554900d5694625da74b012", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "manifests/init.pp": "cb62a3aba1af2eebb7a08e45ee399065", "tests/ssl.pp": "191912535199531fd631f911c6329e56", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9" }, "author": "puppetlabs", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "types": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" } ], "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" } ] } ], "version": "0.1.1", "license": "Apache 2.0", "name": "puppetlabs-apache", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ] }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.1.1.tar.gz", "file_size": 13280, "file_md5": "b00db93a5ee05c20207bbadcf85af2d6", "downloads": 308, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-08 00:23:44 -0700", "updated_at": "2012-08-08 00:23:44 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.2.2", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.2", "metadata": { "description": "Module for Apache configuration", "checksums": { "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "manifests/params.pp": "5f2b932c398e9b76c03066bc6d9b4c89", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/mod/proxy_html.pp": "fb43e85c277b11681463a48a9653d06a", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "Modulefile": "86dc96cf38ab113ef4d9abbe733276e8", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "manifests/python.pp": "5f00d0b2f5fc916fdabff20d35e11846", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/mod/php.pp": "ff7549863eba4c7722240ff9c2f140f3", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "manifests/init.pp": "2135f1adcc4f7f077a55c31f114e0bbc", "templates/httpd.conf.erb": "93971da2f62ebaee55cc8691b2073860", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "manifests/proxy.pp": "03db2be400cc08939b3566063bc58789", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "manifests/mod.pp": "aebcb145746dee43bde73278634c4fff", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "manifests/mod/dav_fs.pp": "1240d81890bc436838a0d0568d019a5a", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "manifests/vhost/proxy.pp": "39a7983c5be0db66dde1d2f47f883321", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "lib/puppet/provider/a2mod/redhat.rb": "cb8db52784eef2a50cd495773a5c46a5", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/ssl.pp": "af7b58dbaf198b74f4b3785ceacb44c1", "manifests/mod/disk_cache.pp": "8488851c7301f50e75e92890d40e6300", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "lib/puppet/type/a2mod.rb": "30ea8400197a833dc3fee3e095b01d9e", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "manifests/vhost.pp": "56daed888b554900d5694625da74b012", "manifests/mod/proxy_http.pp": "f1a0fd5eb51ba564c2bd68e6669bc7dc", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "README.md": "9576bc9c836ef349cc62f78c635db815" }, "summary": "Puppet module for Apache", "dependencies": [ { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "author": "puppetlabs", "version": "0.2.2", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "license": "Apache 2.0", "types": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu", "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" } ], "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "name": "puppetlabs-apache", "project_page": "https://github.com/puppetlabs/puppetlabs-apache" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.2.2.tar.gz", "file_size": 27385, "file_md5": "1f95ea71528835d562c99366cea3d649", "downloads": 248, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-16 01:03:41 -0700", "updated_at": "2012-08-16 01:03:41 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.2.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.0", "metadata": { "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "summary": "Puppet module for Apache", "description": "Module for Apache configuration", "checksums": { "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "manifests/mod/disk_cache.pp": "8488851c7301f50e75e92890d40e6300", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "manifests/ssl.pp": "af7b58dbaf198b74f4b3785ceacb44c1", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "Modulefile": "71a1a62d5c2c636cc0d8cb77b2a77086", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "manifests/params.pp": "5f2b932c398e9b76c03066bc6d9b4c89", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "lib/puppet/provider/a2mod/redhat.rb": "cb8db52784eef2a50cd495773a5c46a5", "manifests/mod/proxy_html.pp": "fb43e85c277b11681463a48a9653d06a", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "lib/puppet/type/a2mod.rb": "30ea8400197a833dc3fee3e095b01d9e", "manifests/python.pp": "5f00d0b2f5fc916fdabff20d35e11846", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "manifests/proxy.pp": "03db2be400cc08939b3566063bc58789", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "manifests/mod/proxy_http.pp": "f1a0fd5eb51ba564c2bd68e6669bc7dc", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "README.md": "9576bc9c836ef349cc62f78c635db815", "manifests/init.pp": "2135f1adcc4f7f077a55c31f114e0bbc", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "manifests/vhost/proxy.pp": "39a7983c5be0db66dde1d2f47f883321", "manifests/mod/dav_fs.pp": "1240d81890bc436838a0d0568d019a5a", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "templates/httpd.conf.erb": "93971da2f62ebaee55cc8691b2073860", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod.pp": "c99ae7ae9105924b8e59eb66d03ffed7", "manifests/mod/php.pp": "ff7549863eba4c7722240ff9c2f140f3", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/vhost.pp": "56daed888b554900d5694625da74b012", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "manifests/mod/default.pp": "8c0aa01c285360d3a2af62cfd6f83e9e" }, "author": "puppetlabs", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "types": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "name": "a2mod", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" } ], "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ] } ], "version": "0.2.0", "license": "Apache 2.0", "name": "puppetlabs-apache", "dependencies": [ { "version_requirement": ">= 0.0.4", "name": "puppetlabs/firewall" }, { "version_requirement": ">= 2.2.1", "name": "puppetlabs/stdlib" } ] }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.2.0.tar.gz", "file_size": 27387, "file_md5": "e7edaffc2d96a3d0ac629006ec12b117", "downloads": 233, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-13 18:22:45 -0700", "updated_at": "2012-08-13 18:22:45 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.3.0", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.3.0", "metadata": { "checksums": { "spec/fixtures/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb": "5107b980166d30e6bd25ea025d3484e3", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", "spec/fixtures/modules/firewall/lib/puppet/util/ipcidr.rb": "225adf61f5de40fa04b4e936e388b801", "spec/fixtures/modules/firewall/spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", "spec/fixtures/modules/stdlib/CHANGELOG": "7a0821b69956493f568059a3aeec087b", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/num2bool_spec.rb": "7c80e016a73122fa5f921dac02626d89", "spec/fixtures/modules/firewall/CONTRIBUTING.md": "346969b756bc432a2a2fab4307ebb93a", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", "spec/fixtures/modules/firewall/LICENSE": "9dc93ec9f7c0bc97ab9aad3ecd8abba9", "spec/fixtures/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb": "564e1b1f4266e1659bd8e6ed050646a1", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb": "0ca530d1d3b45c3fe2d604c69acfc22f", "spec/fixtures/modules/stdlib/spec/functions/ensure_resource_spec.rb": "0ff2b16e3b1d23603c6cbfca08109c02", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb": "fba9f855df3bbf90d72dfd5201f65d2b", "manifests/mod/dev.pp": "71234485e642f0e8cdd8774670d48b7f", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/abs.rb": "c2f2c4a62a56e7adbf5cf0b292e081fc", "spec/fixtures/modules/firewall/gemfiles/gemfile.ci": "b49c789db2ea4a42c166bb5b7024533c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", "spec/fixtures/modules/stdlib/README.markdown": "5e7b077c2b63a84f2b5f8d3cc6b7365e", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/range.rb": "033048bba333fe429e77e0f2e91db25f", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", "spec/fixtures/modules/firewall/spec/puppet_spec/fixtures.rb": "147446d18612c8395ac65be10b1cd9ab", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "spec/fixtures/modules/stdlib/tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", "spec/fixtures/modules/firewall/lib/puppet/type/firewallchain.rb": "89a8f6df0596081a4fd7343bd8d2f7ba", "spec/fixtures/modules/firewall/spec/fixtures/iptables/conversion_hash.rb": "a3aa01960bbc9de06aa1925a2fb7e36f", "README.md": "9342c60532e2950fae48eac3bbcf8d73", "spec/fixtures/modules/stdlib/tests/init.pp": "1d98070412c76824e66db4b7eb74d433", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "manifests/mod.pp": "b07b1f5ab911549827dcf22b28a3b7f4", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", "spec/fixtures/modules/stdlib/lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", "spec/fixtures/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb": "f773208d8ac7301c5894eb03cef0bd36", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/hash.rb": "75fd86c01d5b1e50be1bc8b22d3d0a61", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", "manifests/mod/ssl.pp": "2ffd543847785cd2f916f244f8742448", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_float_spec.rb": "6545a48ae74b5b9986f46e0cc177f200", "spec/fixtures/modules/stdlib/README_DEVELOPER.markdown": "9040e68353f663024ab41cea6373b255", "spec/fixtures/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb": "79e157384acccc3c6bb1e01233845e52", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", "spec/fixtures/modules/stdlib/spec/unit/facter/root_home_spec.rb": "4f4c4236ac2368d2e27fd2f3eb606a19", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "templates/httpd.conf.erb": "93971da2f62ebaee55cc8691b2073860", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "spec/fixtures/modules/stdlib/manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "spec/fixtures/modules/firewall/Rakefile": "17ab6da1866351b9ece1ddef91627697", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_re_spec.rb": "b21292ad2f30c0d43ab2f0c2df0ba7d5", "spec/fixtures/modules/firewall/CHANGELOG.md": "e87877cc22f0c0edff065764bbb44ba2", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/chop.rb": "4cc840d63ec172d8533a613676391d39", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb": "6283dd52935fb1aba41958e50c85b1ed", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/str2bool_spec.rb": "a3f9c1e4121a58e02c1614cc771d180d", "spec/fixtures/modules/firewall/spec/unit/puppet/util/firewall_spec.rb": "2fb1969b40b519f1b87cbc76bb819b32", "spec/fixtures/modules/firewall/lib/facter/ip6tables_version.rb": "091123ad703f1706686bca4398c5b06f", "spec/fixtures/modules/stdlib/RELEASE_PROCESS.markdown": "1981f306c0047720e37be07bb6c976a4", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb": "a53f6e3a5855954148230846ccb3e04d", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", "spec/fixtures/modules/firewall/examples/ip6tables/test.pp": "c6b85866eae5e4c764f052ccad57405b", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb": "5c2e7990e22e5a532931627b4aaf545b", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_string_spec.rb": "3c04a751615a86656f04d313028a4cf4", "spec/fixtures/modules/firewall/lib/puppet/type/firewall.rb": "8735218a193e749d26c24fbb28fdd689", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", "Modulefile": "34feb44b894a365e45df041aee543e3f", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "spec/fixtures/modules/firewall/spec/puppet_spec/files.rb": "34e40f4dcdc90d1138a471d883c33d79", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_numeric_spec.rb": "0527750a0960bae36c14f6705fd50f37", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", "spec/fixtures/modules/firewall/Modulefile": "40f947a769cca5c2846ba83ea7b624ef", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_bool_spec.rb": "9b1e15d42a7aaa45e56cca0e60ac1fc3", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", "manifests/params.pp": "f9bd340370fc15c7aed58d71d710953d", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/range_spec.rb": "91d69115dea43f62a2dca9a10467d836", "manifests/mod/dav_fs.pp": "1240d81890bc436838a0d0568d019a5a", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/flatten.rb": "251d63696564254d41742ecbfbfcb9fd", "spec/fixtures/modules/firewall/lib/puppet/util/firewall.rb": "b04edd8793aabdc4901fffd18d5e9178", "manifests/vhost.pp": "ecbabee9423ca9a122b8311dc625a16b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", "spec/fixtures/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb": "966ea9470fb65a5c43fad8232d874c04", "spec/fixtures/modules/firewall/spec/unit/puppet/type/firewall_spec.rb": "e48514ac1405a5715c09e604829252b0", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/prefix_spec.rb": "16a95b321d76e773812693c80edfbe36", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_array_spec.rb": "3fd3c8cca1c69e47e89acf27fafd2ddb", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", "spec/fixtures/modules/stdlib/lib/facter/root_home.rb": "f559294cceafcf70799339627d94871d", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/delete_spec.rb": "723517ac32bd4fb17c861660a28e862e", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/merge_spec.rb": "15dae59473437569f7430525ee84a8c1", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete.rb": "4a3c82d0ed8ea4c953658efdd06fe7c9", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", "spec/fixtures/modules/firewall/examples/iptables/test.pp": "608a010ba80896c788b0ca916b02f58b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", "spec/fixtures/modules/firewall/lib/puppet/provider/firewall/iptables.rb": "7d678c903d414325c18f33319fb2c6c2", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_absolute_path_spec.rb": "07839082d24d5a7628fd5bce6c8b35c3", "manifests/dev.pp": "c263f8db2a35361e9dfdef30477f8ee3", "manifests/mod/default.pp": "8a2bc7a4312d60fd09ac4eadceab9330", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", "spec/fixtures/modules/firewall/README.markdown": "8f83ed587843dcc52c8729f37328a42e", "spec/fixtures/modules/stdlib/spec/watchr.rb": "b588ddf9ef1c19ab97aa892cc776da73", "manifests/init.pp": "333146fe0bbc882207c7b78dc4b2e8cd", "spec/fixtures/modules/firewall/spec/unit/facter/iptables_spec.rb": "ebb008f0e01530a49007228ca1a81097", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/prefix.rb": "6a2d86233c9435afc1738f60a0c34576", "manifests/vhost/proxy.pp": "6a09bd5018f556025de54632cb02d061", "spec/fixtures/modules/stdlib/lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "spec/fixtures/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb": "1be207954750c56fc038f66d7013bb08", "manifests/mod/proxy_html.pp": "fb43e85c277b11681463a48a9653d06a", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_integer_spec.rb": "8237a89bdb32c69c5bd4a275eb7df8b7", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/get_module_path_spec.rb": "24c75fb78853f05d35d041b59232c3f4", "spec/fixtures/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb": "a5478a72a7fab2d215f39982a9230c18", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", "spec/fixtures/modules/stdlib/Modulefile": "a34f853220bd4a89e0fbb0df5ab508c4", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/str2saltedsha512_spec.rb": "215579d1a544bd62b251bf048c565b26", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_float.rb": "491937483b14fbe2594a6e0e9af6acf9", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/squeeze.rb": "ae5aafb7478cced0ba0c23856e45cec5", "spec/fixtures/modules/firewall/examples/iptables/run.sh": "564f117a8cd0fefe32c9f0edd90fa95b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/delete_at_spec.rb": "5a4287356b5bd36a6e4c100421215b8e", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/flatten_spec.rb": "c1c039171d1baef89452092731b9e003", "spec/fixtures/modules/stdlib/lib/puppet/type/anchor.rb": "cc1da7acfe1259d5b86a64e2dea42c34", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", "spec/fixtures/modules/firewall/spec/puppet_spec/matchers.rb": "8e77dc7317de7fc2ff289fb716623b6c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb": "c053cb14a26e820713c882040f0569ab", "spec/fixtures/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb": "345bcbef720458e25be0190b7638e4d9", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "spec/fixtures/modules/firewall/examples/iptables/readme.pp": "4cdceafc073291d192473e2c88e42681", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", "spec/fixtures/modules/stdlib/lib/puppet/provider/file_line/ruby.rb": "f0f61ee3076d6b8f5883872abe844f37", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb": "4ddffdf5954b15863d18f392950b88f4", "Rakefile": "0254db5d3fc38c67a2c160d7296a24f8", "lib/puppet/provider/a2mod/redhat.rb": "cb8db52784eef2a50cd495773a5c46a5", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/merge.rb": "52281fe881b762e2adfef20f58dc4180", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", "spec/fixtures/modules/firewall/spec/spec_helper.rb": "23f11c52c807885b606650b4fae43dab", "spec/fixtures/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb": "e8cd7432739cb212d40a9148523bd4d7", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb": "6cfee471d287c8d110a3629a9ac31b69", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/num2bool.rb": "dbdc81982468ebb8ac24ab78d7097ad3", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "spec/fixtures/modules/firewall/lib/puppet/provider/firewall.rb": "f4c747685c2c8ef97fe78732c8153c75", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "lib/puppet/type/a2mod.rb": "30ea8400197a833dc3fee3e095b01d9e", "manifests/vhost/redirect.pp": "c4b1b5eefb11d4a4025096e1aa13d6cf", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/str2bool.rb": "846b49d623cb847c1870d7ac4a6bedf3", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", "spec/fixtures/modules/firewall/spec/puppet_spec/verbose.rb": "2e0e0e74f2c5ec0408d455e773755bf9", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", "spec/fixtures/modules/stdlib/Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "manifests/mod/proxy_http.pp": "f1a0fd5eb51ba564c2bd68e6669bc7dc", "spec/fixtures/modules/firewall/lib/facter/iptables_version.rb": "facbd760223f236538b731c1d1f6cf8f", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "spec/fixtures/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb": "7cd4065c63f06f1ab3aaa1c5f92af947", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_integer.rb": "6520458000b349f1c7ba7c9ed382ae0b", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/join.rb": "b28087823456ca5cf943de4a233ac77f", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", "spec/fixtures/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb": "1a6eeb2dd7c9634fcfb60d8ead6e1d79", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_hash_spec.rb": "399d936c9532e7f328291027b7535ea7", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "spec/fixtures/modules/stdlib/spec/monkey_patches/publicize_methods.rb": "1b03a4af94f7dac35f7c2809caf372ca", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "spec/fixtures/modules/stdlib/spec/spec_helper.rb": "861b1bb0ee51878f2edf2c8f8449596b", "spec/fixtures/modules/stdlib/manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/validate_slength_spec.rb": "a1b4d805149dc0143e9a57e43e1f84bf", "spec/fixtures/modules/stdlib/LICENSE": "38a048b9d82e713d4e1b2573e370a756", "manifests/mod/php.pp": "ff7549863eba4c7722240ff9c2f140f3", "manifests/mod/disk_cache.pp": "8488851c7301f50e75e92890d40e6300", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/fixtures/modules/stdlib/spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "spec/fixtures/modules/stdlib/spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/chomp.rb": "7040b3348d2f770f265cf4c8c25c51c5", "spec/fixtures/modules/stdlib/lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", "spec/fixtures/modules/firewall/spec/monkey_patches/publicize_methods.rb": "1b03a4af94f7dac35f7c2809caf372ca", "spec/fixtures/modules/stdlib/spec/unit/puppet/parser/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", "spec/fixtures/modules/stdlib/lib/puppet/type/file_line.rb": "09381c3e04c684f4ba702381c727acbd" }, "types": [ { "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" } ], "name": "a2mod", "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "project_page": "https://github.com/puppetlabs/puppetlabs-apache", "version": "0.3.0", "dependencies": [ { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "summary": "Puppet module for Apache", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "author": "puppetlabs", "description": "Module for Apache configuration", "name": "puppetlabs-apache", "license": "Apache 2.0" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.3.0.tar.gz", "file_size": 740331, "file_md5": "306d26a53b2ee31a1c51a9ee801aa3c8", "downloads": 216, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::mod::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-22 18:24:38 -0700", "updated_at": "2012-08-22 18:24:38 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.0.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.0.1", "metadata": { "name": "puppetlabs-apache", "dependencies": [ ], "author": "", "license": "", "version": "0.0.1", "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu Required binaries: ``a2enmod``, ``a2dismod``. Default for ``operatingsystem`` == ``debianubuntu``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "checksums": { "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/params.pp": "71734796921dbdbfd58f503622527616", "tests/vhost.pp": "1b91e03c8ef89a7ecb6793831ac18399", "manifests/php.pp": "b78cc593f1c4cd800c906e0891c9b11f", "lib/puppet/provider/a2mod/a2mod.rb": "18c5bb180b75a2375e95e07f88a94257", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/dev.pp": "510813942246cc9a7786d8f2d8874a35", "manifests/ssl.pp": "b4334a161a2ba5fa8a62cf7b38f352c8", "files/test.vhost": "0602022c19a7b6b289f218c7b93c1aea", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/vhost.pp": "cbc4657b0cce5cd432057393d5f6b0c2", "lib/puppet/type/a2mod.rb": "0e1b4843431413a10320ac1f6a055d15", "templates/vhost-default.conf.erb": "9055aed946e1111c30ab81fedac2c8b0", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/apache.pp": "4eac4a7ef68499854c54a78879e25535", "Modulefile": "a627da3a70651c38fc6578a4f4e100a8", "manifests/init.pp": "dc503e26e8021351078813b541c4bd3d" }, "source": "" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.0.1.tar.gz", "file_size": 3435, "file_md5": "95abc51e9b772421c1c254ba467ea02b", "downloads": 173, "readme": null, "changelog": null, "license": null, "created_at": "2010-05-20 22:43:44 -0700", "updated_at": "2010-05-20 22:43:44 -0700", "deleted_at": null }, { "uri": "/v3/releases/puppetlabs-apache-0.2.1", "module": { "uri": "/v3/modules/puppetlabs-apache", "name": "apache", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.1", "metadata": { "description": "Module for Apache configuration", "checksums": { "templates/vhost-redirect.conf.erb": "f12c8165c2e9a688402ec8484ef6c59c", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "manifests/mod/proxy_http.pp": "f1a0fd5eb51ba564c2bd68e6669bc7dc", "spec/classes/dev_spec.rb": "e0392f699206ca40a5c66c51b2349ff7", "spec/classes/python_spec.rb": "af7d22879b16d3ce4a5ed70d4d880903", "manifests/mod.pp": "aebcb145746dee43bde73278634c4fff", "spec/spec_helper.rb": "980111cecb2c99b91ac846d7b0862578", "spec/classes/mod/wsgi_spec.rb": "8e34c9ab7fc445d13d9ed318d0a34cdf", "manifests/mod/cgi.pp": "eba237e3f10511c02d8f27b99592103d", "lib/puppet/type/a2mod.rb": "30ea8400197a833dc3fee3e095b01d9e", "spec/unit/provider/a2mod/gentoo_spec.rb": "1be4e8d809ed8369de44a022254bfb7b", "Rakefile": "65bc94e790a918bcfd07686c2d51e043", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/params.pp": "5f2b932c398e9b76c03066bc6d9b4c89", "spec/classes/php_spec.rb": "aa98098c3404325c941ad1aa71295640", "spec/classes/mod/auth_kerb_spec.rb": "f8431c93f2a863b2664cadcb13c71e86", "manifests/mod/auth_kerb.pp": "a7e4d1789f23528c7a19690340387a85", "manifests/vhost.pp": "56daed888b554900d5694625da74b012", "lib/puppet/provider/a2mod/redhat.rb": "cb8db52784eef2a50cd495773a5c46a5", "lib/puppet/provider/a2mod/a2mod.rb": "8b4836cfbcc980e60c30cc046bc77cd5", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "spec/classes/mod/python_spec.rb": "26a3d76a16abf7f2c7c9f7767196ecd1", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "Modulefile": "e9573c6e3e67a37baf484e124dff2006", "CHANGELOG": "3705f6d39cde99023ee6de89f40910a1", "templates/httpd.conf.erb": "93971da2f62ebaee55cc8691b2073860", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/vhost/proxy.pp": "39a7983c5be0db66dde1d2f47f883321", "templates/mod/proxy.conf.erb": "54cd35ef17c78c18f10be50eebb4142c", "manifests/ssl.pp": "af7b58dbaf198b74f4b3785ceacb44c1", "templates/mod/userdir.conf.erb": "fd73fe59b6a5dcf16a5df9af91c187dd", "spec/defines/vhost/redirect_spec.rb": "337fb5c89ab5fc790ecb76f8b169a7e6", "tests/vhost.pp": "4a97d258da130cad784249a6097fd0ac", "templates/mod/php.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/disk_cache.conf.erb": "bc2cb0003944e688d3137781f6a49997", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "manifests/mod/userdir.pp": "a7d01097caba2b3dcec7d6e96e0bf500", "templates/vhost-default.conf.erb": "707b9b87fb97fa8c99ce3b1743f732cb", "manifests/dev.pp": "aecfbf399723a86b00681b03a1cd13d9", "manifests/mod/dav_fs.pp": "1240d81890bc436838a0d0568d019a5a", "manifests/mod/proxy_html.pp": "fb43e85c277b11681463a48a9653d06a", "manifests/mod/disk_cache.pp": "8488851c7301f50e75e92890d40e6300", "spec/defines/vhost/proxy_spec.rb": "7c992871919bff127c45ea1d41f4a3fe", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "manifests/mod/proxy.pp": "d789eec804b4e887858cde19429afc7d", "manifests/init.pp": "2135f1adcc4f7f077a55c31f114e0bbc", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "manifests/php.pp": "203071fafab369cacc8b7bec80eec481", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "spec/classes/apache_spec.rb": "e4aff27ddc0ff9d53f2a701efde12ac0", "spec/classes/ssl_spec.rb": "f5d8c8a22a3b08647c1d7b5bdaea5fdd", "manifests/mod/default.pp": "f578d8ffd6d6d4a566fedd8a0e728e2c", "manifests/mod/php.pp": "ff7549863eba4c7722240ff9c2f140f3", "manifests/mod/wsgi.pp": "90ef340ac19106fe801656091d3f9a4b", "templates/vhost-proxy.conf.erb": "3f6e23159809c4aa5a20b441d12a09ad", "README.md": "9576bc9c836ef349cc62f78c635db815", "manifests/vhost/redirect.pp": "8fdef0e0e8da73e9fb30f819de2a4464", "tests/ssl.pp": "191912535199531fd631f911c6329e56", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/python.pp": "d68627ba8c02bcd2cf910e02e45321ee", "spec/classes/params_spec.rb": "384b7b99be6d2bcd684f2ecf54d2df3e", "manifests/python.pp": "5f00d0b2f5fc916fdabff20d35e11846", "templates/test.vhost.erb": "31eb6a591acc699fe4e67a7cf367d0ab", "spec/defines/vhost_spec.rb": "66140938dc89df1bf2458663d9663fbd", "tests/php.pp": "ce7bb9eef69d32b42a32ce32d9653625", "manifests/proxy.pp": "03db2be400cc08939b3566063bc58789", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd" }, "summary": "Puppet module for Apache", "dependencies": [ { "name": "puppetlabs/firewall", "version_requirement": ">= 0.0.4" }, { "name": "puppetlabs/stdlib", "version_requirement": ">= 2.2.1" } ], "author": "puppetlabs", "version": "0.2.1", "source": "git://github.com/puppetlabs/puppetlabs-apache.git", "license": "Apache 2.0", "types": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu", "name": "a2mod", "providers": [ { "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2mod" }, { "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`.", "name": "gentoo" }, { "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n ", "name": "modfix" }, { "doc": "Manage Apache 2 modules on RedHat family OSs\n\nDefault for `osfamily` == `redhat`.", "name": "redhat" } ], "parameters": [ { "doc": "The name of the module to be managed", "name": "name" }, { "doc": "The name of the .so library to be loaded", "name": "lib" } ], "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ] } ], "name": "puppetlabs-apache", "project_page": "https://github.com/puppetlabs/puppetlabs-apache" }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.2.1.tar.gz", "file_size": 27389, "file_md5": "8c8f4d98653673a2563372c3f8e5dfcb", "downloads": 159, "readme": "

Puppetlabs module for Apache

\n\n

Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.

\n\n

Basic usage

\n\n

To install Apache

\n\n
class {'apache':  }\n
\n\n

To install the Apache PHP module

\n\n
class {'apache::php': }\n
\n\n

Configure a virtual host

\n\n

You can easily configure many parameters of a virtual host. A minimal\nexample is:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n}\n
\n\n

A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:

\n\n
apache::vhost { 'www.example.com':\n    priority        => '10',\n    vhost_name      => '192.0.2.1',\n    port            => '80',\n    docroot         => '/home/www.example.com/docroot/',\n    logroot         => '/srv/www.example.com/logroot/',\n    serveradmin     => 'web@example.com',\n    serveraliases   => ['example.com',],\n}\n
\n\n

Notes

\n\n

Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat /home/www.example.com and /srv/www.example.com directories exist.

\n\n

Contributors

\n\n
    \n
  • A cast of hundreds, hopefully you too soon
  • \n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "
2012-05-08 Puppet Labs <info@puppetlabs.com> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2012-08-16 00:25:44 -0700", "updated_at": "2012-08-16 00:25:44 -0700", "deleted_at": null } ] } puppet_forge-5.0.3/spec/fixtures/v3/files/0000755000004100000410000000000014515571425020514 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.headers0000644000004100000410000000056614515571425027314 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/octet-stream Content-Length: 3435 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public ETag: "95abc51e9b772421c1c254ba467ea02b" X-Node: forgeapi03 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/v3/files/puppetlabs-apache-0.0.1.tar.gz.json0000644000004100000410000000655314515571425026654 0ustar www-datawww-data‹nMíýwÛ¶1?ë¯Àd÷ÉÙd‰ßjœ6‹×¥ï%±_ãu?dy1€ŠÔÒŽçúß õi‰–•¨éÌkk‘ø¸;âp‡Ã¼Ž‹ñ˜å1ø!c2d‡ZOëéý'_4×¶å/À⯼Öu[s-Ç5Lh§›Žî«ô Û~ŽÕé¿fëKç £Ñÿ]€t¶;K³ Ó*ßÜ¡ŽœƧþÿ„Õç¿DDûËÐØÜÿ·\Gkü¿]Àzù«×/ÛÒ¨µÿ†µÿÓ\³±ÿ»€(!qAR€÷tÙ˜úGëõòu+µú¯»‹úo[ÍùßÀ¼þ7ªÿØ`½þWI¶£Q§ÿº¹¤ÿ–c7ú¿ XÐÿÊ ‚G7¨3=ÃÔ ò°ÝÑójÇ8è÷ûeè§\+f=uÐmcO¾uX¯ÿ剦-i<`ý7œ&þ³hÖÿÇ ëõ_ÔÝ–ÆöÿºÖ¼ÿÙ ,îÿAâxD°^ÿÕÉ÷miŠøtÍnÍ:ëü‚©[PNÅ:­*"1UW¹ ¢Ewú¡œöe¦†J3¹šåâeT‰|÷†èUó¬H0+U0e4q²˜'Y¬ÔDÁÛžø½Á×è ƒQÈS4.² &3ž&"AX¼ÿ²Éùè‚ݹÔ|šÄB¿îIŒ/Ä‘ëù !™ K?1‘ßâuš~a½0ú,0F¹÷gkgÒ¦Ï×=W!Ão1oús¥ÿ!ò£¯×¹ônM£.þo‹þŸíºÍ÷_;=ô2MÂè¢N]š¨¸§H®!bÔRüU¾×jIcåUuœ¥bŠ‹³x“£ƒ7§ožŠHµè]Öà7RèÙ)£!Õ¸ê í2†©j¢Š»¨sXÖé D8æ)ôÅ—8ŠE·‹‚"G4Ó€}MÑU”OGÓ0û/ÈaŽN_>í•\W/F r‘N æ¾H \1D†8¹PÑy  Ê z=ñЯÎÎNúÏúôX©EO±YŽJ Þ®p¤)Ä8⥥%;£)ß©$Ø?= 2.4.0" }, { "name": "puppetlabs/concat", "version_requirement": ">= 1.0.0" } ], "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." } ], "parameters": [ { "name": "name", "doc": "The name of the module to be managed" }, { "name": "lib", "doc": "The name of the .so library to be loaded" }, { "name": "identifier", "doc": "Module identifier string used by LoadModule. Default: module-name_module" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Debian and Ubuntu\n\nRequired binaries: `a2enmod`, `a2dismod`, `apache2ctl`. Default for `operatingsystem` == `debian, ubuntu`." }, { "name": "gentoo", "doc": "Manage Apache 2 modules on Gentoo\n\nDefault for `operatingsystem` == `gentoo`." }, { "name": "modfix", "doc": "Dummy provider for A2mod.\n\n Fake nil resources when there is no crontab binary available. Allows\n puppetd to run on a bootstrapped machine before a Cron package has been\n installed. Workaround for: http://projects.puppetlabs.com/issues/2384\n " }, { "name": "redhat", "doc": "Manage Apache 2 modules on RedHat family OSs\n\nRequired binaries: `apachectl`. Default for `osfamily` == `redhat`." } ] } ], "checksums": { "CHANGELOG.md": "2ed7b976e9c4542fd1626006cb44783b", "CONTRIBUTING.md": "5520c75162725951733fa7d88e57f31f", "Gemfile": "c1cd7b0477f1a99e0156a471aac6cd58", "Gemfile.lock": "13733647826ec5cff955b593fd9a9c5c", "LICENSE": "b3f8a01d8699078d82e8c3c992307517", "Modulefile": "560b5e9d2b04ddbc23f3803645bfbda5", "README.md": "c937c2d34a76185fe8cfc61d671c47ec", "README.passenger.md": "0316c4a152fd51867ece8ea403250fcb", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "files/httpd": "295f5e924afe6f752d29327e73fe6d0a", "lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628", "lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd", "lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5", "lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b", "lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236", "lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05", "manifests/balancer.pp": "c635b2d2dec8b5972509960152e169a3", "manifests/balancermember.pp": "8afe51921a42545402fa457820162ae2", "manifests/confd/no_accf.pp": "c44b75749a3a56c0306433868d6b762c", "manifests/default_confd_files.pp": "7cbc2f15bfd34eb2f5160c671775c0f6", "manifests/default_mods/load.pp": "b3f21b3186216795dd18ee051f01e3c2", "manifests/default_mods.pp": "ea267ac599fc3d76db6298c3710cee60", "manifests/dev.pp": "639ba24711be5d7cea0c792e05008c86", "manifests/init.pp": "ffc69874d88f7ac581138fbf47d04d04", "manifests/listen.pp": "5efc62bd75a0a9a9565b12bd8cb2a9e4", "manifests/mod/alias.pp": "3c144a2aa8231de61e68eced58dc9287", "manifests/mod/auth_basic.pp": "47ff846317d52d2161c6d09cac05f7f8", "manifests/mod/auth_kerb.pp": "7876ffdca25396285a26afae8dd030eb", "manifests/mod/authnz_ldap.pp": "10c795251b2327614ef0b433591ed128", "manifests/mod/autoindex.pp": "1b07e7737b4b27f977f80c289172a55b", "manifests/mod/cache.pp": "51b4826a72090da8e463bc007695f05b", "manifests/mod/cgi.pp": "8c9265733584e188196fe69fd3b9fdd7", "manifests/mod/cgid.pp": "d218c11d4798453d6075f8f1553c94de", "manifests/mod/dav.pp": "f0228b06b7101864f7c943b541e570d2", "manifests/mod/dav_fs.pp": "a166fc9b780abea2eec1ab723ce3a773", "manifests/mod/dav_svn.pp": "641911969d921123865e6566954c0edb", "manifests/mod/deflate.pp": "f317ddf1cbfee52945d0433a3b25c728", "manifests/mod/dev.pp": "d6a001af402d8e82e952c8243c5e5321", "manifests/mod/dir.pp": "f3c3e6a21653ebda12f35b4b140e68d5", "manifests/mod/disk_cache.pp": "f19193d4f119224e19713e0c96a0de6d", "manifests/mod/event.pp": "e48aefd215dd61980f0b9c4d16ef094a", "manifests/mod/expires.pp": "a9b7537846258af84f12b8ce3510dfa8", "manifests/mod/fastcgi.pp": "fec8afea5424f25109a0b7ca912b16b1", "manifests/mod/fcgid.pp": "d03eb1add8f2cef603331dde96f1f7fd", "manifests/mod/headers.pp": "224438518465d09c951eb00dbaf8123c", "manifests/mod/info.pp": "9a45dd07a2681dc1fef9204de3f42bd9", "manifests/mod/itk.pp": "7c32234950dc74354b06a2da15197179", "manifests/mod/ldap.pp": "f5033ee5197938d402854d8ffa9fb1d3", "manifests/mod/mime.pp": "0fa7835f270e511616927afe01a0526c", "manifests/mod/mime_magic.pp": "fe249dd7e1faa5ec5dd936877c64e856", "manifests/mod/negotiation.pp": "9f5d70e4c961175a78a049fedaac85c9", "manifests/mod/nss.pp": "f7a7efaac854599aa7b872665eb5d93c", "manifests/mod/passenger.pp": "e6c48c22a69933b0975609f2bacf2b5d", "manifests/mod/perl.pp": "72195ad624f68e2c0009074d118bf8e4", "manifests/mod/peruser.pp": "3a2eaab65d7be2373740302eac33e5b1", "manifests/mod/php.pp": "a3725f487f58eb354c84a4fee704daa9", "manifests/mod/prefork.pp": "84b64cb7b46ab0c544dfecb476d65e3d", "manifests/mod/proxy.pp": "eb1e8895edee5e97edc789923fc128c8", "manifests/mod/proxy_ajp.pp": "f9b72f1339cc03f068fa684f38793120", "manifests/mod/proxy_balancer.pp": "5ab6987614f8a1afde3a8b701fbbe22a", "manifests/mod/proxy_html.pp": "1a96fd029a305eb88639bf5baf06abdd", "manifests/mod/proxy_http.pp": "773d0fbb934440a24b3bc87517faa4d4", "manifests/mod/python.pp": "0b22df3d0e9a39ce948212e18329155f", "manifests/mod/reqtimeout.pp": "2ff860e05de7352d4a1bcd57c0ee08f0", "manifests/mod/rewrite.pp": "165fdccc8acc61e5fb088d9917861a3c", "manifests/mod/rpaf.pp": "1125f0c5296ca584fa71de474c95475f", "manifests/mod/setenvif.pp": "32098aaab01723cae4c44d2fff8114ea", "manifests/mod/ssl.pp": "c8ab5728fda7814dace9a8eebf13476c", "manifests/mod/status.pp": "d7366470082970ac62984581a0ea3fd7", "manifests/mod/suphp.pp": "c42d20b057007eff1a75595fc3fe7adf", "manifests/mod/userdir.pp": "7166fee20a3e5b97d61dfae18fb745c9", "manifests/mod/vhost_alias.pp": "ea2d06875ed4f47ba65da0f7169e529e", "manifests/mod/worker.pp": "b1809ac41b322b090be410d41e57157e", "manifests/mod/wsgi.pp": "a0073502c2267d7e72caaf9f4942ab7c", "manifests/mod/xsendfile.pp": "ebe6241729f1b0d8125043a1f34caa54", "manifests/mod.pp": "2d4ab8907db92e50c5ed6e1357fed9fb", "manifests/namevirtualhost.pp": "27bb9faa95147fcd15ec2aa0a95bc3af", "manifests/package.pp": "c32ba42fe3ab4acc49d2e28258108ba1", "manifests/params.pp": "221fa0dcbdd00066e074bc443c0d8fdb", "manifests/peruser/multiplexer.pp": "712017c1d1cee710cd7392a4c4821044", "manifests/peruser/processor.pp": "293fcb9d2e7ae98b36f544953e33074e", "manifests/php.pp": "a4478838b4cf9b0525b04db150cf55b8", "manifests/proxy.pp": "54e7657920b580546f3bef3980f2fd03", "manifests/python.pp": "2edb06e8119b67a5a62fb24fb280d3e5", "manifests/service.pp": "56e90e48165989a7df3360dc55b01360", "manifests/ssl.pp": "7f944d1c103a59ebd04d02e68af69f7a", "manifests/vhost/custom.pp": "58bd40d3d12d01549545b85667855d38", "manifests/vhost.pp": "41c68c9ef48c3ef9d1c4feb167d71dd2", "spec/classes/apache_spec.rb": "70ebba6cbb794fe0239b0e353796bae9", "spec/classes/dev_spec.rb": "051fcee20c1b04a7d52481c4a23682b3", "spec/classes/mod/auth_kerb_spec.rb": "229c730ac88b05c4ea4e64d395f26f27", "spec/classes/mod/authnz_ldap_spec.rb": "19cef4733927bc3548af8c75a66a8b11", "spec/classes/mod/dav_svn_spec.rb": "b41e721c0b5c7bac1295187f89d27ab7", "spec/classes/mod/dev_spec.rb": "81d37ad0a51e6cae22e79009e719d648", "spec/classes/mod/dir_spec.rb": "a8d473ce36e0aaec0f9f3463cd4bb549", "spec/classes/mod/event_spec.rb": "cce445ab0a7140bdb50897c6f692ec17", "spec/classes/mod/fastcgi_spec.rb": "ff35691208f95aee61150682728c2891", "spec/classes/mod/fcgid_spec.rb": "ca3ee773bdf9ac82e63edee4411d0281", "spec/classes/mod/info_spec.rb": "90f35932812cc86058b6ccfd48eba6e8", "spec/classes/mod/itk_spec.rb": "261aa7759e232f07d70b102f0e8ab828", "spec/classes/mod/mime_magic_spec.rb": "a3748b9bd66514b56aa29a377a233606", "spec/classes/mod/passenger_spec.rb": "ece983e4b228f99f670a5f98878f964b", "spec/classes/mod/perl_spec.rb": "123e73d8de752e83336bed265a354c08", "spec/classes/mod/peruser_spec.rb": "72d00a427208a3bc0dda5578d36e7b0e", "spec/classes/mod/php_spec.rb": "3907e0075049b0d3cdadb17445acae2d", "spec/classes/mod/prefork_spec.rb": "537882d6f314a17c3ead6f51a67b20b8", "spec/classes/mod/proxy_html_spec.rb": "3587873d56172c431f93a78845b7d24e", "spec/classes/mod/python_spec.rb": "9011cd2ac1d452daec091e5cf337dbe7", "spec/classes/mod/rpaf_spec.rb": "b419712d8e6acbe00f5c4034161e40af", "spec/classes/mod/ssl_spec.rb": "969111556de99092152735764194d267", "spec/classes/mod/status_spec.rb": "a1f70673810840e591ac25a1803c39d7", "spec/classes/mod/suphp_spec.rb": "1da3f6561f19d8c7f2a71655fa7772ea", "spec/classes/mod/worker_spec.rb": "cf005d3606362360f7fcccce04e53be6", "spec/classes/mod/wsgi_spec.rb": "37ad1d623b1455e237a75405776d58d9", "spec/classes/params_spec.rb": "9b1984a3e8a485ff128512833400dfbd", "spec/classes/service_spec.rb": "d522ae1652cc87a4b9c6e33034ee5774", "spec/defines/mod_spec.rb": "80d167b475191b63713087462e960a44", "spec/defines/vhost_spec.rb": "89905755a72b938e99f4a01ef64203e9", "spec/fixtures/modules/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff", "spec/spec.opts": "c407193b3d9028941ef59edd114f5968", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "c54584d03120766bac28221597920d3d", "spec/system/basic_spec.rb": "73bab7cf3eb0554b7d7801613c4b483e", "spec/system/class_spec.rb": "6f29d603a809ae6208243911c0b250e4", "spec/system/default_mods_spec.rb": "fff758602ee95ee67cad2abc71bc54fb", "spec/system/itk_spec.rb": "c645ac3b306da4d3733c33f662959e36", "spec/system/mod_php_spec.rb": "b823cdcfe4288359a3d2dfd70868691d", "spec/system/mod_suphp_spec.rb": "9d38045b3dcb052153e7c08164301c13", "spec/system/prefork_worker_spec.rb": "a6f1b3fb3024a0dce75e45a7c2d6cfd0", "spec/system/service_spec.rb": "3cd71e4e40790e1624487fd233f18a07", "spec/system/vhost_spec.rb": "86e147833f1acebf2b08451f02919581", "spec/unit/provider/a2mod/gentoo_spec.rb": "24ad9db4f6ba0b4fc7ed77b509b4244c", "templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0", "templates/httpd.conf.erb": "6e768a748deb4737a8faf82ea80196c1", "templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6", "templates/mod/alias.conf.erb": "e65c27aafd88c825ab35b34dd04221ea", "templates/mod/authnz_ldap.conf.erb": "12c9a1482694ddad3143e5eef03fb531", "templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728", "templates/mod/cgid.conf.erb": "3d4e24001b50eb16561e45f5a8237b32", "templates/mod/dav_fs.conf.erb": "fdf1f8cff4708a282ef491d60868d1d7", "templates/mod/deflate.conf.erb": "44d54f557a5612be8da04c49dd6da862", "templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360", "templates/mod/disk_cache.conf.erb": "7d3e7a5ee3bd7b6a839924b06a60667f", "templates/mod/event.conf.erb": "dc4223dfb2729e54d4a33cdec03bd518", "templates/mod/fastcgi.conf.erb": "8692d14c4462335c845eede011f6db2f", "templates/mod/info.conf.erb": "bb48951beaeaf582d1a1023cb661ac32", "templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16", "templates/mod/ldap.conf.erb": "a8a33f645497e0dbcec363c98be43795", "templates/mod/mime.conf.erb": "8f953519790a5900369fb656054cae35", "templates/mod/mime_magic.conf.erb": "f910e66299cba6ead5f0444e522a0c76", "templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf", "templates/mod/negotiation.conf.erb": "47284b5580b986a6ba32580b6ffb9fd7", "templates/mod/nss.conf.erb": "9a9667d308f0783448ca2689b9fc2b93", "templates/mod/passenger.conf.erb": "68a350cf4cf037c2ae64f015cc7a61a3", "templates/mod/peruser.conf.erb": "ac1c2bf2a771ed366f688ec337d6da02", "templates/mod/php5.conf.erb": "49e2d214790835c141fcaf6d74b5a96d", "templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84", "templates/mod/proxy.conf.erb": "38668e1cb5a19d7708e9d26f99e21264", "templates/mod/proxy_html.conf.erb": "67546d56f2d6bb1860338257e3ac9d29", "templates/mod/reqtimeout.conf.erb": "81c51851ab7ee7942bef389dc7c0e985", "templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b", "templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28", "templates/mod/ssl.conf.erb": "907dc25931c6bdb7ce4b61a81be788f8", "templates/mod/status.conf.erb": "afb05015a8337b232127199aa085a023", "templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18", "templates/mod/userdir.conf.erb": "e5a7a7229dbf0de07bc034dd3d108ea2", "templates/mod/worker.conf.erb": "9661e7a59eaefb9f17d4c2680c0d243d", "templates/mod/wsgi.conf.erb": "125949c9120aee15303ad755e105d852", "templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae", "templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e", "templates/vhost/_aliases.erb": "e5e3ba8a9ce994334644bd19ad342d8b", "templates/vhost/_block.erb": "7cb56db9254729b54e8d30686c4f3b1a", "templates/vhost/_custom_fragment.erb": "67a4475275ec9208e6421b047b9ed7f4", "templates/vhost/_directories.erb": "eca2a0abc3a23d1e08b1132baeade372", "templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2", "templates/vhost/_fastcgi.erb": "e0a1702445e9be189dabe04b829acd7f", "templates/vhost/_itk.erb": "db5b12d7236dbc19b62ce13625d9d60e", "templates/vhost/_proxy.erb": "1f9cc42aaafb80a658294fc39cf61395", "templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18", "templates/vhost/_redirect.erb": "0e2eed04e30240fbbd6c4ef7db6b7058", "templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991", "templates/vhost/_rewrite.erb": "dcf423c014bdb222bcf15314a2f3a41f", "templates/vhost/_scriptalias.erb": "9c714277eaad73d05d073c1b6c62106a", "templates/vhost/_serveralias.erb": "2ef30c2152b9284463588f408f7f371f", "templates/vhost/_setenv.erb": "da6778b324857234c8441ef346d08969", "templates/vhost/_ssl.erb": "e9fca0c12325af10797b80d827dfddee", "templates/vhost/_suphp.erb": "6ea2553a4c4284d41b435fa2f4f4edc7", "templates/vhost/_wsgi.erb": "3bbab1e5757dfb584504f05354275f81", "templates/vhost.conf.erb": "5dc0337da18ff36184df07343982dc93", "tests/apache.pp": "819cf9116ffd349e6757e1926d11ca2f", "tests/dev.pp": "4cf15c1fecea3ca86009f182b402c7ab", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "tests/mod_load_params.pp": "5981af4d625a906fce1cedeb3f70cb90", "tests/mods.pp": "0085911ba562b7e56ad8d793099c9240", "tests/mods_custom.pp": "9afd068edce0538b5c55a3bc19f9c24a", "tests/php.pp": "60e7939034d531dd6b95af35338bcbe7", "tests/vhost.pp": "164bec943d7d5eee1ad6d6c41fe7c28e", "tests/vhost_directories.pp": "b79a3bcf72474ce4e3b75f6a70cbf272", "tests/vhost_ip_based.pp": "7d9f7b6976de7488ab6ff0a6e647fc73", "tests/vhost_ssl.pp": "9f3716bc15a9a6760f1d6cc3bf8ce8ac", "tests/vhosts_without_listen.pp": "a6692104056a56517b4365bcc816e7f4" } }, "tags": [ "apache", "web", "virtualhost", "httpd", "centos", "rhel", "debian", "ubuntu", "apache2", "ssl", "passenger", "wsgi", "proxy", "virtual_host" ], "file_uri": "/v3/files/puppetlabs-apache-0.10.0.tar.gz", "file_size": 85004, "file_md5": "4036f35903264c9b6e3289455cfee225", "downloads": 6389, "readme": "

apache

\n\n

\"Build

\n\n

Table of Contents

\n\n
    \n
  1. Overview - What is the Apache module?
  2. \n
  3. Module Description - What does the module do?
  4. \n
  5. Setup - The basics of getting started with Apache\n\n
  6. \n
  7. Usage - The classes, defined types, and their parameters available for configuration\n\n
  8. \n
  9. Implementation - An under-the-hood peek at what the module is doing\n\n
  10. \n
  11. Limitations - OS compatibility, etc.
  12. \n
  13. Development - Guide for contributing to the module
  14. \n
  15. Release Notes - Notes on the most recent updates to the module
  16. \n
\n\n

Overview

\n\n

The Apache module allows you to set up virtual hosts and manage web services with minimal effort.

\n\n

Module Description

\n\n

Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.

\n\n

Setup

\n\n

What Apache affects:

\n\n
    \n
  • configuration files and directories (created and written to)\n\n
      \n
    • NOTE: Configurations that are not managed by Puppet will be purged.
    • \n
  • \n
  • package/service/configuration files for Apache
  • \n
  • Apache modules
  • \n
  • virtual hosts
  • \n
  • listened-to ports
  • \n
  • /etc/make.conf on FreeBSD
  • \n
\n\n

Beginning with Apache

\n\n

To install Apache with the default parameters

\n\n
    class { 'apache':  }\n
\n\n

The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters

\n\n
    class { 'apache':\n      default_mods        => false,\n      default_confd_files => false,\n    }\n
\n\n

Configure a virtual host

\n\n

Declaring the apache class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving $apache::docroot.

\n\n
    class { 'apache': }\n
\n\n

To configure a very basic, name-based virtual host

\n\n
    apache::vhost { 'first.example.com':\n      port    => '80',\n      docroot => '/var/www/first',\n    }\n
\n\n

Note: The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.

\n\n

A slightly more complicated example, which moves the docroot owner/group

\n\n
    apache::vhost { 'second.example.com':\n      port          => '80',\n      docroot       => '/var/www/second',\n      docroot_owner => 'third',\n      docroot_group => 'third',\n    }\n
\n\n

To set up a virtual host with SSL and default SSL certificates

\n\n
    apache::vhost { 'ssl.example.com':\n      port    => '443',\n      docroot => '/var/www/ssl',\n      ssl     => true,\n    }\n
\n\n

To set up a virtual host with SSL and specific SSL certificates

\n\n
    apache::vhost { 'fourth.example.com':\n      port     => '443',\n      docroot  => '/var/www/fourth',\n      ssl      => true,\n      ssl_cert => '/etc/ssl/fourth.example.com.cert',\n      ssl_key  => '/etc/ssl/fourth.example.com.key',\n    }\n
\n\n

To set up a virtual host with IP address different than '*'

\n\n
    apache::vhost { 'subdomain.example.com':\n      ip      => '127.0.0.1',\n      port    => '80',\n      docrout => '/var/www/subdomain',\n    }\n
\n\n

To set up a virtual host with wildcard alias for subdomain mapped to same named directory\nhttp://examle.com.loc => /var/www/example.com

\n\n
    apache::vhost { 'subdomain.loc':\n      vhost_name => '*',\n      port       => '80',\n      virtual_docroot' => '/var/www/%-2+',\n      docroot          => '/var/www',\n      serveraliases    => ['*.loc',],\n    }\n
\n\n

To set up a virtual host with suPHP

\n\n
    apache::vhost { 'suphp.example.com':\n      port                => '80',\n      docroot             => '/home/appuser/myphpapp',\n      suphp_addhandler    => 'x-httpd-php',\n      suphp_engine        => 'on',\n      suphp_configpath    => '/etc/php5/apache2',\n      directories         => { path => '/home/appuser/myphpapp',\n        'suphp'           => { user => 'myappuser', group => 'myappgroup' },\n      }\n    }\n
\n\n

To set up a virtual host with WSGI

\n\n
    apache::vhost { 'wsgi.example.com':\n      port                        => '80',\n      docroot                     => '/var/www/pythonapp',\n      wsgi_daemon_process         => 'wsgi',\n      wsgi_daemon_process_options =>\n        { processes => '2', threads => '15', display-name => '%{GROUP}' },\n      wsgi_process_group          => 'wsgi',\n      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },\n    }\n
\n\n

Starting 2.2.16, httpd supports FallbackResource which is a simple replace for common RewriteRules:

\n\n
    apache::vhost { 'wordpress.example.com':\n      port                => '80',\n      docroot             => '/var/www/wordpress',\n      fallbackresource    => '/index.php',\n    }\n
\n\n

Please note that the disabled argument to FallbackResource is only supported since 2.2.24.

\n\n

To see a list of all virtual host parameters, please go here. To see an extensive list of virtual host examples please look here.

\n\n

Usage

\n\n

Classes and Defined Types

\n\n

This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.

\n\n

It is possible to temporarily disable full Puppet management by setting the purge_configs parameter within the base apache class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations.

\n\n

Class: apache

\n\n

The Apache module's primary class, apache, guides the basic setup of Apache on your system.

\n\n

You may establish a default vhost in this class, the vhost class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the vhost type.

\n\n

Parameters within apache:

\n\n
default_mods
\n\n

Sets up Apache with default settings based on your OS. Defaults to 'true', set to 'false' for customized configuration.

\n\n
default_vhost
\n\n

Sets up a default virtual host. Defaults to 'true', set to 'false' to set up customized virtual hosts.

\n\n
default_confd_files
\n\n

Generates default set of include-able apache configuration files under ${apache::confd_dir} directory. These configuration files correspond to what is usually installed with apache package on given platform.

\n\n
default_ssl_vhost
\n\n

Sets up a default SSL virtual host. Defaults to 'false'.

\n\n
    apache::vhost { 'default-ssl':\n      port            => 443,\n      ssl             => true,\n      docroot         => $docroot,\n      scriptalias     => $scriptalias,\n      serveradmin     => $serveradmin,\n      access_log_file => "ssl_${access_log_file}",\n      }\n
\n\n

SSL vhosts only respond to HTTPS queries.

\n\n
default_ssl_cert
\n\n

The default SSL certification, which is automatically set based on your operating system (/etc/pki/tls/certs/localhost.crt for RedHat, /etc/ssl/certs/ssl-cert-snakeoil.pem for Debian, /usr/local/etc/apache22/server.crt for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_key
\n\n

The default SSL key, which is automatically set based on your operating system (/etc/pki/tls/private/localhost.key for RedHat, /etc/ssl/private/ssl-cert-snakeoil.key for Debian, /usr/local/etc/apache22/server.key for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_chain
\n\n

The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_ca
\n\n

The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl_path
\n\n

The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
default_ssl_crl
\n\n

The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.

\n\n
service_name
\n\n

Name of apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.

\n\n
service_enable
\n\n

Determines whether the 'httpd' service is enabled when the machine is booted. Defaults to 'true'.

\n\n
service_ensure
\n\n

Determines whether the service should be running. Can be set to 'undef' which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to 'running'.

\n\n
purge_configs
\n\n

Removes all other apache configs and vhosts, which is automatically set to true. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise managed configuration. It is recommended that you move your configuration entirely to resources within this module.

\n\n
serveradmin
\n\n

Sets the server administrator. Defaults to 'root@localhost'.

\n\n
servername
\n\n

Sets the servername. Defaults to fqdn provided by facter.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat, /etc/apache2 on Debian and /usr/local on FreeBSD.

\n\n
sendfile
\n\n

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

\n\n
server_root
\n\n

A value to be set as ServerRoot in main configuration file (httpd.conf). Defaults to /etc/httpd on RedHat and /etc/apache2 on Debian.

\n\n
error_documents
\n\n

Enables custom error documents. Defaults to 'false'.

\n\n
httpd_dir
\n\n

Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.

\n\n
confd_dir
\n\n

Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.

\n\n
vhost_dir
\n\n

Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.

\n\n
mod_dir
\n\n

Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.

\n\n
mpm_module
\n\n

Configures which mpm module is loaded and configured for the httpd process by the apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork and apache::mod::worker classes. Must be set to false to explicitly declare apache::mod::event, apache::mod::itk, apache::mod::peruser, apache::mod::prefork or apache::mod::worker classes with parameters. All possible values are event, itk, peruser, prefork, worker (valid values depend on agent's OS), or the boolean false. Defaults to prefork on RedHat and FreeBSD and worker on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing $mpm_module one has to deinstall all packages that depend on currently installed apache.

\n\n
conf_template
\n\n

Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to 'apache/httpd.conf.erb'.

\n\n
keepalive
\n\n

Setting this allows you to enable persistent connections.

\n\n
keepalive_timeout
\n\n

Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.

\n\n
logroot
\n\n

Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.

\n\n
log_level
\n\n

Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are emerg, alert, crit, error, warn, notice, info or debug.

\n\n
ports_file
\n\n

Changes the name of the file containing Apache ports configuration. Default is ${conf_dir}/ports.conf.

\n\n
server_tokens
\n\n

Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'.

\n\n
server_signature
\n\n

Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'.

\n\n
trace_enable
\n\n

Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for 'TraceEnable'. Defaults to 'On'.

\n\n
manage_user
\n\n

Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.

\n\n
manage_group
\n\n

Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.

\n\n
package_ensure
\n\n

Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.

\n\n

Class: apache::default_mods

\n\n

Installs default Apache modules based on what OS you are running

\n\n
    class { 'apache::default_mods': }\n
\n\n

Defined Type: apache::mod

\n\n

Used to enable arbitrary Apache httpd modules for which there is no specific apache::mod::[name] class. The apache::mod defined type will also install the required packages to enable the module, if any.

\n\n
    apache::mod { 'rewrite': }\n    apache::mod { 'ldap': }\n
\n\n

Classes: apache::mod::[name]

\n\n

There are many apache::mod::[name] classes within this module that can be declared using include:

\n\n
    \n
  • alias
  • \n
  • auth_basic
  • \n
  • auth_kerb
  • \n
  • autoindex
  • \n
  • cache
  • \n
  • cgi
  • \n
  • cgid
  • \n
  • dav
  • \n
  • dav_fs
  • \n
  • dav_svn
  • \n
  • deflate
  • \n
  • dev
  • \n
  • dir*
  • \n
  • disk_cache
  • \n
  • event
  • \n
  • fastcgi
  • \n
  • fcgid
  • \n
  • headers
  • \n
  • info
  • \n
  • itk
  • \n
  • ldap
  • \n
  • mime
  • \n
  • mime_magic*
  • \n
  • mpm_event
  • \n
  • negotiation
  • \n
  • nss*
  • \n
  • passenger*
  • \n
  • perl
  • \n
  • peruser
  • \n
  • php (requires mpm_module set to prefork)
  • \n
  • prefork*
  • \n
  • proxy*
  • \n
  • proxy_ajp
  • \n
  • proxy_html
  • \n
  • proxy_http
  • \n
  • python
  • \n
  • reqtimeout
  • \n
  • rewrite
  • \n
  • rpaf*
  • \n
  • setenvif
  • \n
  • ssl* (see apache::mod::ssl below)
  • \n
  • status*
  • \n
  • suphp
  • \n
  • userdir*
  • \n
  • vhost_alias
  • \n
  • worker*
  • \n
  • wsgi (see apache::mod::wsgi below)
  • \n
  • xsendfile
  • \n
\n\n

Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.

\n\n

The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.

\n\n

Class: apache::mod::ssl

\n\n

Installs Apache SSL capabilities and utilizes ssl.conf.erb template. These are the defaults:

\n\n
    class { 'apache::mod::ssl':\n      ssl_compression => false,\n      ssl_options     => [ 'StdEnvVars' ],\n  }\n
\n\n

To use SSL with a virtual host, you must either set thedefault_ssl_vhost parameter in apache to 'true' or set the ssl parameter in apache::vhost to 'true'.

\n\n

Class: apache::mod::wsgi

\n\n
    class { 'apache::mod::wsgi':\n      wsgi_socket_prefix => "\\${APACHE_RUN_DIR}WSGI",\n      wsgi_python_home   => '/path/to/virtenv',\n      wsgi_python_path   => '/path/to/virtenv/site-packages',\n    }\n
\n\n

Defined Type: apache::vhost

\n\n

The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to vhost's setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.

\n\n

The vhost defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base apache class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

\n\n

If you have a series of specific configurations and do not want a base apache class default vhost, make sure to set the base class default host to 'false'.

\n\n
    class { 'apache':\n      default_vhost => false,\n    }\n
\n\n

Parameters within apache::vhost:

\n\n

The default values for each parameter will vary based on operating system and type of virtual host.

\n\n
access_log
\n\n

Specifies whether *_access.log directives should be configured. Valid values are 'true' and 'false'. Defaults to 'true'.

\n\n
access_log_file
\n\n

Points to the *_access.log file. Defaults to 'undef'.

\n\n
access_log_pipe
\n\n

Specifies a pipe to send access log messages to. Defaults to 'undef'.

\n\n
access_log_syslog
\n\n

Sends all access log messages to syslog. Defaults to 'undef'.

\n\n
access_log_format
\n\n

Specifies either a LogFormat nickname or custom format string for access log. Defaults to 'undef'.

\n\n
add_listen
\n\n

Determines whether the vhost creates a listen statement. The default value is 'true'.

\n\n

Setting add_listen to 'false' stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an ip parameter with vhosts that are passed the ip parameter.

\n\n
aliases
\n\n

Passes a list of hashes to the vhost to create Alias or AliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
aliases => [\n  { aliasmatch => '^/image/(.*)\\.jpg$', path => '/files/jpg.images/$1.jpg' }\n  { alias      => '/image',             path => '/ftp/pub/image' },\n],\n
\n\n

For Alias and AliasMatch to work, each will need a corresponding <Directory /path/to/directory> or <Location /path/to/directory> block. The Alias and AliasMatch directives are created in the order specified in the aliases paramter. As described in the mod_alias documentation more specific Alias or AliasMatch directives should come before the more general ones to avoid shadowing.

\n\n

Note: If apache::mod::passenger is loaded and PassengerHighPerformance true is set, then Alias may have issues honouring the PassengerEnabled off statement. See this article for details.

\n\n
block
\n\n

Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories. To add to this, please see the Development section.

\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the vhost configuration.

\n\n
default_vhost
\n\n

Sets a given apache::vhost as the default to serve requests that do not match any other apache::vhost definitions. The default value is 'false'.

\n\n
directories
\n\n

Passes a list of hashes to the vhost to create <Directory /path/to/directory>...</Directory> directive blocks as per the Apache core documentation. The path key is required in these hashes. An optional provider defaults to directory. Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', <directive> => <value> },\n        { path => '/path/to/another/directory', <directive> => <value> },\n      ],\n    }\n
\n\n

Note: At least one directory should match docroot parameter, once you start declaring directories apache::vhost assumes that all required <Directory> blocks will be declared.

\n\n

Note: If not defined a single default <Directory> block will be created that matches the docroot parameter.

\n\n

provider can be set to any of directory, files, or location. If the pathspec starts with a ~, httpd will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch, respectively.

\n\n
    apache::vhost { 'files.example.net':\n      docroot     => '/var/www/files',\n      directories => [\n        { path => '~ (\\.swp|\\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },\n      ],\n    }\n
\n\n

The directives will be embedded within the Directory (Files, or Location) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:

\n\n
addhandlers
\n\n

Sets AddHandler directives as per the Apache Core documentation. Accepts a list of hashes of the form { handler => 'handler-name', extensions => ['extension']}. Note that extensions is a list of extenstions being handled by the handler.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory',\n        addhandlers => [ { handler => 'cgi-script', extensions => ['.cgi']} ],\n      } ],\n    }\n
\n\n
allow
\n\n

Sets an Allow directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow => 'from example.org' } ],\n    }\n
\n\n
allow_override
\n\n

Sets the usage of .htaccess files as per the Apache core documentation. Should accept in the form of a list or a string. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'] } ],\n    }\n
\n\n
deny
\n\n

Sets an Deny directive as per the Apache Core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', deny => 'from example.org' } ],\n    }\n
\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this directory. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      directories => [ { path => '/srv/www'\n        error_documents => [\n          { 'error_code' => '503', 'document' => '/service-unavail' },\n        ],\n      }]\n    }\n
\n\n
headers
\n\n

Adds lines for Header directives as per the Apache Header documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => {\n        path    => '/path/to/directory',\n        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',\n      },\n    }\n
\n\n
options
\n\n

Lists the options for the given <Directory> block

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'] }],\n    }\n
\n\n
index_options
\n\n

Styles the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],\n    }\n
\n\n
index_order_default
\n\n

Sets the order of the list

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],\n    }\n
\n\n
order
\n\n

Sets the order of processing Allow and Deny statements as per Apache core documentation. An example:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', order => 'Allow,Deny' } ],\n    }\n
\n\n
auth_type
\n\n

Sets the value for AuthType as per the Apache AuthType\ndocumentation.

\n\n
auth_name
\n\n

Sets the value for AuthName as per the Apache AuthName\ndocumentation.

\n\n
auth_digest_algorithm
\n\n

Sets the value for AuthDigestAlgorithm as per the Apache\nAuthDigestAlgorithm\ndocumentation

\n\n
auth_digest_domain
\n\n

Sets the value for AuthDigestDomain as per the Apache AuthDigestDomain\ndocumentation.

\n\n
auth_digest_nonce_lifetime
\n\n

Sets the value for AuthDigestNonceLifetime as per the Apache\nAuthDigestNonceLifetime\ndocumentation

\n\n
auth_digest_provider
\n\n

Sets the value for AuthDigestProvider as per the Apache AuthDigestProvider\ndocumentation.

\n\n
auth_digest_qop
\n\n

Sets the value for AuthDigestQop as per the Apache AuthDigestQop\ndocumentation.

\n\n
auth_digest_shmem_size
\n\n

Sets the value for AuthAuthDigestShmemSize as per the Apache AuthDigestShmemSize\ndocumentation.

\n\n
auth_basic_authoritative
\n\n

Sets the value for AuthBasicAuthoritative as per the Apache\nAuthBasicAuthoritative\ndocumentation.

\n\n
auth_basic_fake
\n\n

Sets the value for AuthBasicFake as per the Apache AuthBasicFake\ndocumentation.

\n\n
auth_basic_provider
\n\n

Sets the value for AuthBasicProvider as per the Apache AuthBasicProvider\ndocumentation.

\n\n
auth_user_file
\n\n

Sets the value for AuthUserFile as per the Apache AuthUserFile\ndocumentation.

\n\n
auth_require
\n\n

Sets the value for AuthName as per the Apache Require\ndocumentation

\n\n
passenger_enabled
\n\n

Sets the value for the PassengerEnabled directory to on or off as per the Passenger documentation.

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      directories => [ { path => '/path/to/directory', passenger_enabled => 'off' } ],\n    }\n
\n\n

Note: This directive requires apache::mod::passenger to be active, Apache may not start with an unrecognised directive without it.

\n\n

Note: Be aware that there is an issue using the PassengerEnabled directive with the PassengerHighPerformance directive.

\n\n
ssl_options
\n\n

String or list of SSLOptions for the given <Directory> block. This overrides, or refines the SSLOptions of the parent block (either vhost, or server).

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', ssl_options => '+ExportCertData' }\n        { path => '/path/to/different/dir', ssl_options => [ '-StdEnvVars', '+ExportCertData'] },\n      ],\n    }\n
\n\n
suphp
\n\n

An array containing two values: User and group for the suPHP_UserGroup setting.\nThis directive must be used with suphp_engine => on in the vhost declaration. This directive only works in <Directory> or <Location>.

\n\n
    apache::vhost { 'secure.example.net':\n      docroot     => '/path/to/directory',\n      directories => [\n        { path => '/path/to/directory', suphp => { user =>  'myappuser', group => 'myappgroup' }\n      ],\n    }\n
\n\n
custom_fragment
\n\n

Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.

\n\n
directoryindex
\n\n

Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..

\n\n
docroot
\n\n

Provides the DocumentRoot directive, identifying the directory Apache serves files from.

\n\n
docroot_group
\n\n

Sets group access to the docroot directory. Defaults to 'root'.

\n\n
docroot_owner
\n\n

Sets individual user access to the docroot directory. Defaults to 'root'.

\n\n
error_log
\n\n

Specifies whether *_error.log directives should be configured. Defaults to 'true'.

\n\n
error_log_file
\n\n

Points to the *_error.log file. Defaults to 'undef'.

\n\n
error_log_pipe
\n\n

Specifies a pipe to send error log messages to. Defaults to 'undef'.

\n\n
error_log_syslog
\n\n

Sends all error log messages to syslog. Defaults to 'undef'.

\n\n
error_documents
\n\n

A list of hashes which can be used to override the ErrorDocument settings for this vhost. Defaults to []. Example:

\n\n
    apache::vhost { 'sample.example.net':\n      error_documents => [\n        { 'error_code' => '503', 'document' => '/service-unavail' },\n        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },\n      ],\n    }\n
\n\n
ensure
\n\n

Specifies if the vhost file is present or absent.

\n\n
fastcgi_server
\n\n

Specifies the filename as an external FastCGI application. Defaults to 'undef'.

\n\n
fastcgi_socket
\n\n

Filename used to communicate with the web server. Defaults to 'undef'.

\n\n
fastcgi_dir
\n\n

Directory to enable for FastCGI. Defaults to 'undef'.

\n\n
additional_includes
\n\n

Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.

\n\n
ip
\n\n

The IP address the vhost listens on. Defaults to 'undef'.

\n\n
ip_based
\n\n

Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.

\n\n
logroot
\n\n

Specifies the location of the virtual host's logfiles. Defaults to /var/log/<apache log location>/.

\n\n
log_level
\n\n

Specifies the verbosity level of the error log. Defaults to warn for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for log_level is one of emerg, alert, crit, error, warn, notice, info or debug.

\n\n
no_proxy_uris
\n\n

Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with proxy_dest.

\n\n
options
\n\n

Lists the options for the given virtual host

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      options => ['Indexes','FollowSymLinks','MultiViews'],\n    }\n
\n\n
override
\n\n

Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.

\n\n
port
\n\n

Sets the port the host is configured on.

\n\n
priority
\n\n

Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to '25'.

\n\n

If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.

\n\n

Note: You should not need to use this parameter. However, if you do use it, be aware that the default_vhost parameter for apache::vhost passes a priority of '15'.

\n\n
proxy_dest
\n\n

Specifies the destination address of a proxypass configuration. Defaults to 'undef'.

\n\n
proxy_pass
\n\n

Specifies an array of path => uri for a proxypass configuration. Defaults to 'undef'.

\n\n

Example:

\n\n
$proxy_pass = [\n  { 'path' => '/a', 'url' => 'http://backend-a/' },\n  { 'path' => '/b', 'url' => 'http://backend-b/' },\n  { 'path' => '/c', 'url' => 'http://backend-a/c' }\n]\n\napache::vhost { 'site.name.fdqn':\n  …\n  proxy_pass       => $proxy_pass,\n}\n
\n\n
rack_base_uris
\n\n

Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the _rack.erb template. Defaults to 'undef'.

\n\n
redirect_dest
\n\n

Specifies the address to redirect to. Defaults to 'undef'.

\n\n
redirect_source
\n\n

Specifies the source items? that will redirect to the destination specified in redirect_dest. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_source => ['/images','/downloads'],\n      redirect_dest => ['http://img.example.com/','http://downloads.example.com/'],\n    }\n
\n\n
redirect_status
\n\n

Specifies the status to append to the redirect. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      redirect_status => ['temp','permanent'],\n    }\n
\n\n
request_headers
\n\n

Specifies additional request headers.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      request_headers => [\n        'append MirrorID "mirror 12"',\n        'unset MirrorID',\n      ],\n    }\n
\n\n
rewrite_base
\n\n

Limits the rewrite_rule to the specified base URL. Defaults to 'undef'.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n      rewrite_base => '/blog/',\n    }\n
\n\n

The above example would limit the index.html -> welcome.html rewrite to only something inside of http://example.com/blog/.

\n\n
rewrite_cond
\n\n

Rewrites a URL via rewrite_rule based on the truth of specified conditions. For example

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_cond => '%{HTTP_USER_AGENT} ^MSIE',\n    }\n
\n\n

will rewrite URLs only if the visitor is using IE. Defaults to 'undef'.

\n\n

Note: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple rewrite_cond and rewrite_rules per vhost, so that different conditions get different rewrites.

\n\n
rewrite_rule
\n\n

Creates URL rewrite rules. Defaults to 'undef'. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.

\n\n
    apache::vhost { 'site.name.fdqn':\n      …\n      rewrite_rule => '^index\\.html$ welcome.html',\n    }\n
\n\n
scriptalias
\n\n

Defines a directory of CGI scripts to be aliased to the path '/cgi-bin'

\n\n
scriptaliases
\n\n

Passes a list of hashes to the vhost to create ScriptAlias or ScriptAliasMatch statements as per the mod_alias documentation. Each hash is expected to be of the form:

\n\n
    scriptaliases => [\n      {\n        alias => '/myscript',\n        path  => '/usr/share/myscript',\n      },\n      {\n        aliasmatch => '^/foo(.*)',\n        path       => '/usr/share/fooscripts$1',\n      },\n      {\n        aliasmatch => '^/bar/(.*)',\n        path       => '/usr/share/bar/wrapper.sh/$1',\n      },\n      {\n        alias => '/neatscript',\n        path  => '/usr/share/neatscript',\n      },\n    ]\n
\n\n

These directives are created in the order specified. As with Alias and AliasMatch directives the more specific aliases should come before the more general ones to avoid shadowing.

\n\n
serveradmin
\n\n

Specifies the email address Apache will display when it renders one of its error pages.

\n\n
serveraliases
\n\n

Sets the server aliases of the site.

\n\n
servername
\n\n

Sets the primary name of the virtual host.

\n\n
setenv
\n\n

Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.

\n\n
setenvif
\n\n

Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.

\n\n
ssl
\n\n

Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'.

\n\n
ssl_ca
\n\n

Specifies the certificate authority.

\n\n
ssl_cert
\n\n

Specifies the SSL certification.

\n\n
ssl_protocol
\n\n

Specifies the SSL Protocol (SSLProtocol).

\n\n
ssl_cipher
\n\n

Specifies the SSLCipherSuite.

\n\n
ssl_honorcipherorder
\n\n

Sets SSLHonorCipherOrder directive, used to prefer the server's cipher preference order

\n\n
ssl_certs_dir
\n\n

Specifies the location of the SSL certification directory. Defaults to /etc/ssl/certs on Debian and /etc/pki/tls/certs on RedHat.

\n\n
ssl_chain
\n\n

Specifies the SSL chain.

\n\n
ssl_crl
\n\n

Specifies the certificate revocation list to use.

\n\n
ssl_crl_path
\n\n

Specifies the location of the certificate revocation list.

\n\n
ssl_key
\n\n

Specifies the SSL key.

\n\n
ssl_verify_client
\n\n

Sets SSLVerifyClient directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_client => 'optional',\n    }\n
\n\n
ssl_verify_depth
\n\n

Sets SSLVerifyDepth directives as per the Apache Core documentation. Defaults to undef.\nAn example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_verify_depth => 1,\n    }\n
\n\n
ssl_options
\n\n

Sets SSLOptions directives as per the Apache Core documentation. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => '+ExportCertData',\n    }\n
\n\n

An array of strings example:

\n\n
    apache::vhost { 'sample.example.net':\n      …\n      ssl_options => [ '+StrictRequire', '+ExportCertData' ],\n    }\n
\n\n
ssl_proxyengine
\n\n

Specifies whether to use SSLProxyEngine or not. Defaults to false.

\n\n
vhost_name
\n\n

This parameter is for use with name-based virtual hosting. Defaults to '*'.

\n\n
itk
\n\n

Hash containing infos to configure itk as per the ITK documentation.

\n\n

Keys could be:

\n\n
    \n
  • user + group
  • \n
  • assignuseridexpr
  • \n
  • assigngroupidexpr
  • \n
  • maxclientvhost
  • \n
  • nice
  • \n
  • limituidrange (Linux 3.5.0 or newer)
  • \n
  • limitgidrange (Linux 3.5.0 or newer)
  • \n
\n\n

Usage will typically look like:

\n\n
    apache::vhost { 'sample.example.net':\n      docroot     => '/path/to/directory',\n      itk => {\n        user  => 'someuser',\n        group => 'somegroup',\n      },\n    }\n
\n\n

Virtual Host Examples

\n\n

The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the Tests section for even more examples.

\n\n

Configure a vhost with a server administrator

\n\n
    apache::vhost { 'third.example.com':\n      port        => '80',\n      docroot     => '/var/www/third',\n      serveradmin => 'admin@example.com',\n    }\n
\n\n
\n\n

Set up a vhost with aliased servers

\n\n
    apache::vhost { 'sixth.example.com':\n      serveraliases => [\n        'sixth.example.org',\n        'sixth.example.net',\n      ],\n      port          => '80',\n      docroot       => '/var/www/fifth',\n    }\n
\n\n
\n\n

Configure a vhost with a cgi-bin

\n\n
    apache::vhost { 'eleventh.example.com':\n      port        => '80',\n      docroot     => '/var/www/eleventh',\n      scriptalias => '/usr/lib/cgi-bin',\n    }\n
\n\n
\n\n

Set up a vhost with a rack configuration

\n\n
    apache::vhost { 'fifteenth.example.com':\n      port           => '80',\n      docroot        => '/var/www/fifteenth',\n      rack_base_uris => ['/rackapp1', '/rackapp2'],\n    }\n
\n\n
\n\n

Set up a mix of SSL and non-SSL vhosts at the same domain

\n\n
    #The non-ssl vhost\n    apache::vhost { 'first.example.com non-ssl':\n      servername => 'first.example.com',\n      port       => '80',\n      docroot    => '/var/www/first',\n    }\n\n    #The SSL vhost at the same domain\n    apache::vhost { 'first.example.com ssl':\n      servername => 'first.example.com',\n      port       => '443',\n      docroot    => '/var/www/first',\n      ssl        => true,\n    }\n
\n\n
\n\n

Configure a vhost to redirect non-SSL connections to SSL

\n\n
    apache::vhost { 'sixteenth.example.com non-ssl':\n      servername      => 'sixteenth.example.com',\n      port            => '80',\n      docroot         => '/var/www/sixteenth',\n      redirect_status => 'permanent'\n      redirect_dest   => 'https://sixteenth.example.com/'\n    }\n    apache::vhost { 'sixteenth.example.com ssl':\n      servername => 'sixteenth.example.com',\n      port       => '443',\n      docroot    => '/var/www/sixteenth',\n      ssl        => true,\n    }\n
\n\n
\n\n

Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.

\n\n
    apache::listen { '80': }\n    apache::listen { '81': }\n
\n\n

Then we will set up the IP-based vhosts

\n\n
    apache::vhost { 'first.example.com':\n      ip       => '10.0.0.10',\n      docroot  => '/var/www/first',\n      ip_based => true,\n    }\n    apache::vhost { 'second.example.com':\n      ip       => '10.0.0.11',\n      docroot  => '/var/www/second',\n      ip_based => true,\n    }\n
\n\n
\n\n

Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL

\n\n
    apache::vhost { 'The first IP-based vhost, non-ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '80',\n      ip_based   => true,\n      docroot    => '/var/www/first',\n    }\n    apache::vhost { 'The first IP-based vhost, ssl':\n      servername => 'first.example.com',\n      ip         => '10.0.0.10',\n      port       => '443',\n      ip_based   => true,\n      docroot    => '/var/www/first-ssl',\n      ssl        => true,\n    }\n
\n\n

Then, we will add two name-based vhosts listening on 10.0.0.20

\n\n
    apache::vhost { 'second.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/second',\n    }\n    apache::vhost { 'third.example.com':\n      ip      => '10.0.0.20',\n      port    => '80',\n      docroot => '/var/www/third',\n    }\n
\n\n

If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you MUST declare add_listen => 'false' to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.

\n\n
    apache::vhost { 'fourth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fourth',\n      add_listen => false,\n    }\n    apache::vhost { 'fifth.example.com':\n      port       => '80',\n      docroot    => '/var/www/fifth',\n      add_listen => false,\n    }\n
\n\n

Implementation

\n\n

Classes and Defined Types

\n\n

Class: apache::dev

\n\n

Installs Apache development libraries

\n\n
    class { 'apache::dev': }\n
\n\n

On FreeBSD you're required to define apache::package or apache class before apache::dev.

\n\n

Defined Type: apache::listen

\n\n

Controls which ports Apache binds to for listening based on the title:

\n\n
    apache::listen { '80': }\n    apache::listen { '443': }\n
\n\n

Declaring this defined type will add all Listen directives to the ports.conf file in the Apache httpd configuration directory. apache::listen titles should always take the form of: <port>, <ipv4>:<port>, or [<ipv6>]:<port>

\n\n

Apache httpd requires that Listen directives must be added for every port. The apache::vhost defined type will automatically add Listen directives unless the apache::vhost is passed add_listen => false.

\n\n

Defined Type: apache::namevirtualhost

\n\n

Enables named-based hosting of a virtual host

\n\n
    class { 'apache::namevirtualhost`: }\n
\n\n

Declaring this defined type will add all NameVirtualHost directives to the ports.conf file in the Apache https configuration directory. apache::namevirtualhost titles should always take the form of: *, *:<port>, _default_:<port>, <ip>, or <ip>:<port>.

\n\n

Defined Type: apache::balancermember

\n\n

Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.

\n\n

On every app server you can export a balancermember like this:

\n\n
      @@apache::balancermember { "${::fqdn}-puppet00":\n        balancer_cluster => 'puppet00',\n        url              => "ajp://${::fqdn}:8009"\n        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n      }\n
\n\n

And on the proxy itself you create the balancer cluster using the defined type apache::balancer:

\n\n
      apache::balancer { 'puppet00': }\n
\n\n

If you need to use ProxySet in the balncer config you can do as so:

\n\n
      apache::balancer { 'puppet01':\n        proxy_set => {'stickysession' => 'JSESSIONID'},\n      }\n
\n\n

Templates

\n\n

The Apache module relies heavily on templates to enable the vhost and apache::mod defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.

\n\n

Limitations

\n\n

This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.

\n\n

Development

\n\n

Overview

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Running tests

\n\n

This project contains tests for both rspec-puppet and rspec-system to verify functionality. For in-depth information please see their respective documentation.

\n\n

Quickstart:

\n\n
gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n
\n\n

Copyright and License

\n\n

Copyright (C) 2012 Puppet Labs Inc

\n\n

Puppet Labs can be contacted at: info@puppetlabs.com

\n\n

Licensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.

\n
", "changelog": "

2013-12-05 Release 0.10.0

\n\n

Summary:

\n\n

This release adds FreeBSD osfamily support and various other improvements to some mods.

\n\n

Features:

\n\n
    \n
  • Add suPHP_UserGroup directive to directory context
  • \n
  • Add support for ScriptAliasMatch directives
  • \n
  • Set SSLOptions StdEnvVars in server context
  • \n
  • No implicit entry for ScriptAlias path
  • \n
  • Add support for overriding ErrorDocument
  • \n
  • Add support for AliasMatch directives
  • \n
  • Disable default "allow from all" in vhost-directories
  • \n
  • Add WSGIPythonPath as an optional parameter to mod_wsgi.
  • \n
  • Add mod_rpaf support
  • \n
  • Add directives: IndexOptions, IndexOrderDefault
  • \n
  • Add ability to include additional external configurations in vhost
  • \n
  • need to use the provider variable not the provider key value from the directory hash for matches
  • \n
  • Support for FreeBSD and few other features
  • \n
  • Add new params to apache::mod::mime class
  • \n
  • Allow apache::mod to specify module id and path
  • \n
  • added $server_root parameter
  • \n
  • Add Allow and ExtendedStatus support to mod_status
  • \n
  • Expand vhost/_directories.pp directive support
  • \n
  • Add initial support for nss module (no directives in vhost template yet)
  • \n
  • added peruser and event mpms
  • \n
  • added $service_name parameter
  • \n
  • add parameter for TraceEnable
  • \n
  • Make LogLevel configurable for server and vhost
  • \n
  • Add documentation about $ip
  • \n
  • Add ability to pass ip (instead of wildcard) in default vhost files
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Don't listen on port or set NameVirtualHost for non-existent vhost
  • \n
  • only apply Directory defaults when provider is a directory
  • \n
  • Working mod_authnz_ldap support on Debian/Ubuntu
  • \n
\n\n

2013-09-06 Release 0.9.0

\n\n

Summary:

\n\n

This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.

\n\n

Backwards-incompatible Changes:

\n\n
    \n
  • Remove many default mods that are not normally needed.
  • \n
  • Remove rewrite_base apache::vhost parameter; did not work anyway.
  • \n
  • Specify dependencies on stdlib >=2.4.0 (this was already the case, but\nmaking explicit)
  • \n
  • Deprecate a2mod in favor of the apache::mod::* classes and apache::mod\ndefined resource.
  • \n
\n\n

Features:

\n\n
    \n
  • apache class\n\n
      \n
    • Add httpd_dir parameter to change the location of the configuration\nfiles.
    • \n
    • Add logroot parameter to change the logroot
    • \n
    • Add ports_file parameter to changes the ports.conf file location
    • \n
    • Add keepalive parameter to enable persistent connections
    • \n
    • Add keepalive_timeout parameter to change the timeout
    • \n
    • Update default_mods to be able to take an array of mods to enable.
    • \n
  • \n
  • apache::vhost\n\n
      \n
    • Add wsgi_daemon_process, wsgi_daemon_process_options,\nwsgi_process_group, and wsgi_script_aliases parameters for per-vhost\nWSGI configuration.
    • \n
    • Add access_log_syslog parameter to enable syslogging.
    • \n
    • Add error_log_syslog parameter to enable syslogging of errors.
    • \n
    • Add directories hash parameter. Please see README for documentation.
    • \n
    • Add sslproxyengine parameter to enable SSLProxyEngine
    • \n
    • Add suphp_addhandler, suphp_engine, and suphp_configpath for\nconfiguring SuPHP.
    • \n
    • Add custom_fragment parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)
    • \n
  • \n
  • Add apache::mod::suphp class for configuring SuPHP.
  • \n
  • Add apache::mod::itk class for configuring ITK mpm module.
  • \n
  • Update apache::mod::wsgi class for global WSGI configuration with\nwsgi_socket_prefix and wsgi_python_home parameters.
  • \n
  • Add README.passenger.md to document the apache::mod::passenger usage.\nAdded passenger_high_performance, passenger_pool_idle_time,\npassenger_max_requests, passenger_stat_throttle_rate, rack_autodetect,\nand rails_autodetect parameters.
  • \n
  • Separate the httpd service resource into a new apache::service class for\ndependency chaining of Class['apache'] -> <resource> ~>\nClass['apache::service']
  • \n
  • Added apache::mod::proxy_balancer class for apache::balancer
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Change dependency to puppetlabs-concat
  • \n
  • Fix ruby 1.9 bug for a2mod
  • \n
  • Change servername to be $::hostname if there is no $::fqdn
  • \n
  • Make /etc/ssl/certs the default ssl certs directory for RedHat non-5.
  • \n
  • Make php the default php package for RedHat non-5.
  • \n
  • Made aliases able to take a single alias hash instead of requiring an\narray.
  • \n
\n\n

2013-07-26 Release 0.8.1

\n\n

Bugfixes:

\n\n
    \n
  • Update apache::mpm_module detection for worker/prefork
  • \n
  • Update apache::mod::cgi and apache::mod::cgid detection for\nworker/prefork
  • \n
\n\n

2013-07-16 Release 0.8.0

\n\n

Features:

\n\n
    \n
  • Add servername parameter to apache class
  • \n
  • Add proxy_set parameter to apache::balancer define
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix ordering for multiple apache::balancer clusters
  • \n
  • Fix symlinking for sites-available on Debian-based OSs
  • \n
  • Fix dependency ordering for recursive confdir management
  • \n
  • Fix apache::mod::* to notify the service on config change
  • \n
  • Documentation updates
  • \n
\n\n

2013-07-09 Release 0.7.0

\n\n

Changes:

\n\n
    \n
  • Essentially rewrite the module -- too many to list
  • \n
  • apache::vhost has many abilities -- see README.md for details
  • \n
  • apache::mod::* classes provide httpd mod-loading capabilities
  • \n
  • apache base class is much more configurable
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Many. And many more to come
  • \n
\n\n

2013-03-2 Release 0.6.0

\n\n
    \n
  • update travis tests (add more supported versions)
  • \n
  • add access log_parameter
  • \n
  • make purging of vhost dir configurable
  • \n
\n\n

2012-08-24 Release 0.4.0

\n\n

Changes:

\n\n
    \n
  • include apache is now required when using apache::mod::*
  • \n
\n\n

Bugfixes:

\n\n
    \n
  • Fix syntax for validate_re
  • \n
  • Fix formatting in vhost template
  • \n
  • Fix spec tests such that they pass

    \n\n

    2012-05-08 Puppet Labs info@puppetlabs.com - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name => path for file resources in order to name namevar by it's name\n72e13de One end too much\n0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package['httpd']\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache

  • \n
\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-12-05 15:29:14 -0800", "updated_at": "2013-12-05 15:29:14 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-apache-0.10.0", "version": "0.10.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.9.0", "version": "0.9.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.1", "version": "0.8.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.8.0", "version": "0.8.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.5.0-rc1", "version": "0.5.0-rc1" }, { "uri": "/v3/releases/puppetlabs-apache-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.2", "version": "0.2.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.1", "version": "0.2.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-apache-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/puppetlabs-apache-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-apache", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/example42-apache", "name": "apache", "downloads": 15310, "created_at": "2012-11-29 14:24:36 -0800", "updated_at": "2014-01-06 14:42:02 -0800", "owner": { "uri": "/v3/users/example42", "username": "example42", "gravatar_id": "3b9afc574837c445c9550f035135f043" }, "current_release": { "uri": "/v3/releases/example42-apache-2.1.4", "module": { "uri": "/v3/modules/example42-apache", "name": "apache", "owner": { "uri": "/v3/users/example42", "username": "example42", "gravatar_id": "3b9afc574837c445c9550f035135f043" } }, "version": "2.1.4", "metadata": { "name": "example42-apache", "version": "2.1.4", "summary": "Puppet module for apache", "author": "Alessandro Franceschi", "description": "This module installs and manages apache. Check README.rdoc for details. Puppi is required for some common functions: you can install them without using the whole module. Monitor and firewall dependencies are needed only if the relevant features are enabled", "dependencies": [ { "name": "example42/puppi", "version_requirement": ">=2.0.0" } ], "types": [ ], "checksums": { "LICENSE": "a300b604c66de62cf6e923cca89c9d83", "Modulefile": "3a560e8abafc3225a4a59f4fc2c92273", "README.md": "4d46ca4ccc6be10389e16cc6158aaf25", "Rakefile": "beb946c8ed36b603d578cc9ca17ca85d", "manifests/dotconf.pp": "3766876f90642cf23542c14172c9934e", "manifests/htpasswd.pp": "76b702b2fd5bd2d6a7a57df21acdac43", "manifests/init.pp": "e04bb34fdf3d41590f87b9c91bd2bcf7", "manifests/listen.pp": "b2e74f8aa59829c0644b836a8d0e4c2d", "manifests/module.pp": "e7e613c3377c2ee41c97db2c65f4ef75", "manifests/params.pp": "00873cbf282865f395fefb8886bd0cff", "manifests/passenger.pp": "471b18ed8769eb16b1fbeb955e3d28c9", "manifests/redhat.pp": "7bf95178474b51eb75a37931e4ec4d2f", "manifests/spec.pp": "27b6dcd653caef771ac053e2df3260e9", "manifests/ssl.pp": "7a2feb658749e0cb8414893da77565f1", "manifests/vhost.pp": "7afa69f57980954d15c29045697e86a6", "manifests/virtualhost.pp": "8d80b67c616560209728af7e13f2f45a", "spec/classes/apache_spec.rb": "be017aef73f77caf172cd09059b2db36", "spec/defines/apache_virtualhost_spec.rb": "b21d44a66c262561f3db5dc063813f7a", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "templates/00-NameVirtualHost.conf.erb": "a410a82e9c65d36c7537bfb36a7a3041", "templates/listen.conf.erb": "47fe4e9a45f066ac5bd9cbbfe1fd0bd2", "templates/module/proxy.conf.erb": "2eccd5a67ff4070bdd6ed8cd98b4bbda", "templates/spec.erb": "055d4f22a02a677753cf922108b6e50c", "templates/virtualhost/vhost.conf.erb": "04b9a899577081c8ea9957a3db53c45b", "templates/virtualhost/virtualhost.conf.erb": "a6f72c70e83bec34a85071b9bbef3b3d", "tests/vhost.pp": "a2ee77862630ba4f7e0fdfb10a8dca79" }, "source": "https://github.com/example42/puppet-apache", "project_page": "http://www.example42.com", "license": "Apache2" }, "tags": [ "example42,", "apache" ], "file_uri": "/v3/files/example42-apache-2.1.4.tar.gz", "file_size": 16837, "file_md5": "2b5a31ead952c59727f13dc5b12b15f8", "downloads": 1249, "readme": "

Puppet module: apache

\n\n

This is a Puppet apache module from the second generation of Example42 Puppet Modules.

\n\n

Made by Alessandro Franceschi / Lab42

\n\n

Official site: http://www.example42.com

\n\n

Official git repository: http://github.com/example42/puppet-apache

\n\n

Released under the terms of Apache 2 License.

\n\n

This module requires functions provided by the Example42 Puppi module.

\n\n

For detailed info about the logic and usage patterns of Example42 modules read README.usage on Example42 main modules set.

\n\n

USAGE - Module specific usage

\n\n
    \n
  • Install apache with a custom httpd.conf template and some virtual hosts

    \n\n
     class { 'apache':\n   template => 'example42/apache/httpd.conf.erb',\n }\n\n apache::vhost { 'mysite':\n   docroot  => '/path/to/docroot',\n   template => 'example42/apache/vhost/mysite.com.erb',\n }\n
  • \n
  • Install mod ssl

    \n\n
    include apache::ssl\n
  • \n
  • Manage basic auth users (Here user joe is created with the $crypt_password on the defined htpasswd_file

    \n\n
    apache::htpasswd { 'joe':\n  crypt_password => 'B5dPQYYjf.jjA',\n  htpasswd_file  => '/etc/httpd/users.passwd',\n}\n
  • \n
  • Manage custom configuration files (created in conf.d, source or content can be defined)

    \n\n
    apache::dotconf { 'trac':\n  content => 'template("site/trac/apache.conf.erb")'\n}\n
  • \n
  • Add other listening ports (a relevant NameVirtualHost directive is automatically created)

    \n\n
    apache::listen { '8080': }\n
  • \n
  • Add other listening ports without creating a relevant NameVirtualHost directive

    \n\n
    apache::listen { '8080':\n  $namevirtualhost = false,\n}\n
  • \n
  • Add an apache module and manage its configuraton

    \n\n
    apache::module { 'proxy':\n  templatefile => 'site/apache/module/proxy.conf.erb',\n}\n
  • \n
  • Install mod passenger

    \n\n
    include apache::passenger\n
  • \n
\n\n

USAGE - Basic management

\n\n
    \n
  • Install apache with default settings

    \n\n
    class { "apache": }\n
  • \n
  • Disable apache service.

    \n\n
    class { "apache":\n  disable => true\n}\n
  • \n
  • Disable apache service at boot time, but don't stop if is running.

    \n\n
    class { "apache":\n  disableboot => true\n}\n
  • \n
  • Remove apache package

    \n\n
    class { "apache":\n  absent => true\n}\n
  • \n
  • Enable auditing without making changes on existing apache configuration files

    \n\n
    class { "apache":\n  audit_only => true\n}\n
  • \n
  • Install apache with a specific version

    \n\n
    class { "apache":\n  version =>  '2.2.22'\n}\n
  • \n
\n\n

USAGE - Default server management

\n\n
    \n
  • Simple way to manage default apache configuration

    \n\n
    apache::vhost { 'default':\n    docroot             => '/var/www/document_root',\n    server_name         => false,\n    priority            => '',\n    template            => 'apache/virtualhost/vhost.conf.erb',\n}\n
  • \n
  • Using a source file to create the vhost

    \n\n
    apache::vhost { 'default':\n    source      => 'puppet:///files/web/default.conf'\n    template    => '',\n}\n
  • \n
\n\n

USAGE - Overrides and Customizations

\n\n
    \n
  • Use custom sources for main config file

    \n\n
    class { "apache":\n  source => [ "puppet:///modules/lab42/apache/apache.conf-${hostname}" , "puppet:///modules/lab42/apache/apache.conf" ],\n}\n
  • \n
  • Use custom source directory for the whole configuration dir

    \n\n
    class { "apache":\n  source_dir       => "puppet:///modules/lab42/apache/conf/",\n  source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir\n}\n
  • \n
  • Use custom template for main config file

    \n\n
    class { "apache":\n  template => "example42/apache/apache.conf.erb",      \n}\n
  • \n
  • Define custom options that can be used in a custom template without the\nneed to add parameters to the apache class

    \n\n
    class { "apache":\n  template => "example42/apache/apache.conf.erb",    \n  options  => {\n    'LogLevel' => 'INFO',\n    'UsePAM'   => 'yes',\n  },\n}\n
  • \n
  • Automaticallly include a custom subclass

    \n\n
    class { "apache:"\n  my_class => 'apache::example42',\n}\n
  • \n
\n\n

USAGE - Example42 extensions management

\n\n
    \n
  • Activate puppi (recommended, but disabled by default)\nNote that this option requires the usage of Example42 puppi module

    \n\n
    class { "apache": \n  puppi    => true,\n}\n
  • \n
  • Activate puppi and use a custom puppi_helper template (to be provided separately with\na puppi::helper define ) to customize the output of puppi commands

    \n\n
    class { "apache":\n  puppi        => true,\n  puppi_helper => "myhelper", \n}\n
  • \n
  • Activate automatic monitoring (recommended, but disabled by default)\nThis option requires the usage of Example42 monitor and relevant monitor tools modules

    \n\n
    class { "apache":\n  monitor      => true,\n  monitor_tool => [ "nagios" , "monit" , "munin" ],\n}\n
  • \n
  • Activate automatic firewalling \nThis option requires the usage of Example42 firewall and relevant firewall tools modules

    \n\n
    class { "apache":       \n  firewall      => true,\n  firewall_tool => "iptables",\n  firewall_src  => "10.42.0.0/24",\n  firewall_dst  => "$ipaddress_eth0",\n}\n
  • \n
\n\n

\"Build

\n
", "changelog": null, "license": "
Copyright (C) 2013 Alessandro Franceschi / Lab42\n\nfor the relevant commits Copyright (C) by the respective authors.\n\nContact Lab42 at: info@lab42.it\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-11-22 01:04:52 -0800", "updated_at": "2013-11-22 01:18:21 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/example42-apache-2.1.4", "version": "2.1.4" }, { "uri": "/v3/releases/example42-apache-2.1.3", "version": "2.1.3" }, { "uri": "/v3/releases/example42-apache-2.1.2", "version": "2.1.2" }, { "uri": "/v3/releases/example42-apache-2.1.1", "version": "2.1.1" }, { "uri": "/v3/releases/example42-apache-2.1.0", "version": "2.1.0" }, { "uri": "/v3/releases/example42-apache-2.0.8", "version": "2.0.8" }, { "uri": "/v3/releases/example42-apache-2.0.7", "version": "2.0.7" } ], "homepage_url": "https://github.com/example42/puppet-apache", "issues_url": "" }, { "uri": "/v3/modules/ghoneycutt-apache", "name": "apache", "downloads": 1118, "created_at": "2010-06-26 00:22:43 -0700", "updated_at": "2014-01-03 00:04:00 -0800", "owner": { "uri": "/v3/users/ghoneycutt", "username": "ghoneycutt", "gravatar_id": "eadada85ce760817d46ff939f2b857a6" }, "current_release": { "uri": "/v3/releases/ghoneycutt-apache-1.0.1", "module": { "uri": "/v3/modules/ghoneycutt-apache", "name": "apache", "owner": { "uri": "/v3/users/ghoneycutt", "username": "ghoneycutt", "gravatar_id": "eadada85ce760817d46ff939f2b857a6" } }, "version": "1.0.1", "metadata": { "name": "ghoneycutt-apache", "dependencies": [ { "name": "ghoneycutt/ssh", "version_requirement": ">= 1.0.0" }, { "name": "ghoneycutt/pam", "version_requirement": ">= 1.0.0" }, { "name": "ghoneycutt/generic", "version_requirement": ">= 1.0.0" }, { "name": "ghoneycutt/sudo", "version_requirement": ">= 1.0.0" } ], "author": "", "license": "", "version": "1.0.1", "types": [ ], "checksums": { "files/perl.conf": "95b00bb9a16c01f8839f56f177058ec1", "manifests/hup.pp": "f971526529926bf6259bb6ea2d8c6c10", "manifests/perl.pp": "bb5cf6eaeb064ef76bf9c4fbaa711b77", "manifests/python.pp": "a51da581545692a0dc716f2953f8b4ad", "spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909", "templates/httpd.conf-CentOS.erb": "c0bebc0b4a5a831692964fdc8d5d54ba", "templates/ssl_site.conf.erb": "5cccae5bf7683aaf8edff875c5312531", "CHANGELOG": "c1c926302b2ab4ee2933505c0a190cc0", "files/private_keys/apachehup": "70adb76e0c8431b3c2e98cae756167bd", "manifests/php.pp": "5018f8d5f632b18b09c95f916d3a95b3", "files/public_keys/apachehup": "24b730aa4b1244f51df30bc850a2a05d", "files/favicon.ico": "39f06169979733a6efee9068927eccee", "README": "2cb6ee17b0584156cb1796acafdae8a1", "manifests/ssl.pp": "4497fcf6be15d50e5f6a6af46331dd0f", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "files/ssl.conf": "fd530aaa468e4547e20b4e8cb12b6497", "templates/sysconfig-httpd.erb": "72dc3c90b402a09f33920d3d3f2d41f0", "files/php.conf": "6b47da620555b510da9d1cfba698fdc1", "metadata.json": "d34d0b70aba36510fbc2df4e667479ef", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "files/python.conf": "31f43ae7b2091d64c91648c9413ed334", "manifests/init.pp": "f7dbc91d972ba84f33c67fcc2155b095", "Modulefile": "40fb273e8a813a3352cb7e393770255f" }, "source": "" }, "tags": [ "webservers", "apache", "web", "applications", "web servers", "php", "python", "perl", "ssl", "restart" ], "file_uri": "/v3/files/ghoneycutt-apache-1.0.1.tar.gz", "file_size": 24876, "file_md5": "db4e5479eafa47c556e1d30e1c323bec", "downloads": 966, "readme": "
apache\n\nReleased 20100625 - Garrett Honeycutt - GPLv2\n\nManages apache servers, remote restarts, and mod_ssl, mod_php, mod_python, mod_perl\n\nYou can also easily setup a web server by only specifying the apache config file, such as\n\napache::vhost { "mediawiki":\n    source => "puppet:///modules/mediawiki/mediawiki.conf",\n}\n\n# Definition: apache::vhost\n#\n# setup a vhost\n#\n# Parameters:   \n#   $ensure  - defaults to 'present'\n#   $content - quoted content or a template\n#   $source  - file to grab with the VirtualHost information\n#\n# Actions:\n#   sets up a vhost\n#\n# Requires:\n#   $content our $source must be set\n#\n# Sample Usage:\n# in the mediawiki module you could setup the web portion with the following\n# code, where the mediawiki.conf file contains the <VirtualHost> statements\n#\n#    apache::vhost { "mediawiki":\n#        source => "puppet:///modules/mediawiki/mediawiki.conf",\n#    } # apache::vhost\n\n# Definition: apache::module\n#\n# setup an apache module - this is used primarily by apache\n# subclasses, such as apache::php, apache::perl, etc\n#       \n# Parameters:    \n#   $ensure  - default to 'present'\n#   $content - quoted content or a template\n#   $source  - file to grab with the VirtualHost information\n#\n# Actions:\n#   sets up an apache module\n#       \n# Requires:\n#   $content our $source must be set\n#       \n# Sample Usage:  \n# this would install the php.conf which includes the LoadModule,\n# AddHandler, AddType and related info that apache needs\n#\n#    apache::module{"php": \n#        source => "puppet:///modules/apache/php.conf",   \n#    } # apache::module\n\n\n# Definition: apache::ssl::set_cert\n#\n# install certificate\n#\n# Parameters:   \n#   $certfile   - public cert\n#   $certkey    - private key\n#   $ip         - ip address to use, uses $ipaddress from facter by default\n#   $port       - port to use, uses 443 by default\n#   $cachain    - cachain file\n#   $revokefile - revoke file\n#\n# Actions:\n#   installs certs\n#\n# Requires:\n#   $certfile must be set\n#   $certkey must be set\n#\n# Sample Usage:\n#    # *.yoursite.com\n#    @set_cert { "staryoursite":\n#        certfile => "/etc/pki/tls/certs/yoursite_cert.pem",\n#        certkey  => "/etc/pki/tls/private/yoursite_key.pem",\n#    } # @set_cert\n
", "changelog": "
1.0.0 - initial release\n1.0.1 - added documentation\n
", "license": null, "created_at": "2010-08-11 23:06:05 -0700", "updated_at": "2013-03-04 14:57:38 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/ghoneycutt-apache-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/ghoneycutt-apache-1.0.0", "version": "1.0.0" } ], "homepage_url": "http://github.com/ghoneycutt/puppet-apache", "issues_url": "http://github.com/ghoneycutt/puppet-apache/issues" }, { "uri": "/v3/modules/theforeman-apache", "name": "apache", "downloads": 982, "created_at": "2013-05-24 06:13:19 -0700", "updated_at": "2014-01-06 10:18:46 -0800", "owner": { "uri": "/v3/users/theforeman", "username": "theforeman", "gravatar_id": "debaffa7d317b9ec76a588682fb1e640" }, "current_release": { "uri": "/v3/releases/theforeman-apache-1.4.0", "module": { "uri": "/v3/modules/theforeman-apache", "name": "apache", "owner": { "uri": "/v3/users/theforeman", "username": "theforeman", "gravatar_id": "debaffa7d317b9ec76a588682fb1e640" } }, "version": "1.4.0", "metadata": { "name": "theforeman-apache", "version": "1.4.0", "source": "git://github.com/theforeman/puppet-apache", "author": "theforeman", "license": "GPLv3+", "summary": "Apache HTTP server configuration", "description": "Module for configuring Apache HTTP server for Foreman", "project_page": "http://github.com/theforeman/foreman-installer", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG.md": "71d63a8171ca616a3fa7c37e39e746f3", "LICENSE": "9eef91148a9b14ec7f9df333daebc746", "Modulefile": "aacc357c56c7d7314e0de30e08b4a9f9", "README.md": "fc0d45f973e7c44c3613514aebf7c0d9", "manifests/config.pp": "672529e14fde6604454d748de751fcdf", "manifests/init.pp": "f53525086e13c013880ddd36b808f1fd", "manifests/install.pp": "ce58e6bdb2d34b13e0eedb4a76d264d2", "manifests/params.pp": "4219f11da48b0b3177772ccd1540cd0c", "manifests/service.pp": "77b04bdf25293554b9f8759fa8bfad14", "manifests/site.pp": "2c459dbe863622bb29d6b527c7c018fd", "manifests/ssl.pp": "5247d16369fb2c7877859e328f6f9379", "templates/vhost.conf": "549cc861d7e3cdc072b77f011b7b604c" } }, "tags": [ "foreman", "apache", "httpd" ], "file_uri": "/v3/files/theforeman-apache-1.4.0.tar.gz", "file_size": 14579, "file_md5": "442523febaa0075aa8bccf1c7fd8172a", "downloads": 107, "readme": "

Puppet module for managing Apache

\n\n

Installs and configures Apache HTTP server.

\n\n

Part of the Foreman installer: http://github.com/theforeman/foreman-installer

\n\n

Contributing

\n\n
    \n
  • Fork the project
  • \n
  • Commit and push until you are happy with your contribution
  • \n
  • Send a pull request with a description of your changes
  • \n
\n\n

More info

\n\n

See http://theforeman.org or at #theforeman irc channel on freenode

\n\n

Copyright (c) 2010-2013 Ohad Levy and their respective owners

\n\n

Except where specified in provided modules, this program and entire\nrepository is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\nany later version.

\n\n

This program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.

\n
", "changelog": "

Changelog

\n\n

1.4.0

\n\n
    \n
  • Enable mod_expires and mod_rewrite on Debian
  • \n
  • Remove theforeman/passenger dependency due to loop (Gavin Williams)
  • \n
  • Fix puppet-lint issues
  • \n
\n
", "license": "
                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  "This License" refers to version 3 of the GNU General Public License.\n\n  "Copyright" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  "The Program" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as "you".  "Licensees" and\n"recipients" may be individuals or organizations.\n\n  To "modify" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a "modified version" of the\nearlier work or a work "based on" the earlier work.\n\n  A "covered work" means either the unmodified Program or a work based\non the Program.\n\n  To "propagate" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To "convey" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays "Appropriate Legal Notices"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The "source code" for a work means the preferred form of the work\nfor making modifications to it.  "Object code" means any non-source\nform of a work.\n\n  A "Standard Interface" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The "System Libraries" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n"Major Component", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The "Corresponding Source" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    "keep intact all notices".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n"aggregate" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A "User Product" is either (1) a "consumer product", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, "normally used" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  "Installation Information" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  "Additional permissions" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered "further\nrestrictions" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An "entity transaction" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A "contributor" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's "contributor version".\n\n  A contributor's "essential patent claims" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, "control" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a "patent license" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To "grant" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  "Knowingly relying" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is "discriminatory" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License "or any later version" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n
", "created_at": "2013-12-02 08:53:09 -0800", "updated_at": "2013-12-02 08:53:09 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/theforeman-apache-1.4.0", "version": "1.4.0" }, { "uri": "/v3/releases/theforeman-apache-1.3.0", "version": "1.3.0" }, { "uri": "/v3/releases/theforeman-apache-1.2.0", "version": "1.2.0" }, { "uri": "/v3/releases/theforeman-apache-1.2.0-rc3", "version": "1.2.0-rc3" }, { "uri": "/v3/releases/theforeman-apache-1.2.0-rc2", "version": "1.2.0-rc2" }, { "uri": "/v3/releases/theforeman-apache-1.2.0-rc1", "version": "1.2.0-rc1" } ], "homepage_url": "http://github.com/theforeman/foreman-installer", "issues_url": "https://tickets.puppetlabs.com" }, { "uri": "/v3/modules/vStone-apache", "name": "apache", "downloads": 974, "created_at": "2013-08-01 11:06:34 -0700", "updated_at": "2014-01-03 04:10:55 -0800", "owner": { "uri": "/v3/users/vStone", "username": "vStone", "gravatar_id": "41835625a324201c796a0a0cffe4796b" }, "current_release": { "uri": "/v3/releases/vStone-apache-0.13.1", "module": { "uri": "/v3/modules/vStone-apache", "name": "apache", "owner": { "uri": "/v3/users/vStone", "username": "vStone", "gravatar_id": "41835625a324201c796a0a0cffe4796b" } }, "version": "0.13.1", "metadata": { "name": "vstone-apache", "version": "0.13.1", "source": "git://github.com/vStone/puppet-apache.git", "author": "Jan Vansteenkiste ", "license": "Apache License Version 2.0", "summary": "Manage apache and vhosts with puppet.", "description": "Attempts to be an all-in-one-solution for managing apache and all kinds of mods", "project_page": "https://github.com/vStone/puppet-apache", "dependencies": [ ], "types": [ ], "checksums": { "CHANGELOG": "d47708832e02b139f27aab6411b6484a", "Gemfile": "292e9f117cdca91b8d216f646fb42285", "Gemfile.lock": "a1fc60633bad50d76937092e9e0adabc", "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57", "Modulefile": "b18045be1fc418259d7e40237eae7395", "README.md": "dbf5cf3d417cd187aa9e81fcf2add10c", "Rakefile": "6fe6a88c25193fbaaa51f570a970aac5", "lib/puppet/parser/functions/always_array.rb": "54be1a142838369e13cec1aed1b2e7fa", "lib/puppet/parser/functions/create_mods.rb": "9e6e3fd2cf73d53fdcb26222d707656e", "lib/puppet/parser/functions/fix_apache_vars.rb": "56e2ad65f8522ff1b6fdbc486df9bef2", "lib/puppet/parser/functions/format_logfile.rb": "c175737244db5dd9cac52d0624a0ff0f", "lib/puppet/parser/functions/render_allow_deny.rb": "4fcc8a9f68f5e1fe5cad4e5be6810f95", "manifests/augeas/rm.pp": "89b184de20e5db8586bf7ce7fbeaf864", "manifests/augeas/rmnode.pp": "32aa2cba37cec0f8f61fc5de54833b19", "manifests/augeas/set.pp": "117a55f730b5bfd50e835ebfeecf4723", "manifests/augeas.pp": "ab37b1929c481c09bf0651a8b7726d14", "manifests/confd/file.pp": "80529facbdb08e6faefffdff91ddf3ce", "manifests/confd/file_concat.pp": "b98bfe9af124cb8b2737a455a998d3c1", "manifests/confd/file_exists.pp": "00556cd71fa0ecdc19865f706cf6f38f", "manifests/confd/symfile.pp": "a1db47730343c623415c356039d834f6", "manifests/confd/symfile_concat.pp": "b2e40a3a175f2a5ba0354de32a9545ec", "manifests/confd.pp": "b5cbc2975d33c59fa1d90f1986187c57", "manifests/config/loadmodule.pp": "2f840843bb5f0c3035d88699f3545137", "manifests/init.pp": "065395f9b88910cba200bf98b862b38c", "manifests/listen.pp": "0c5587c09ebcfe8054c10b32157d9393", "manifests/loader.pp": "4d024fd7924ebd42ed5f16d3613ad04d", "manifests/logformat.pp": "510bfdffe3b6923996634243387ed433", "manifests/logrotate.pp": "2b1cb7d80edd9e964913078fc97548d4", "manifests/mod/cluster.pp": "e7aff97b4ecfd1750da6f535be73cab7", "manifests/mod/headers.pp": "81619404a62528b3c979b88297aedd92", "manifests/mod/info.pp": "b747ddfdcee2cf1d4346bfcf4fd72bb3", "manifests/mod/passenger.pp": "0d17a119361358ff6eec72065e2df2de", "manifests/mod/php.pp": "f490926b06e5135a4812f8fb244ae8bc", "manifests/mod/prefork.pp": "aacbcd3435371d93b1e004c1421dfb3d", "manifests/mod/reverse_proxy.pp": "d04705c5a019af07f64aad2b07eacaac", "manifests/mod/rewrite.pp": "fc19f2d837b0f477c1f28692a068b8d4", "manifests/mod/ssl.pp": "d2a94ca96e1abfb5f4973e4a745bcb80", "manifests/mod/status.pp": "1dc72906fd55c5d0d42b0c95253c080c", "manifests/mod/userdir.pp": "2444c2b92bebe1faab8d9541574d5ebc", "manifests/mod/xsendfile.pp": "2edb2a0e8d17f2994dc3088532bf8abd", "manifests/module.pp": "75cefa955e65e10eb253fd8fd2195ed5", "manifests/namevhost.pp": "60a4da03e9fa6baa4b62bb4416673240", "manifests/packages.pp": "27e11d5591a6b7a3907f8c8ae518bc22", "manifests/params.pp": "c63565dee7438086dfa5753a5475b21b", "manifests/security/redhat.pp": "b4df0a326f245bfd23cf4a14356a75a4", "manifests/security.pp": "5e9f003b73b4e7697f6cd44b263f9e90", "manifests/service.pp": "bfcee17a154f287fd9e9349cd47c4aa6", "manifests/setup/listen.pp": "dfe3416cb73889485ff93fdf2b031a40", "manifests/setup/logformat.pp": "6ea3b9a09bfa29e428832cd27f4a06c0", "manifests/setup/mod.pp": "079090bf0d463ffb68ce83b3e82f7358", "manifests/setup/namevhost.pp": "bd4d9ae800200eb72538cc63c41781b1", "manifests/setup/os/debian.pp": "63209f3fc1dd3e52acb1b48e1c9ecbda", "manifests/setup/os/redhat.pp": "303a6c8606db65716bec800067c467ae", "manifests/setup/vhost.pp": "733bf45f0b0629f6aebb53fecff62376", "manifests/setup.pp": "6eca4b67b7f7b6f6612c05cd7e04b4e5", "manifests/sys/config/concat/main.pp": "7f664f831a90690eacf674835395ee1d", "manifests/sys/config/concat/mod.pp": "87bf619e7e17d5f520e06cd860ea1016", "manifests/sys/config/concat/params.pp": "dca666110c53123e60f3e5d156d78860", "manifests/sys/config/debian_concat/main.pp": "c5130b82e5a0100f23fc50d2e088aa4b", "manifests/sys/config/debian_concat/mod.pp": "3780153a707614d855a853d7909bcd9c", "manifests/sys/config/debian_concat/params.pp": "4c0d296df851cc9e78b24b1195ed0416", "manifests/sys/config/split/main.pp": "1099595fa44578a725adb404384021d4", "manifests/sys/config/split/mod.pp": "89719559d3d4f8bee18d11727c95d702", "manifests/sys/config/split/params.pp": "58e33d9d5f4139fe6b72a07a72ba17ce", "manifests/sys/modfile.pp": "67ed8e0b54ff91445304d45a255359b4", "manifests/sys/modpackage.pp": "cc95376e13889721db26aba78ce1178b", "manifests/vhost/mod/advertise.pp": "f79e9fdfef260ecacbd4e1d4e2b28201", "manifests/vhost/mod/dummy.pp": "93406a7a10e0312abcdd4583dd7cd805", "manifests/vhost/mod/headers.pp": "274653d34ff5356fb8a8956e261ec104", "manifests/vhost/mod/manager.pp": "2b3f3d8a723e4152b877c26595627fc0", "manifests/vhost/mod/passenger.pp": "bd7c7efd717689ac56c6220c64623cb3", "manifests/vhost/mod/passenger4.pp": "eddb33561a26b51eb7f084dcc533580d", "manifests/vhost/mod/reverse_proxy.pp": "5b55f84f0d7e561969e06e109bb9cf40", "manifests/vhost/mod/rewrite.pp": "0a1d4af54d9f040b0f0d1bba1ed706e8", "manifests/vhost/mod/server_info.pp": "b15227663b875dffe97a5cdbc4f3498c", "manifests/vhost/mod/server_status.pp": "6340a8cfc174a3d7c706de60c532d133", "manifests/vhost/mod/userdir.pp": "a0b0b1a98396346ffc269e24dff42fee", "manifests/vhost/mod/webdav.pp": "a971999369aa294a100ec99638d05a35", "manifests/vhost/ssl.pp": "25519252efe08b153b31459efe3b9761", "manifests/vhost.README.md": "b5887a439a283a8e9b83b8fe9c88528d", "manifests/vhost.pp": "046cfb2f0eb2ffef4feadbff2e89d77e", "spec/classes/apache_mod_passenger__spec.rb": "421c129398fa68b7c76a5406d277defc", "spec/classes/apache_spec.rb": "8fe09ab88676fcdf4139e843016f8165", "spec/functions/fix_apache_vars_spec.rb": "3bf36b96b8a9e6913cd4ba96ac7c80d9", "spec/spec.opts": "19e24badad2823f90a3697dd99105209", "spec/spec_helper.rb": "59a6141c1d38c259822fd0a0ba9be6fc", "templates/augeas/set-insert.erb": "7dde3f78111d3599e51e206e63abc8a2", "templates/confd/confd_include.erb": "839eee3fea733546c458fc4ff18fd7db", "templates/confd/confd_warning.erb": "9577db3fa5d595599ca9e976a1cf3ffd", "templates/confd/listen.erb": "3077ef3519eea4e4c1005532fc61c590", "templates/confd/logformat.erb": "66afc539b8f5d0e48b666fa4251d4b17", "templates/confd/namevhost.erb": "b2948e1fdef1c820fbee34efba758b32", "templates/config/os/centos6-ssl.conf": "544c24d0a404826131895e841fb4d184", "templates/logrotate-vhosts.erb": "7f7b5d85143a332855814d43b5c534af", "templates/mod/cluster.erb": "498420d95ca92f04883be7c719a182dd", "templates/msg/directive-allow-order-fail.erb": "9deb7cf5a6c062bb5084ea6f7ffa1ab6", "templates/msg/listen-allinterfaces-warning.erb": "9280d2360b71ae25854fecfea186d4c2", "templates/msg/listen-fail-ip-port-fromname.erb": "067c9f53e9e6b74b9739c60e1d7169cc", "templates/msg/mod-revproxy-via-fail.erb": "901c9370ecc62e9b915e62aafd6abd4a", "templates/msg/vhost-ensure-unvalid-warning.erb": "f9a5cb07f88a1708846741918865333a", "templates/msg/vhost-notdef-listen-warning.erb": "7dcc000b68269e85c6e41c5dcf191499", "templates/vhost/config/splitconfig_mod_content.erb": "ef5823f0eb98679a682696f2fdaf34f0", "templates/vhost/config/splitconfig_vhost.erb": "1c9d0bf71e3ffcc7a919516bb134c6ce", "templates/vhost/mod/_header.erb": "efd7567bcef717272970737443ea5143", "templates/vhost/mod/advertise.erb": "96e89d95f3d47ea039908c87a1b28abb", "templates/vhost/mod/dummy.erb": "d8be1bce56228ff26f39918dd5fe7480", "templates/vhost/mod/headers.erb": "b588f56209faf6be113a1d7de89e26eb", "templates/vhost/mod/manager.erb": "41e0f2daa448f668f2e643294325d091", "templates/vhost/mod/passenger-3.erb": "3d0070b4ff98b02084391caf93f2010a", "templates/vhost/mod/passenger-4.erb": "d71b8d766223a5baf8cb8aa779af36b5", "templates/vhost/mod/reverse_proxy.erb": "e40cab5f29f4e90a24bb8251ef946504", "templates/vhost/mod/rewrite.erb": "ff4d82b61a21c2211760ad31472d6d58", "templates/vhost/mod/server_info.erb": "227fe09b70b8915cfc4f7e3db2689a8b", "templates/vhost/mod/server_status.erb": "bffb6cfdc61b990b93e7ddf55c3771bd", "templates/vhost/mod/userdir.erb": "957d571e37b20e723a4666ed992d2db4", "templates/vhost/mod/webdav.erb": "1747c6e2fda1c290e66bbd277e5a2eaf", "templates/vhost/virtualhost.erb": "d7edcdd32ee1a2be0d25d42a4bdbd5fb", "templates/vhost/virtualhost_end.erb": "9ca746d48f6f0b7adb99f338fbfb6b6a", "templates/vhost/virtualhost_ssl.erb": "05f983167afe1314d69497ed2aeb8ba8" } }, "tags": [ "apache,", "complex,", "overengineered" ], "file_uri": "/v3/files/vStone-apache-0.13.1.tar.gz", "file_size": 50129, "file_md5": "f4b93fdf02e0f5042a6f838a2c33ee0f", "downloads": 238, "readme": "

Usage

\n\n

See the module documentation on top of apache::params and apache::vhost for\nmore information on how to use this module. Each class should be pretty well\ndocumented.

\n\n

You can find online (generated) documentation here:\nhttp://jenkins.vstone.eu/job/puppet-apache/Puppet_Docs/

\n\n

Example:

\n\n
\n  # We do not want puppet to restart the service.\n  class {'apache::params':\n    notify_service => false,\n  }\n\n  # Basic apache setup.\n  class {'apache': }\n\n  # So we will be using php.\n  class {'apache::mod::php': }\n\n  # We will have some ssl vhosts.\n  apache::listen {'443':}\n  apache::namevhost {'443': }\n\n  # Vhost example with the 2 rewrite rules.\n  apache::vhost {'myvhost.example.com':\n    mods => {\n      'rewrite' => [\n        { rewrite_cond => 'foo', rewrite_rule  => 'bar', },\n        { rewrite_cond => 'fooo', rewrite_rule => 'baaar', },\n      ],\n    }\n  }\n\n\n
\n\n

Requirements

\n\n
    \n
  • augeas >= 0.9.0
  • \n
\n\n

Debian

\n\n
    \n
  • libaugeas0 >= 0.9.0
  • \n
  • augeas-lenses >= 0.9.0
  • \n
  • libaugeas-ruby >= 0.3.0
  • \n
\n\n

You can find up-to-date packages in squeeze-backports.

\n\n

Release Notes:

\n\n

Upgrade to 0.9

\n\n

If you are upgrading from a version earlier than 0.9, you no longer have to\nspecify apache::listen{'80': } and apache::namevhost{'80':}. These 2 are\nnow created by default. You can disable this behaviour by specifying

\n\n
class {'apache':\n  defaults => false,\n}\n
\n\n

Notes:

\n\n

You MUST define the apache::params class before importing apache if you want\nto use anything besides the default parameter settings. This is due to the\nparsing of the manifests. When you import apache, the apache::params module\nwill be included because most things require apache::params.

\n\n

Bugs

\n\n

If you run into bugs or would like to request a new feature (pull requests\nare also welcome... if you dare touch the code), please use the repository\nlocated here: https://github.com/vStone/puppet-apache/

\n\n

Todo

\n\n
    \n
  • Proper debian style configuration. For now, I have not have enought time to test this.
  • \n
  • Tests...
  • \n
\n
", "changelog": "
## 0.13.1\n\nUpdated a lot of documentation.\n
", "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-08-02 01:22:19 -0700", "updated_at": "2013-08-02 01:22:19 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/vStone-apache-0.13.1", "version": "0.13.1" }, { "uri": "/v3/releases/vStone-apache-0.13.0", "version": "0.13.0" } ], "homepage_url": "https://github.com/vStone/puppet-apache", "issues_url": "https://github.com/vStone/puppet-apache/issues" }, { "uri": "/v3/modules/DavidSchmitt-apache", "name": "apache", "downloads": 853, "created_at": "2010-05-26 12:02:53 -0700", "updated_at": "2014-01-04 22:52:42 -0800", "owner": { "uri": "/v3/users/DavidSchmitt", "username": "DavidSchmitt", "gravatar_id": "f41b1342c973956dba590327908cb349" }, "current_release": { "uri": "/v3/releases/DavidSchmitt-apache-1.0.0", "module": { "uri": "/v3/modules/DavidSchmitt-apache", "name": "apache", "owner": { "uri": "/v3/users/DavidSchmitt", "username": "DavidSchmitt", "gravatar_id": "f41b1342c973956dba590327908cb349" } }, "version": "1.0.0", "metadata": { "name": "DavidSchmitt-apache", "dependencies": [ { "name": "DavidSchmitt-common", "version_requirement": "1.0.0" }, { "name": "ripienaar-concat", "version_requirement": "20100507" } ], "author": "", "license": "", "version": "1.0.0", "types": [ ], "checksums": { "manifests/debian.pp": "7efab43b7f77251b68171f24b54dd43e", "README": "2a3adc3b053ef1004df0a02cefbae31f", "manifests/awstats.pp": "7762a6b81fb7b16368ea28b1c7fb249b", "manifests/site.pp": "42fd8398224736e997f44724dc0e8f77", "templates/munin-stats": "06a348e62d68c65f766bc6f107bf4948", "manifests/init.pp": "8a622c2c8a5ba375675f45bfe21d9e77", "Modulefile": "ba672dbba5297ba5e238dd646e0991d0" }, "source": "" }, "tags": [ "webservers", "apache" ], "file_uri": "/v3/files/DavidSchmitt-apache-1.0.0.tar.gz", "file_size": 4401, "file_md5": "38827a7c956b8da49b62b33d41e51b04", "downloads": 853, "readme": "
Overview\n========\n\nThis module manages apache2 on Debian/etch. There are defines to handle sites\nand modules the Debian Way.\n\nSee also the wiki page at http://reductivelabs.com/trac/puppet/wiki/Recipes/DebianApache2Recipe\nwhich was originally written by Tim Stoop <tim.stoop@gmail.com>\n\nVariables\n=========\n\nThe primary port (default: 80) can be configured by setting $apache2_port in\nthe node scope.\n\nSetting $apache2_ssl to "enabled", causes the SSL module to be installed and \nconfigured. Additionally apache2 is configured to listen on 443 or\n$apache2_ssl_port and use puppet's certificate.\n\n\nClasses\n=======\n\nThe main class, apache2, installs apache2 with the default MPM. \n\nThe apache2::no_default_site variant additionally removes Debian's default site\nconfiguration.\n\n\nTypes\n=====\n\nThis module provides types for site and module management.\n\n\tapache2::site (\n\t\t$ensure = {*present*, absent, "filename"},\n\t\t$require_package = {*apache2*, packagename},\n\t\t$content,\n\t\t$source,\n\t)\n\nThis type manages the /etc/apache2/sites-available file and enables or disables\nthe /etc/apache2/sites-enabled/$name symlink by calling a2ensite or a2dissite\nas neccessary.\n\t\n\n\n\n\tapache2::module (\n\t\t$ensure = {*present*, absent},\n\t\t$require = {*apache2*, packagename}\n\t)\n\nThis type enables or disables the /etc/apache2/mods-enabled/$name symlink by\ncalling a2enmod or a2dismod as neccessary.\n\t\n\n\n\nMonitoring\n==========\n\nThe class installs a nagios service check for the primary port. Additionally\na NameVirtualHost for $hostname is configured where the server-status is\navailable for access from $ipaddress. This is used by the munin plugins\napache_accesses, apache_processes and apache_volume.\n\n\n\nTODO\n====\n\nThe site type should manage the sites-available file too, by providing\ncontent/source parameters.\n\nWith the recent changes to "require" stacking, the site's and module's require\nparameter is obsolete.\n
", "changelog": null, "license": null, "created_at": "2010-05-26 12:03:12 -0700", "updated_at": "2013-03-04 14:57:32 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/DavidSchmitt-apache-1.0.0", "version": "1.0.0" } ], "homepage_url": "http://github.com/DavidS/puppet-apache", "issues_url": null }, { "uri": "/v3/modules/brightbox-apache", "name": "apache", "downloads": 847, "created_at": "2012-06-09 12:16:58 -0700", "updated_at": "2014-01-03 00:58:05 -0800", "owner": { "uri": "/v3/users/brightbox", "username": "brightbox", "gravatar_id": "47f28b42f7dfe7115b339cbca7e84dd5" }, "current_release": { "uri": "/v3/releases/brightbox-apache-1.0.1", "module": { "uri": "/v3/modules/brightbox-apache", "name": "apache", "owner": { "uri": "/v3/users/brightbox", "username": "brightbox", "gravatar_id": "47f28b42f7dfe7115b339cbca7e84dd5" } }, "version": "1.0.1", "metadata": { "types": [ ], "author": "brightbox", "checksums": { "Modulefile": "a0277c19a7db53c3a40b040254ecf319", "spec/spec_helper.rb": "67329d39c5c3635f0b8f79dab5811ea3", "spec/classes/apache_modsecurity_spec.rb": "b2131c3a6d29fe39c0ce44fe770a797d", "templates/php-fastcgi.erb": "0e1617cdecbd9fa3dfcc23b83d5ba8fb", "templates/passenger.erb": "8d5235aed91955e941a1eff1eacaa772", "templates/ports.conf.erb": "f6b6edcf3f86d80f0afa53fd3f60c2be", "spec/classes/apache_spec.rb": "7d80f0ca4d6210cfc05a20bbd53b3681", "manifests/init.pp": "e3e308b0cbd683239eef7efe0578c590", "manifests/modsecurity.pp": "a0c8db939bb1a0b285af47da6a4cc368" }, "dependencies": [ { "name": "brightbox-apt", "version_requirement": ">= 1.0.0" } ], "summary": "Apache management", "source": "", "version": "1.0.1", "description": "Support for modules, sites, php, passenger, modsecurity and java", "license": "GPL3", "name": "brightbox-apache", "project_page": "https://github.com/brightbox/puppet" }, "tags": [ "apache", "web", "ruby", "passenger", "HTTP", "php", "modsecurity" ], "file_uri": "/v3/files/brightbox-apache-1.0.1.tar.gz", "file_size": 2918, "file_md5": "be3b293f15ffbec7ac0725f0c96efb06", "downloads": 702, "readme": null, "changelog": null, "license": null, "created_at": "2012-06-09 12:21:27 -0700", "updated_at": "2013-03-04 15:02:40 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/brightbox-apache-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/brightbox-apache-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/brightbox/puppet", "issues_url": "https://github.com/brightbox/puppet/issues" }, { "uri": "/v3/modules/saltycowdawg-apache", "name": "apache", "downloads": 546, "created_at": "2012-02-19 20:52:54 -0800", "updated_at": "2014-01-03 00:44:16 -0800", "owner": { "uri": "/v3/users/saltycowdawg", "username": "saltycowdawg", "gravatar_id": "69d914a0d3f73874f642cb6887cc74b2" }, "current_release": { "uri": "/v3/releases/saltycowdawg-apache-0.0.5", "module": { "uri": "/v3/modules/saltycowdawg-apache", "name": "apache", "owner": { "uri": "/v3/users/saltycowdawg", "username": "saltycowdawg", "gravatar_id": "69d914a0d3f73874f642cb6887cc74b2" } }, "version": "0.0.5", "metadata": { "dependencies": [ ], "name": "saltycowdawg-apache", "project_page": "UNKNOWN", "author": "saltycowdawg", "license": "GPL", "version": "0.0.5", "checksums": { "spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909", "README": "183e7a15a07b6ee5f6d76619e1a02a21", "tests/init.pp": "4eac4a7ef68499854c54a78879e25535", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "metadata.json": "d34d0b70aba36510fbc2df4e667479ef", "manifests/init.pp": "312096c40a73f7575404163f8adccec6", "Modulefile": "4fca54a6af2c1c0da397190f42e5ba08" }, "types": [ ], "summary": "Manage installation and configuration of apache", "description": "Install apache package and configurations", "source": "UNKNOWN" }, "tags": [ "apache", "web", "httpd", "server" ], "file_uri": "/v3/files/saltycowdawg-apache-0.0.5.tar.gz", "file_size": 1549, "file_md5": "91a0758c508f2ca234548c8f24a3faff", "downloads": 546, "readme": "
apache\n\nThis is the apache module.\n
", "changelog": null, "license": null, "created_at": "2012-02-22 14:52:34 -0800", "updated_at": "2013-03-04 14:59:04 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/saltycowdawg-apache-0.0.5", "version": "0.0.5" } ], "homepage_url": "", "issues_url": "" }, { "uri": "/v3/modules/evenup-apache", "name": "apache", "downloads": 435, "created_at": "2013-04-18 09:18:40 -0700", "updated_at": "2014-01-03 03:49:22 -0800", "owner": { "uri": "/v3/users/evenup", "username": "evenup", "gravatar_id": "57199d05662772a2c1f82521caaaf7e6" }, "current_release": { "uri": "/v3/releases/evenup-apache-2.0.0", "module": { "uri": "/v3/modules/evenup-apache", "name": "apache", "owner": { "uri": "/v3/users/evenup", "username": "evenup", "gravatar_id": "57199d05662772a2c1f82521caaaf7e6" } }, "version": "2.0.0", "metadata": { "license": "Apache", "version": "2.0.0", "types": [ ], "description": "Installs, configures, and runs the apache service. Maintains module config files and vhosts.", "source": "UNKNOWN", "checksums": { "files/mod_security.d/activated_rules/modsecurity_35_scanners.data": "b3f7bad41c7f79d499f6ee3e413671cb", "CHANGELOG": "2adcad4f84090147fd511310f3c1f530", "templates/vhost/30-docroot.conf.erb": "9928cba32ab653b7b9e1eca48720651e", "spec/defines/apache_securefile.rb": "5b809c6e08580c444c65e33f8ee0279c", "spec/classes/apache_userdir_spec.rb": "aa4358ad08e5ea5dd2b589df9f27f675", "manifests/vhost.pp": "ac130e1538939babb500812841eab7ab", "spec/defines/apache_namevirtualhost_spec.rb": "269c1f9a08985c089a7c6ed8ed75d692", "spec/classes/apache_python_spec.rb": "83eb50db2e48debcba842aa99c085138", "templates/ssl.conf": "a961d7cd2731f93006b08634d438ae9a", "files/mod_security.d/activated_rules/modsecurity_35_bad_robots.data": "ea9d65ca6ffaf4294cfd07a20c4519d1", "manifests/wsgi.pp": "abfc660ba2abeeca57cedecfc3bcb83d", "files/mod_security.d/activated_rules/modsecurity_crs_47_common_exceptions.conf": "886dd952c64b07ba2a0847e1d96625eb", "Modulefile": "433d98e426d9052f5ca3d9a6541bb342", "manifests/status.pp": "51d0863c8b84d84b283003f8fd5d5836", "templates/vhost/20-aliases.conf.erb": "aadcdaeca6f040c8640aa29bc1a1448f", "templates/vhost/01-header.conf.erb": "7fe0b81eb79af50c523af80b1ecf9a74", "files/mod_security.d/activated_rules/modsecurity_crs_21_protocol_anomalies.conf": "4e50281b2bd831e1417a5ce4cc763430", "spec/classes/apache_wsgi_spec.rb": "9a29c4770b8049339b406a8ea1b92ffd", "manifests/ssl.pp": "890cfdb9eae8ee953fddb859a826aee2", "files/mod_security.d/activated_rules/modsecurity_crs_59_outbound_blocking.conf": "b7097d7785f29c549032bb4fdc5344df", "files/mod_security.d/activated_rules/modsecurity_40_generic_attacks.data": "984a799c59ce6722cbf7acce0412280c", "manifests/service.pp": "52cccd415e46bd678ceae495ed8f5799", "templates/vhost/10-redirect_http.conf.erb": "7f83a9c4bb0bb461ef4af8dcc7f505eb", "manifests/mod_security.pp": "1bf53a6408f29ee97cd8bf0746b1da1b", "spec/defines/apache_vhost_spec.rb": "d9ac637a2e0864faa72eb86dcd92c98c", "manifests/python.pp": "c573f45c5cd7ce3f0e599e375a4328f5", "spec/spec_helper.rb": "5707481fc513f0b892b91788ee9c4bbd", "templates/passenger.conf": "63d482c99986285863461752e893bab5", "files/mod_security.d/activated_rules/modsecurity_crs_49_inbound_blocking.conf": "34240b0b8745ca6f70ff250a782a2dbb", "files/mod_security.d/activated_rules/modsecurity_crs_20_protocol_violations.conf": "d296b2319cf15310874d696909f9261d", "templates/wsgi.conf": "004f8ab23575544bf4b8284ed27c8e23", "manifests/cfgfile.pp": "44cfece76ef8a104577c4039d68f4cee", "files/httpd.sysconfig": "46953ae9c76c9ef980f58e19de37d930", "templates/vhost/ajp.conf.erb": "6c255c3b7f9c0b5c7ba34997f074d659", "spec/classes/apache_service_spec.rb": "4dc5e173d9ebacb8028b7eeeda0b3230", "templates/vhost/40-locations.conf.erb": "7edffedeeb41813591d2216c22b2bce0", "files/mod_security.d/activated_rules/modsecurity_crs_23_request_limits.conf": "6c9466ce99af216d678ee8089e30a632", "templates/vhost/35-proxy_thin.conf.erb": "2faed460842249624901b692bd5259ff", "files/mod_security.d/activated_rules/modsecurity_crs_35_bad_robots.conf": "262635bf64b21fe65de2828c4efe9d73", "files/mod_security.d/activated_rules/modsecurity_50_outbound.data": "01702c7e10710ba4154969ee1f2e1876", "manifests/init.pp": "57fdb0408ffb248818a84dce32ba460b", "files/mod_security.d/activated_rules/modsecurity_crs_30_http_policy.conf": "3d2215075cabcdb44c8b1b0357f20e4c", "manifests/namevhost.pp": "f62e95717d261266730a57ee1545448a", "files/mod_security.d/activated_rules/modsecurity_crs_42_tight_security.conf": "e80950d3e0093f1cb1072d8aff3ab488", "spec/classes/apache_init_spec.rb": "0a80292e5cbfb6c26bae544df37bcb90", "templates/vhost/99-footer.conf.erb": "e27b2525783e590ca1820f1e2118285d", "LICENSE": "6a34c40bb8fa2134a463a814bae7dbe6", "spec/classes/apache_status_spec.rb": "a9f90ed60eb694cd55162ecb024c71b1", "files/mod_security.d/activated_rules/modsecurity_50_outbound_malware.data": "1931e7aef602b80b582bd793817c2b44", "spec/classes/apache_passenger_spec.rb": "35a7955b0590ff8e6271bded2539fd40", "templates/mod_security.conf": "a4ca1b658fc03fbe3415aab3e9698f76", "files/mod_security.d/activated_rules/modsecurity_crs_40_generic_attacks.conf": "6e71f9769f76e729560d60efdbfceacd", "files/mod_security.d/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf": "0ee54a9b6dd2c872d107aac6433137d7", "templates/vhost/15-ssl.conf.erb": "476ff33f40ad775d0736c6d6b0adb078", "templates/vhost/25-site_directives.conf.erb": "b8d88dab1ab74f84ef36d9a6cc14ede7", "manifests/securefile.pp": "bb2c4f8566ee2b138159948e03a0984f", "templates/vhost/35-proxy_tomcat.conf.erb": "8700d102edb59ae4ee58799afa23de90", "manifests/passenger.pp": "4fac02dd151c2584640b782a0095c6f2", "manifests/install.pp": "89856dfc1962a7e50b3f4b59a2305e6e", "manifests/mod_evasive.pp": "96eefd0c91e9a5d6d2c50ce2383d56ff", "templates/vhost/35-proxy_generic.conf.erb": "86419b618636fb6718af7bdcac813cac", "spec/classes/apache_install_spec.rb": "e66b0998758c9af77a34b58b2b3bec09", "templates/mod_evasive.conf": "e7294eae967a243e07df02ffe89443a8", "Rakefile": "f37e6131fe7de9a49b09d31596f5fbf1", "README.md": "9e60f5db82c21ec302feb497cc141686", "templates/python.conf": "002de5e21d8c011181fa912f9c2c7a7f", "templates/vhost/45-modsec.conf.erb": "68a98742c58a75d729d81385ebc6852d", "Gemfile": "fa52fbc6974ce6e08b25564319366442", "spec/defines/apache_cfgfile_spec.rb": "59c59d30b7be855c2bfb2e8c7faa90e1", "files/httpd.conf": "9838e3471702474949e5bf035f608fb1", "templates/userdir.conf": "93b4fc8fd0a5c2156473e54c21cdf4d6", "files/mod_security.d/activated_rules/modsecurity_crs_50_outbound.conf": "95c233d3ded439bb63cafcff7c2e7b82", "spec/classes/apache_ssl_spec.rb": "2eece0eacd007ae57923e7ea4e89baf7", "spec/classes/apache_mod_evasive_spec.rb": "fc12b2ee74b87cdc1af12c021e64027f", "files/mod_security.d/modsecurity_crs_10_config.conf": "bb7343ef92ebb8cd49b0bbcdd24cd666", "files/mod_security.d/activated_rules/modsecurity_crs_45_trojans.conf": "50bbcf95888eb4fbd9a9eadfb4640f9a", "files/mod_security.d/activated_rules/modsecurity_crs_41_xss_attacks.conf": "218fe638733aaa6cb9ee583480beef2c", "manifests/userdir.pp": "3fac3e79d202b4faed096fef85a56e07", "files/mod_security.d/activated_rules/modsecurity_crs_60_correlation.conf": "0b06b06fd6ef64979105395bf70ecce5", "manifests/monitoring/sensu.pp": "98536c68bba70dc78c98de53b8843bfb", "files/mod_security.d/activated_rules/modsecurity_41_sql_injection_attacks.data": "13c505eded2a528130101d0181dfb3ad", "templates/status.conf": "2adb889c41f469e42d53444ccd58e0a6", "spec/classes/apache_mod_security_spec.rb": "e5879ae7e2f8e3df2b484c93ee9e4810" }, "summary": "Manages apache.", "dependencies": [ { "version_requirement": ">= 1.0.0", "name": "evenup/logrotate" }, { "name": "evenup/beaver" }, { "version_requirement": ">= 3.2.0", "name": "puppetlabs/stdlib" }, { "version_requirement": ">= 0.2.0", "name": "ripienaar/concat" } ], "author": "Justin Lambert ", "project_page": "https://github.com/evenup/evenup-apache", "name": "evenup-apache" }, "tags": [ "apache", "vhost", "ajp", "centos", "CentOS" ], "file_uri": "/v3/files/evenup-apache-2.0.0.tar.gz", "file_size": 100667, "file_md5": "4744e2ac943f86f0a2a64196e6037996", "downloads": 435, "readme": "

What is it?

\n\n

A puppet module that installs apache with mod_evasive and mod_security \n(optional). This module has been written and tested on CentOS 6 and is \nprimarily used for configuring apache as a proxy for Tomcat via AJP and other\nservices via TCP, but it also has support for mod_passenger, mod_python, and\nmod_wsgi as well.

\n\n

Disabling mod_security by vhost, rule, or IP are provided. JSON logging for\nvhosts allowing easy import into logstash is available.

\n\n

Support for SSL certificates, password files, or any other sensitive \ninformation may be installed installed to a limted access directory through\napache::securefile.

\n\n

Monitoring by sensu is provided, but\nadditional monitoring solutions can easily be added.

\n\n

Usage:

\n\n

Generic apache install

\n\n
\n  class { 'apache': }\n
\n\n

Adding a NameVirtualHost on port 80:

\n\n
\n  apache::namevhost { '80': }\n
\n\n

Generic config files:

\n\n
\n  apache::cfgfile { 'myapp':\n    content   => template('mymodule/apache.cfg'),\n    filename  => 'myapp.cfg',\n  }\n
\n\n

Tomcat AJP proxy with http -> https redirect:

\n\n
\n  apache::vhost { 'example-http':\n    port            => 80,\n    serverName      => $::fqdn,\n    serverAlias     => [ 'example.com' ],\n    redirectToHTTPS => true,\n    logstash        => true,\n  }\n\n  apache::vhost { 'example-https':\n    serverName        => $::fqdn,\n    serverAlias       => [ 'example.com' ],\n    proxy             => true,\n    proxyTomcat       => true,\n    port              => 443,\n    rewrite_to_https  => true,\n    modSecOverrides   => true,\n    modSecRemoveById  => [ '11111' ],\n    logstash          => true,\n  }\n
\n\n

TCP proxy:

\n\n
\n  apache::vhost { 'newservice':\n    port              => 80,\n    serverName        => $::fqdn,\n    serverAlias       => [ 'newservice.example.com' ],\n    proxy             => true,\n    proxyThin         => true,\n    thinPort          => 3000,\n    thinNumServers    => 3,\n    modSecOverrides   => true,\n    modSecRemoveById  => [ '970901', '960015' ],\n    logstash          => true,\n  }\n
\n\n

Static content:

\n\n
\n  apache::vhost { 'example.com':\n    serverName        => $::fqdn,\n    serverAlias       => ['www.example.com', 'example.com'],\n    docroot           => '/var/www/html/example',\n    modSecOverrides   => true,\n    modSecRemoveById  => [ '970901', '960015' ];\n  }\n
\n\n

Known Issues:

\n\n

Only tested on CentOS 6

\n\n

TODO:

\n\n
\n\n

[ ] Make mod_evasive optional\n[ ] Make mod_status optional and configurable\n[ ] Allow disabling mod_security by file\n[ ] Improve documentation, complex module

\n\n

License:

\n\n
\n\n

Released under the Apache 2.0 licence

\n\n

Contribute:

\n\n
    \n
  • Fork it
  • \n
  • Create a topic branch
  • \n
  • Improve/fix (with spec tests)
  • \n
  • Push new topic branch
  • \n
  • Submit a PR
  • \n
\n
", "changelog": "
v2.0.0:\n  Initial public release\n
", "license": "
   Copyright 2013 EvenUp Inc\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n
", "created_at": "2013-04-18 09:20:47 -0700", "updated_at": "2013-04-18 09:20:47 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/evenup-apache-2.0.0", "version": "2.0.0" } ], "homepage_url": "https://github.com/evenup/evenup-apache", "issues_url": "https://github.com/evenup/evenup-apache/issues" }, { "uri": "/v3/modules/arusso-apache", "name": "apache", "downloads": 394, "created_at": "2013-05-30 00:07:14 -0700", "updated_at": "2014-01-03 04:26:57 -0800", "owner": { "uri": "/v3/users/arusso", "username": "arusso", "gravatar_id": "83bd473bcbb35670a605d686b75b378f" }, "current_release": { "uri": "/v3/releases/arusso-apache-0.0.5", "module": { "uri": "/v3/modules/arusso-apache", "name": "apache", "owner": { "uri": "/v3/users/arusso", "username": "arusso", "gravatar_id": "83bd473bcbb35670a605d686b75b378f" } }, "version": "0.0.5", "metadata": { "checksums": { "manifests/install.pp": "bd234c453a28a375d199659e284c0283", "LICENSE": "fbfe578caf7e0886e3aae63cdc7c27a3", "files/proxy_ajp.conf": "b6c78d22064262741cd2043ca18118b3", "CHANGELOG": "508b4de49447ead9c2771e633f9f618a", "manifests/init.pp": "436ec6abb3b5486147f637dda01ccf3c", "README.markdown": "860470aa9425e0d727899d7a19a9f8b9", "Modulefile": "143ff2309490d4712a998c009919dc59", "manifests/vhost.pp": "1b340eea011e71148e75b7f61ab496d7", "files/vhost-zzz-localhost.conf": "eab3019a920c1873a35adec3433a2e58", "templates/vhost.conf.erb": "f752acb15e1b91a7986d4c70224289f4", "manifests/mod/php.pp": "b0fc374c93b38cb886660ad021cb3519", "files/vhost-ssl.include": "c3fe7c8809fa145f729369329b5e13a3", "manifests/mod/proxy_ajp.pp": "7a56a005a6c27288e45bf59df7e30194", "files/php.conf": "50015ff8bb23090aae4f8556987c5e40", "manifests/service.pp": "6761b98da8568d5c7121ef686d1b06e1", "manifests/params.pp": "3683c268fcecfd02b6e36f391a5bb4f7", "manifests/namevirtualhost.pp": "55f023ac7c7c2aaad5380206f94845c6", "manifests/mod.pp": "c146e1d8db6b91185b62c8cb1364a523", "manifests/mod/ssl.pp": "7ffce2ab890f249392cb40379f3bbb7a", "files/vhost.include": "bfa9574669c87775e8a0d9c81d589db8", "templates/httpd.conf.erb.el6": "f9971fbf59ad1561ba397b11123b2b5b", "templates/httpd.conf.erb.el5": "bd10e344abee0f1abc1249097e6e1aad", "files/ssl.conf": "fc69477111daeb3d5376e6e388d5e63f", "manifests/config.pp": "eda2ba9bfa618f0f1ece01ab70f2ff35" }, "description": "This module manages the apache web server, foo.", "project_page": "UNKNOWN", "summary": "Apache Web Server Management", "source": "UNKNOWN", "dependencies": [ { "version_requirement": ">= 0.0.1", "name": "arusso/oski" }, { "version_requirement": ">= 2.6.0", "name": "puppetlabs/stdlib" } ], "author": "arusso", "version": "0.0.5", "name": "arusso-apache", "types": [ ], "license": "MIT License" }, "tags": [ "apache", "rhel" ], "file_uri": "/v3/files/arusso-apache-0.0.5.tar.gz", "file_size": 31798, "file_md5": "68f18e110ffa502fd76514e56dc440a7", "downloads": 162, "readme": "

apache Module

\n\n

This module manages apache, with emphasis on setting up virtual hosts and\nmanaging ssl.

\n\n

Examples

\n\n
  # configure the global apache\n  class { 'apache':\n    ensure       => running,\n    enable       => true,\n    server_admin => 'web@example.com',\n  }\n\n  # setup a vhost for www.example.com, mark it as the default vhost and\n  # add a few aliases.\n  apache::vhost { 'www.example.com':\n    is_default   => true,\n    server_name  => 'www.example.com',\n    server_alias => [ 'www-2.example.com',\n                      'blog.example.com' ],\n    ssl          => false,\n  }\n\n  # if server_name is not specified, the $namevar is used. So in this case\n  # server_name = 'www2.example.com'.  This one has ssl setup using a\n  # self-signed cert (since not intermedaite cert is provided).\n  apache::vhost { 'www2.example.com':\n    ssl          => true,\n    ssl_key_file => '/etc/pki/tls/private/private.key',\n    ssl_crt_file => '/etc/pki/tls/certs/public.crt',\n  }\n\n  # another ssl example, this time with an intermediate cert being provided\n  apache::vhost { 'www3.example.com:\n    ssl          => true,\n    ssl_key_file => '/etc/pki/tls/private/private.key',\n    ssl_crt_file => '/etc/pki/tls/certs/public.crt',\n    ssl_int_file => '/etc/pki/tls/certs/intermediate.crt',\n  }\n
\n\n

License

\n\n

See LICENSE file

\n\n

Copyright

\n\n

Copyright © 2013 The Regents of the University of California

\n\n

Contact

\n\n

Aaron Russo arusso@berkeley.edu

\n\n

Support

\n\n

Please log tickets and issues at the\nProjects site

\n
", "changelog": "
2013-10-07 Aaron Russo <arusso@berkeley.edu> - 0.0.5\n* Issue#9: Allow override of Ssl::Cert dependencies\n\n2013-10-03 Aaron Russo <arusso@berkeley.edu> - 0.0.4\n* Issue#6: Ability to enable/disable include files\n* Issue#8: Implemented unused document_root parameter in vhosts\n\n2013-09-19 Aaron Russo <arusso@berkeley.edu> - 0.0.3\n* Issue#1: adding NameVirtualHost lines\n* Issue#2: replaced priority parameter with is_default\n* Issue#3: removed version parameter from apache class\n* Issue#4: removed params_lookup function for default param values\n\n2013-06-02 Aaron Russo <arusso@berkeley.edu> - 0.0.2\n* updating docs for acct rename\n\n2013-05-28 Aaron Russo <arusso@berkeley.edu> - 0.0.1\n* Initial Release\n
", "license": "
The MIT License (MIT)\n\nCopyright (c) 2013 The Regents of the University of California\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n
", "created_at": "2013-10-07 14:22:59 -0700", "updated_at": "2013-10-07 14:22:59 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/arusso-apache-0.0.5", "version": "0.0.5" }, { "uri": "/v3/releases/arusso-apache-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/arusso-apache-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/arusso-apache-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/arusso23/puppet-apache", "issues_url": "https://github.com/arusso23/puppet-apache/issues" }, { "uri": "/v3/modules/JonTheNiceGuy-simple_apache_vhost", "name": "simple_apache_vhost", "downloads": 323, "created_at": "2013-05-21 06:33:36 -0700", "updated_at": "2014-01-03 03:44:37 -0800", "owner": { "uri": "/v3/users/JonTheNiceGuy", "username": "JonTheNiceGuy", "gravatar_id": "835f44d1c523f16a8669628c7dc02cbe" }, "current_release": { "uri": "/v3/releases/JonTheNiceGuy-simple_apache_vhost-0.0.2", "module": { "uri": "/v3/modules/JonTheNiceGuy-simple_apache_vhost", "name": "simple_apache_vhost", "owner": { "uri": "/v3/users/JonTheNiceGuy", "username": "JonTheNiceGuy", "gravatar_id": "835f44d1c523f16a8669628c7dc02cbe" } }, "version": "0.0.2", "metadata": { "name": "JonTheNiceGuy-simple_apache_vhost", "version": "0.0.2", "source": "UNKNOWN", "author": "JonTheNiceGuy", "license": "Apache License, Version 2.0", "summary": "This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes, enabling pretty URLs and custom base file paths", "description": "This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes. The provisioned vhost has in-built rewrite rules to point HTTP traffic to the HTTPS site, or to follow the same rules as the HTTPS component. The \"default\" rewrite rules point all unfound locations to the index.php in the stated path.", "project_page": "https://github.com/JonTheNiceGuy/JonTheNiceGuy-simple_apache_vhost", "dependencies": [ ], "types": [ ], "checksums": { "Modulefile": "7829c9d356394499bd793d2e953e9a29", "README.md": "cec6f52f318efc1d870a3ffe65460fb0", "files/ssl.key": "62d7a564eb636ac2f52eaebbb8e02d91", "files/ssl.pem": "116e0fa22379d361e1b95e1dfa9d6080", "manifests/init.pp": "4900deaa4943ba9f012bf48d7e1a4789", "templates/ports.erb": "9f741fa4f018b586178e83059f13993d", "templates/vhost.erb": "542c1cb7924ea236651f06ac60ca42e5" } }, "tags": [ "apache-httpd", "httpd", "apache", "debian", "ubuntu", "vhost", "tls", "ssl", "ssl-tls", "tls-ssl" ], "file_uri": "/v3/files/JonTheNiceGuy-simple_apache_vhost-0.0.2.tar.gz", "file_size": 5965, "file_md5": "d02214349238bfee321fb2c8895ffdc1", "downloads": 293, "readme": "

simple_apache_vhost

\n\n

Table of Contents

\n\n
    \n
  1. Overview
  2. \n
  3. Module Description
  4. \n
  5. Setup and Usage\n\n
  6. \n
  7. License
  8. \n
  9. Support
  10. \n
  11. Limitations
  12. \n
  13. Release Notes
  14. \n
\n\n

Overview

\n\n

This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes, enabling pretty URLs and custom base file paths.

\n\n

Module Description

\n\n

This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes. The provisioned vhost has in-built rewrite rules to point HTTP traffic to the HTTPS site, or to follow the same rules as the HTTPS component. The "default" rewrite rules point all unfound locations to the index.php in the stated path.

\n\n

Setup and Usage

\n\n

What simple_apache_vhost affects:

\n\n
    \n
  • Configuration files and directories (created and written to)
  • \n
  • Packages, Services and Configuration files
  • \n
  • Apache Modules
  • \n
  • Virtual Hosts
  • \n
  • Listened-to Ports
  • \n
\n\n

Basic Setup

\n\n

To install simple_apache_vhost with all the default options

\n\n
class { 'simple_apache_vhost': }\n
\n\n

The defaults are determined by your operating system. Currently the only set \nof default options which have been configured are for the Debian/Ubuntu \nsystem, but migration should be very straightforward.

\n\n

Non Standard ports

\n\n

To install simple_apache_vhost with non-standard ports and a provisioned \nSSL/TLS certificate

\n\n
class { 'simple_apache_vhost':\n  http_port  => '1234',\n  https_port => '12345',\n  ssl_key    => '/tmp/ssl/key1',\n  ssl_pem    => '/tmp/ssl/pem1'\n}\n
\n\n

Changing the base path

\n\n

If you've got a web application (such as Zend or similar) and want to move your\nnormal web path to /var/www/public, you can do this by setting the base_path\nvalue. You can also prevent auto-forwarding of traffic from the HTTP service to\nthe HTTPS service by changing the redirect_to_ssl to false.

\n\n
class { 'simple_apache_vhost':\n  base_path       => "/var/www/public",\n  redirect_to_ssl => false\n}\n
\n\n

License

\n\n

Copyright (C) 2013 Jon Spriggs

\n\n

Jon can be contacted at: jon@sprig.gs

\n\n

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

\n\n

http://www.apache.org/licenses/LICENSE-2.0

\n\n

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.

\n\n

Support

\n\n

Please raise issues, changes and pull requests at https://github.com/JonTheNiceGuy/JonTheNiceGuy-simple_apache_vhost

\n\n

Limitations

\n\n

Currently this code only supports Debian and Ubuntu.

\n\n

Release Notes

\n\n

This release note refers to the last release only. For previous notes, please see the commit log

\n\n
    \n
  • This is the initial release
  • \n
\n
", "changelog": null, "license": null, "created_at": "2013-05-27 05:25:05 -0700", "updated_at": "2013-05-27 05:25:05 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/JonTheNiceGuy-simple_apache_vhost-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/JonTheNiceGuy-simple_apache_vhost-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/JonTheNiceGuy/JonTheNiceGuy-simple_apache_vhost", "issues_url": "https://github.com/JonTheNiceGuy/JonTheNiceGuy-simple_apache_vhost/issues" }, { "uri": "/v3/modules/thias-apache_httpd", "name": "apache_httpd", "downloads": 2358, "created_at": "2012-03-07 17:50:35 -0800", "updated_at": "2014-01-06 05:13:17 -0800", "owner": { "uri": "/v3/users/thias", "username": "thias", "gravatar_id": "20efddb3bfbb60822cf750b87b9ed3e9" }, "current_release": { "uri": "/v3/releases/thias-apache_httpd-0.4.2", "module": { "uri": "/v3/modules/thias-apache_httpd", "name": "apache_httpd", "owner": { "uri": "/v3/users/thias", "username": "thias", "gravatar_id": "20efddb3bfbb60822cf750b87b9ed3e9" } }, "version": "0.4.2", "metadata": { "project_page": "https://github.com/thias/puppet-apache_httpd", "license": "Apache 2.0", "source": "git://github.com/thias/puppet-apache_httpd", "types": [ ], "description": "Install and enable the Apache httpd web server and manage its\n configuration with snippets.", "version": "0.4.2", "summary": "Apache HTTP Daemon installation and configuration", "name": "thias-apache_httpd", "author": "Matthias Saou", "checksums": { "templates/conf.d/ssl.conf.orig": "41f59421026a473a0378c58d539069c6", "files/welcome.conf": "127e668bbf50be1ec582418b1b47e5bd", "tests/init.pp": "1caed8c1310cb3eda308ddf7b42dcf9f", "files/trace.inc": "00b0ef3384ae0ae23641de16a4f409c2", "LICENSE": "99219472697a01561e7630d63aaecdc1", "ChangeLog": "0db4a33f6ab2eb9b0ce9a242b895a823", "manifests/file.pp": "8f8a71da792997d0afb1166f5203aa80", "manifests/service/base.pp": "2279d654b21e3bf07fad3019ea1e5169", "Modulefile": "18fc0f67cd149a96ed4662d0751a8f6c", "templates/conf.d/ssl.conf": "187df1d47d7ac4ab6b2abb9624949d9b", "templates/conf/httpd.conf.erb": "4edf27e8e00ab7bc2989042f62ccf585", "manifests/service/ssl.pp": "bccb811431ae834e4e063c417e0b1e38", "manifests/install.pp": "f91474cc2c29623f7f0ec9dcb1d364cf", "README.md": "0c3b8beda12164ae05ebce1f0410546c", "manifests/init.pp": "6aa9d1d12ed8e97ca9f1793a454ce98f", "templates/etc/logrotate.erb": "ab4f8cd53d473c83aa5aff20d726340e", "files/proxy_ajp.conf": "c7d462c30779b0270a141984ad70e70c", "tests/file.pp": "fe34321a9d1997677b02fa20751ab279", "templates/conf/httpd.conf.orig": "27a5c8d9e75351b08b8ca1171e8a0bbd", "templates/etc/sysconfig.erb": "5e16a682e88b07c38a4baab936630e5b", "files/proxy_ajp.conf.orig": "8b0da169a5f7963b6bf28f9d8de7785f" }, "dependencies": [ ] }, "tags": [ "webservers", "apache", "rhel", "CentOS", "httpd" ], "file_uri": "/v3/files/thias-apache_httpd-0.4.2.tar.gz", "file_size": 33889, "file_md5": "461bc230b1a881ecf90d09b94780330d", "downloads": 311, "readme": "

puppet-apache_httpd

\n\n

Overview

\n\n

Install the Apache HTTP daemon and manage its main configuration as well as\nadditional configuration snippets.

\n\n

The module is very Red Hat Enterprise Linux focused, as the defaults try to\nchange everything in ways which are typical for RHEL.

\n\n
    \n
  • apache_httpd : Main definition for the server and its main configuration.
  • \n
  • apache_httpd::file : Definition to manage additional configuration files.
  • \n
\n\n

The main apache_httpd isn't a class in order to be able to set global\ndefaults for its parameters, which is only possible with definitions. The\n$name can be either prefork or worker.

\n\n

This module disables TRACE and TRACK methods by default, which is best practice\n(using rewrite rules, so only when it is enabled).

\n\n

The apache::service:: prefixed classes aren't meant to be used standalone,\nand are included as needed by the main class.

\n\n

Examples

\n\n

Sripped down instance running as the git user for the cgit cgi :

\n\n
apache_httpd { 'worker':\n    modules   => [ 'mime', 'setenvif', 'alias', 'proxy', 'cgi' ],\n    keepalive => 'On',\n    user      => 'git',\n    group     => 'git',\n}\n
\n\n

Complete instance with https, a typical module list ready for php and the\noriginal Red Hat welcome page disabled :

\n\n
apache_httpd { 'prefork':\n    ssl     => true,\n    modules => [\n        'auth_basic',\n        'authn_file',\n        'authz_host',\n        'authz_user',\n        'mime',\n        'negotiation',\n        'dir',\n        'alias',\n        'rewrite',\n        'proxy',\n    ],\n    welcome => false,\n}\n
\n\n

Example entry for site.pp to change some of the defaults globally :

\n\n
Apache_httpd {\n    extendedstatus  => 'On',\n    serveradmin     => 'root@example.com',\n    serversignature => 'Off',\n}\n
\n\n

Configuration snippets can be added from anywhere in your manifest, based on\nfiles or templates, and will automatically reload httpd when changed :

\n\n
apache_httpd::file { 'www.example.com.conf':\n    source => 'puppet:///modules/mymodule/httpd.d/www.example.com.conf',\n}\napache_httpd::file { 'global-alias.conf':\n    content => 'Alias /whatever /var/www/whatever',\n}\napache_httpd::file { 'myvhosts.conf':\n    content => template('mymodule/httpd.d/myvhosts.conf.erb'),\n}\n
\n\n

Note that when adding or removing modules, a reload might not be sufficient,\nin which case you will have to perform a full restart by other means.

\n
", "changelog": "
2013-10-01 - 0.4.2\n* Add global servername parameter.\n\n2013-04-19 - 0.4.1\n* Use @varname syntax in templates to silence puppet 3.2 warnings.\n\n2013-03-08 - 0.4.0\n* Split module out to its own repo.\n* Update README and switch to markdown.\n* Cosmetic cleanups.\n\n2012-04-26 - 0.3.2\n* Fix logrotate file, the PID path was wrong for most systems (thomasvs).\n* Make sure the default logrotate file is identical to the original RHEL6 one.\n\n2012-04-20 - 0.3.1\n* Support multiple listens and setting namevirtualhosts (Jared Curtis).\n\n2012-03-07 - 0.3.0\n* Rename from apache-httpd to apache_httpd to conform with puppetlabs docs.\n* Update tests to cover more cases.\n* Include LICENSE since the module will be distributed individually.\n* Update included documentation details.\n\n
", "license": "
Copyright (C) 2011-2013 Matthias Saou\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n
", "created_at": "2013-10-01 07:45:55 -0700", "updated_at": "2013-10-01 07:45:55 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/thias-apache_httpd-0.4.2", "version": "0.4.2" }, { "uri": "/v3/releases/thias-apache_httpd-0.4.1", "version": "0.4.1" }, { "uri": "/v3/releases/thias-apache_httpd-0.3.2", "version": "0.3.2" }, { "uri": "/v3/releases/thias-apache_httpd-0.3.1", "version": "0.3.1" }, { "uri": "/v3/releases/thias-apache_httpd-0.3.0", "version": "0.3.0" } ], "homepage_url": "https://github.com/thias/puppet-apache_httpd", "issues_url": "https://github.com/thias/puppet-apache_httpd/issues" }, { "uri": "/v3/modules/mstanislav-apache_yum", "name": "apache_yum", "downloads": 624, "created_at": "2011-02-01 21:04:34 -0800", "updated_at": "2014-01-05 10:16:15 -0800", "owner": { "uri": "/v3/users/mstanislav", "username": "mstanislav", "gravatar_id": "9eaada9384c46142a8fd246f11cb9bef" }, "current_release": { "uri": "/v3/releases/mstanislav-apache_yum-1.0.0", "module": { "uri": "/v3/modules/mstanislav-apache_yum", "name": "apache_yum", "owner": { "uri": "/v3/users/mstanislav", "username": "mstanislav", "gravatar_id": "9eaada9384c46142a8fd246f11cb9bef" } }, "version": "1.0.0", "metadata": { "types": [ ], "name": "mstanislav-apache_yum", "description": "UNKNOWN", "author": "mstanislav", "summary": "UNKNOWN", "license": "UNKNOWN", "source": "UNKNOWN", "checksums": { "templates/ssl.conf.erb": "a6c5fca7412e773be366afbc0638c0d9", "files/passenger.conf": "117bf6245f9b4b15e4930769e9417f9f", "files/httpd.conf": "b056fcfb38311bf3c743b541d3838c83", "Modulefile": "874b94f5ea13aaea881ef5b4f84a62d6", "manifests/init.pp": "84852639e7a2a9767d91f1f908f78633" }, "dependencies": [ ], "project_page": "UNKNOWN", "version": "1.0.0" }, "tags": [ "apache", "passenger", "HTTP", "apache2", "httpd" ], "file_uri": "/v3/files/mstanislav-apache_yum-1.0.0.tar.gz", "file_size": 3873, "file_md5": "79de057eac0feb265766c908e6b89aaa", "downloads": 624, "readme": null, "changelog": null, "license": null, "created_at": "2011-02-01 21:05:00 -0800", "updated_at": "2013-03-04 14:57:47 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/mstanislav-apache_yum-1.0.0", "version": "1.0.0" } ], "homepage_url": "https://github.com/mstanislav/Puppet-Modules", "issues_url": "https://github.com/mstanislav/Puppet-Modules/issues" }, { "uri": "/v3/modules/pdxmph-apache_sites", "name": "apache_sites", "downloads": 460, "created_at": "2012-11-13 13:31:19 -0800", "updated_at": "2014-01-03 01:31:14 -0800", "owner": { "uri": "/v3/users/pdxmph", "username": "pdxmph", "gravatar_id": "1d6922c678360456f3bb48f637b092dc" }, "current_release": { "uri": "/v3/releases/pdxmph-apache_sites-0.0.1", "module": { "uri": "/v3/modules/pdxmph-apache_sites", "name": "apache_sites", "owner": { "uri": "/v3/users/pdxmph", "username": "pdxmph", "gravatar_id": "1d6922c678360456f3bb48f637b092dc" } }, "version": "0.0.1", "metadata": { "description": "UNKNOWN", "author": "pdxmph", "project_page": "UNKNOWN", "source": "UNKNOWN", "checksums": { "Modulefile": "5a51e5f14a40ae51bfcb8b9597d44f9a", "lib/puppet/type/a2site.rb": "b1f3dc67d3d78caa15e9c4425fa00ed3", "lib/puppet/provider/a2site/a2site.rb": "1ac52ed3db316126bfb7c7792aaea944", "LICENSE": "34425b769c76d908f0389558cb49e7ef", "README.markdown": "5d3f2aa253cebed8a96b4e478acaf8a2" }, "version": "0.0.1", "name": "pdxmph-puppet-apache-sites", "dependencies": [ ], "types": [ { "doc": "Manage Apache 2 sites on Debian and Ubuntu", "parameters": [ { "doc": "The name of the site to be managed", "name": "name" } ], "providers": [ { "doc": "Manage Apache 2 sites on Debian and Ubuntu\n\nRequired binaries: `a2ensite`, `a2dissite`. Default for `operatingsystem` == `debian, ubuntu`.", "name": "a2site" } ], "properties": [ { "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`.", "name": "ensure" } ], "name": "a2site" } ], "summary": "UNKNOWN", "license": "Apache License, Version 2.0" }, "tags": [ "apache", "ubuntu", "debian", "a2ensite", "a2dissite" ], "file_uri": "/v3/files/pdxmph-apache_sites-0.0.1.tar.gz", "file_size": 1746, "file_md5": "58ecc25414bf0acf7c872236a1621354", "downloads": 460, "readme": "

Puppet Apache Module Type

\n\n

This type enables and disables Apache sites for Debian and Ubuntu.

\n\n

License: GPLv3

\n\n

Requirements

\n\n
    \n
  • NA
  • \n
\n\n

Usage

\n\n
a2site { "site_name":\n  ensure => present,\n}\n
\n
", "changelog": null, "license": "
This program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software\nFoundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n
", "created_at": "2012-11-13 13:35:43 -0800", "updated_at": "2013-03-04 15:03:08 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/pdxmph-apache_sites-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/pdxmph/puppet-apache-sites", "issues_url": "https://github.com/pdxmph/puppet-apache-sites/issues" }, { "uri": "/v3/modules/ikoula-wp_apache_nfs", "name": "wp_apache_nfs", "downloads": 180, "created_at": "2013-09-19 09:12:31 -0700", "updated_at": "2014-01-03 03:48:57 -0800", "owner": { "uri": "/v3/users/ikoula", "username": "ikoula", "gravatar_id": "86cf1833bca0ad430773a958c46906ec" }, "current_release": { "uri": "/v3/releases/ikoula-wp_apache_nfs-0.0.1", "module": { "uri": "/v3/modules/ikoula-wp_apache_nfs", "name": "wp_apache_nfs", "owner": { "uri": "/v3/users/ikoula", "username": "ikoula", "gravatar_id": "86cf1833bca0ad430773a958c46906ec" } }, "version": "0.0.1", "metadata": { "license": "GPL Version 2.0", "author": "ikoula", "types": [ ], "source": "UNKNOWN", "project_page": "https://github.com/ikoula/cloudstack", "dependencies": [ ], "description": "Module for Apache NFS Wordpress CloudStack by Ikoula instance deployment", "name": "ikoula/wp_apache_nfs", "checksums": { "README": "80a3f2a0ba208a284dbb1d3be6fb6682", "Modulefile": "f5ecfa4bed8afdb1322a101a9c48d146", "files/etc.apache2.sites-available.default-ssl": "08cca243359d2252a53e2784a95bdd38", "files/etc.apache2.sites-available.default": "54dbdf4ce45ab4fbd5765b5599811d17", "spec/spec_helper.rb": "a55d1e6483344f8ec6963fcb2c220372", "manifests/init.pp": "30cd82f8be28c885c629a68702d1d9e9", "tests/init.pp": "3ca07dfe7f9baf465bc2f4bc929723c3" }, "version": "0.0.1", "summary": "Module for Apache PHP and a NFS mount of Wordpress Installation CloudStack by Ikoula instance deployment" }, "tags": [ "apache", "wordpress", "nfs", "cloudstack", "ikoula" ], "file_uri": "/v3/files/ikoula-wp_apache_nfs-0.0.1.tar.gz", "file_size": 5722, "file_md5": "af64e1ca75ca7ad44f9069e4bbb44bf5", "downloads": 180, "readme": "
wp_apache_nfs\n\nThis is the wp_apache_nfs module.\n\nLicense\n-------\n\nGPLv2\n\nContact\n-------\ncontribATikoula.com\n\nSupport\n-------\n\nOur GitHub : https://github.com/ikoula/cloudstack\n\n
", "changelog": null, "license": null, "created_at": "2013-09-19 09:12:42 -0700", "updated_at": "2013-09-19 09:12:42 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/ikoula-wp_apache_nfs-0.0.1", "version": "0.0.1" } ], "homepage_url": "https://github.com/ikoula/cloudstack", "issues_url": "" }, { "uri": "/v3/modules/fliplap-apache_modules_sles11", "name": "apache_modules_sles11", "downloads": 437, "created_at": "2010-10-14 22:25:21 -0700", "updated_at": "2014-01-03 00:08:56 -0800", "owner": { "uri": "/v3/users/fliplap", "username": "fliplap", "gravatar_id": "6889df128c17cdc421d0588820dde6d4" }, "current_release": { "uri": "/v3/releases/fliplap-apache_modules_sles11-1.0.1", "module": { "uri": "/v3/modules/fliplap-apache_modules_sles11", "name": "apache_modules_sles11", "owner": { "uri": "/v3/users/fliplap", "username": "fliplap", "gravatar_id": "6889df128c17cdc421d0588820dde6d4" } }, "version": "1.0.1", "metadata": { "dependencies": [ ], "name": "jamtur01-puppet-apache-modules", "author": "", "license": "", "version": "1.0.1", "checksums": { "LICENSE": "34425b769c76d908f0389558cb49e7ef", "lib/puppet/provider/a2mod/a2mod.rb": "557d39cad0925fcc65ca82fa1ab19125", "README.markdown": "4f9267651f77d3b1e6b099343ed5f150", "lib/puppet/type/a2mod.rb": "a149f8ebde2940403e94467e2417b482", "Modulefile": "b8e2e077ff36680896707952146d4164" }, "types": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Suse Enterprise Linux 11 - based on jamtur01-puppet-apache-modules", "parameters": [ { "name": "name", "doc": "The name of the module to be managed" } ], "providers": [ { "name": "a2mod", "doc": "Manage Apache 2 modules on Suse Enterprise Linux Server 11 Required binaries: ``a2dismod``, ``a2enmod``. Default for ``operatingsystem`` == ``SLES``. " } ], "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are ``present``, ``absent``." } ] } ], "source": "" }, "tags": [ ], "file_uri": "/v3/files/fliplap-apache_modules_sles11-1.0.1.tar.gz", "file_size": 1796, "file_md5": "099029f20cc7b9b535774dadc7315860", "downloads": 437, "readme": "

Puppet Apache Module Type

\n\n

This type loads and unloads Apache modules for SUSE (SLES 11 tested)

\n\n

License: GPLv3

\n\n

Requirements

\n\n
    \n
  • NA
  • \n
\n\n

Usage

\n\n
a2mod { "module":\n  ensure => present,\n}\n
\n
", "changelog": null, "license": "
This program and entire repository is free software; you can\nredistribute it and/or modify it under the terms of the GNU\nGeneral Public License as published by the Free Software\nFoundation; either version 2 of the License, or any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n
", "created_at": "2010-10-14 22:38:20 -0700", "updated_at": "2013-03-04 14:57:42 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/fliplap-apache_modules_sles11-1.0.1", "version": "1.0.1" } ], "homepage_url": "", "issues_url": "" }, { "uri": "/v3/modules/jamtur01-httpauth", "name": "httpauth", "downloads": 18293, "created_at": "2010-05-31 23:48:04 -0700", "updated_at": "2014-01-06 11:03:55 -0800", "owner": { "uri": "/v3/users/jamtur01", "username": "jamtur01", "gravatar_id": "31cc2100279326dd6148a7e163692097" }, "current_release": { "uri": "/v3/releases/jamtur01-httpauth-0.0.2", "module": { "uri": "/v3/modules/jamtur01-httpauth", "name": "httpauth", "owner": { "uri": "/v3/users/jamtur01", "username": "jamtur01", "gravatar_id": "31cc2100279326dd6148a7e163692097" } }, "version": "0.0.2", "metadata": { "types": [ { "providers": [ { "doc": "Manage HTTP Basic and Digest authentication files", "name": "httpauth" } ], "properties": [ { "doc": " Valid values are `present`, `absent`.", "name": "ensure" } ], "doc": "Manage HTTP Basic or Digest password files. httpauth { 'user': file => '/path/to/password/file', password => 'password', mechanism => basic, ensure => present, } ", "name": "httpauth", "parameters": [ { "doc": "The name of the user to be managed.", "name": "name" }, { "doc": "The HTTP password file to be managed. If it doesn't exist it is created.", "name": "file" }, { "doc": "The password in plaintext.", "name": "password" }, { "doc": "The realm - defaults to nil and mainly used for Digest authentication.", "name": "realm" }, { "doc": "The authentication mechanism to use - either basic or digest. Default to basic. Valid values are `basic`, `digest`.", "name": "mechanism" } ] } ], "author": "puppet", "dependencies": [ ], "license": "Apache 2.0", "summary": "Puppet type for managing HTTP Basic and Digest auth files, a la htpasswd.", "project_page": "https://github.com/jamtur01/puppet-httpauth", "description": "UNKNOWN", "source": "UNKNOWN", "checksums": { "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "lib/puppet/type/httpauth.rb": "beab42ad1086202db040c72bc6783494", "lib/puppet/provider/httpauth/httpauth.rb": "c71417aa66ca270ffa501f779f87de62", "spec/unit/type/httpauth.rb": "a42a6d3b57debd7fca90d832ba7094a7", "Rakefile": "871849fbd09bcc076f4ab87ff750ddf6", "README.markdown": "1a4288364496bddee1cbd102099fecf1", "Modulefile": "eaba4cd27b76a1c9787f56d86d5305a5", "spec/spec_helper.rb": "f6e809f57723ea8a2bd121ad99bfce4c" }, "version": "0.0.2", "name": "puppet-httpauth" }, "tags": [ "apache", "HTTP", "basic", "digest", "authentication", "auth", "htpasswd", "htdigest" ], "file_uri": "/v3/files/jamtur01-httpauth-0.0.2.tar.gz", "file_size": 3411, "file_md5": "b3868fcbcf52e3740cb4becf93838072", "downloads": 18072, "readme": "

Puppet HTTP Authentication type

\n\n

This provides a HTTP Authentication type for Puppet that support Basic and Digest authentication.

\n\n

Copyright - James Turnbull james@lovedthanlost.net

\n\n

License: GPLv3

\n\n

Thanks to John Ferlito and JKur (https://github.com/jkur) for patches.

\n\n

Requirements

\n\n
    \n
  • webrick
  • \n
\n\n

Usage

\n\n
httpauth { 'user':\n  file     => '/path/to/password/file',\n  password => 'password',\n  realm => 'realm',\n  mechanism => basic,\n  ensure => present,\n}\n
\n
", "changelog": null, "license": null, "created_at": "2012-06-06 01:07:36 -0700", "updated_at": "2013-03-04 14:57:26 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/jamtur01-httpauth-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/jamtur01-httpauth-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://github.com/jamtur01/puppet-httpauth", "issues_url": null }, { "uri": "/v3/modules/puppetlabs-passenger", "name": "passenger", "downloads": 9895, "created_at": "2010-05-21 06:58:19 -0700", "updated_at": "2014-01-06 14:24:15 -0800", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" }, "current_release": { "uri": "/v3/releases/puppetlabs-passenger-0.2.0", "module": { "uri": "/v3/modules/puppetlabs-passenger", "name": "passenger", "owner": { "uri": "/v3/users/puppetlabs", "username": "puppetlabs", "gravatar_id": "fdd009b7c1ec96e088b389f773e87aec" } }, "version": "0.2.0", "metadata": { "name": "puppetlabs-passenger", "version": "0.2.0", "summary": "Puppet module for Passenger", "author": "puppetlabs", "description": "Module for Passenger configuration", "dependencies": [ { "name": "puppetlabs/apache", "version_requirement": ">= 0.0.3" }, { "name": "puppetlabs/ruby", "version_requirement": ">= 0.0.1" }, { "name": "puppetlabs/stdlib" } ], "types": [ ], "checksums": { ".bundle/config": "7f1c988748783d2a8d455376eed1470c", ".fixtures.yml": "41ba6344fbcf0f472b874c12ad1cc627", ".nodeset.yml": "8d1b7762d4125ce53379966a1daf355c", ".travis.yml": "e82b0189a9f6f6a508a1f93f910b8f10", "CHANGELOG": "04fc8176a68c796105ee2fd5fa9c6f14", "Gemfile": "aba4d00d83671fab4f9d8c8289ba00f1", "Gemfile.lock": "695cb2e86551d8a98a43b390b7de7762", "LICENSE": "4509849dc8e58abcb92d4e1faacb588b", "Modulefile": "382022ec106d71e1203354f568b04022", "README.md": "0d32ae2a95d9a380ebf4c3bea7e6acaa", "Rakefile": "0428ea3759a4692c91604396c406a9c1", "manifests/compile.pp": "eaa9c817086ca92171e5d0fc856f75c8", "manifests/config.pp": "0afc9649d841d9fb4c471aaaab4bcfb9", "manifests/init.pp": "7003de5e1bf2cc1a33192e1af8862f74", "manifests/install.pp": "eac2484a8a3606b6ca53e3ff58bb78e2", "manifests/params.pp": "c11f1497285905df60ac54654e9fb9ad", "spec/classes/passenger_spec.rb": "7e18ffaacabe932f2af294bea2569941", "spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper_system.rb": "9389463e478bfc517e3176efbb1121db", "spec/system/basic_spec.rb": "428a3c3e140bb442ebf878a838dba83d", "spec/system/class_spec.rb": "f461c73ed2d3e4305fdf8486fe8df16a", "templates/passenger-conf.erb": "56f4e3052da62d6d86d0530780d32411", "templates/passenger-enabled.erb": "c00ba3dc84a5676e70d0b8828ece50d3", "templates/passenger-load.erb": "97e00ed94f9274112bddc224ae76bf64", "tests/init.pp": "ed442a24364697ff755ec0399fb4a0a5" }, "source": "git://github.com/puppetlabs/puppetlabs-passenger.git", "project_page": "https://github.com/puppetlabs/puppetlabs-passenger", "license": "Apache 2.0" }, "tags": [ "apache", "passenger", "rails", "rack" ], "file_uri": "/v3/files/puppetlabs-passenger-0.2.0.tar.gz", "file_size": 8700, "file_md5": "5d93ddc97a8feb788b35ccd419a20646", "downloads": 1378, "readme": "

passenger

\n\n

Overview

\n\n

The Passenger module allows easy configuration and management of Phusion Passenger.

\n\n

Module Description

\n\n

The Passenger module lets you run Rails or Rack inside Apache with ease. Utilizing Passenger, an application server for Ruby (Rack) and Python (WSGI) apps, the Passenger module enables quick configuration of Passenger for Apache.

\n\n

Setup

\n\n

What Passenger affects:

\n\n
    \n
  • Apache
  • \n
  • installs packages on chosen nodes
  • \n
  • package/service/configuration files for Passenger
  • \n
\n\n

Beginning with Passenger

\n\n

Install and begin managing Passenger on a node by declaring the class in your node definition:

\n\n
node default {\n  class {'passenger': }\n}\n
\n\n

This will establish Passenger on your node with sane default values. However, you can manually set the parameter values:

\n\n
node default {\n  class {'passenger':\n    passenger_version      => '2.2.11',\n    passenger_provider     => 'gem',\n    passenger_package      => 'passenger',\n    gem_path               => '/var/lib/gems/1.8/gems',\n    gem_binary_path        => '/var/lib/gems/1.8/bin',\n    passenger_root         => '/var/lib/gems/1.8/gems/passenger-2.2.11'\n    mod_passenger_location => '/var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so',\n  }\n}\n
\n\n

Usage

\n\n

The passenger class has a set of configurable parameters that allow you to control aspects of Passenger's installation.

\n\n

Parameters within passenger

\n\n

passenger_version

\n\n

The Version of Passenger to be installed

\n\n

gem_path

\n\n

The path to rubygems on your system

\n\n

gem_binary_path

\n\n

Path to Rubygems binaries on your system

\n\n

mod_passenger_location

\n\n

Path to Passenger's mod_passenger.so file

\n\n

passenger_provider

\n\n

The package provider to use for the system

\n\n

passenger_package

\n\n

The name of the Passenger package

\n\n

Implementation

\n\n

This module operates by compiling Ruby gems on the system being managed.

\n\n

Limitations

\n\n

This module was developed and tested against RHEL and Debian based systems (Centos, Fedora, Redhat, Debian, Ubuntu). This module may require you to specify default parameter values to accommodate other distributions.

\n\n

Development

\n\n

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.

\n\n

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.

\n\n

You can read the complete module contribution guide on the Puppet Labs wiki.

\n\n

Release Notes

\n\n

0.0.4 Release

\n\n
    \n
  • Remove puppetlabs-gcc dependency
  • \n
  • Add package dependencies for Passenger 3.0
  • \n
  • Re-order resources (removing chaining syntax)
  • \n
\n
", "changelog": "
* 2013-11-20 0.2.0\n\nSummary:\n\nThis release refactors the module fairly expensively, and adds Passenger 4\nsupport.\n\nFeatures:\n- Parameters in `passenger` class:\n - `package_name`: Name of the passenger package.\n - `package_ensure`: Ensure state of the passenger package.\n - `package_provider`: Provider to use to install passenger.\n - `passenger_root`: Root directory for passenger.\n\n\n* 2013-07-31 0.1.0\n\nSummary:\n\nSeveral changes over the last year to improve compatibility against\nmodern distributions, improvements to make things more robust and\nsome fixes for Puppet 3.\n\nFeatures:\n- Parameters in `passenger` class:\n - `passenger_ruby`: Allows you to customize what ruby binary is used.\n\nBugfixes:\n- Ubuntu compatibility fixes.\n- Debian 6+ compatibility fixes.\n- Fixes against newer puppetlabs-apache.\n- Properly qualify variables.\n- Restart apache if passenger configuration changes.\n- Don't try to load unless compilation stage was successful.\n
", "license": "
Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-11-20 11:12:55 -0800", "updated_at": "2013-11-20 11:12:55 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/puppetlabs-passenger-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/puppetlabs-passenger-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/puppetlabs-passenger-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/puppetlabs-passenger-0.0.3", "version": "0.0.3" } ], "homepage_url": "https://github.com/puppetlabs/puppetlabs-passenger", "issues_url": "https://tickets.puppetlabs.com/browse/MODULES" }, { "uri": "/v3/modules/domcleal-augeasproviders", "name": "augeasproviders", "downloads": 9077, "created_at": "2012-03-04 14:54:18 -0800", "updated_at": "2014-01-06 13:35:36 -0800", "owner": { "uri": "/v3/users/domcleal", "username": "domcleal", "gravatar_id": "28cbd62b9edb6946b44807356de82d7b" }, "current_release": { "uri": "/v3/releases/domcleal-augeasproviders-1.0.2", "module": { "uri": "/v3/modules/domcleal-augeasproviders", "name": "augeasproviders", "owner": { "uri": "/v3/users/domcleal", "username": "domcleal", "gravatar_id": "28cbd62b9edb6946b44807356de82d7b" } }, "version": "1.0.2", "metadata": { "name": "domcleal-augeasproviders", "version": "1.0.2", "source": "git://github.com/hercules-team/augeasproviders", "author": "Dominic Cleal, Raphael Pinson", "license": "Apache 2.0", "summary": "Alternative Augeas-based providers for Puppet", "description": "This module provides alternative providers for core Puppet types using the Augeas configuration API library.", "project_page": "http://github.com/hercules-team/augeasproviders", "dependencies": [ ], "types": [ { "name": "sshd_config", "doc": "Manages settings in an OpenSSH sshd_config file.\n\nThe resource name is used for the setting name, but if the `condition` is\ngiven, then the name can be something else and the `key` given as the name\nof the setting.\n\nSubsystem entries are not managed by this type. There is a specific `sshd_config_subsystem` type to manage these entries.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "Value to change the setting to. The follow parameters take an array of values:\n \n- MACs;\n- AcceptEnv;\n- AllowGroups;\n- AllowUsers;\n- DenyGroups;\n- DenyUsers.\n \nAll other parameters take a string. When passing an array to other parameters, only the first value in the array will be considered." } ], "parameters": [ { "name": "name", "doc": "The name of the setting, or a unique string if `condition` given." }, { "name": "key", "doc": "Overrides setting name to prevent resource conflicts if `condition` is\ngiven." }, { "name": "target", "doc": "The file in which to store the settings, defaults to\n`/etc/ssh/sshd_config`." }, { "name": "condition", "doc": "Match group condition for the entry,\nin the format:\n\n sshd_config { 'PermitRootLogin':\n value => 'without-password',\n condition => 'Host example.net',\n }\n\nThe value can contain multiple conditions, concatenated together with\nwhitespace. This is used if the `Match` block has multiple criteria.\n\n condition => 'Host example.net User root'\n " } ], "providers": [ { "doc": "Uses Augeas API to update an sshd_config parameter" } ] }, { "name": "sysctl", "doc": "Manages entries in /etc/sysctl.conf.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "val", "doc": "An alias for 'value'. Maintains interface compatibility with the traditional ParsedFile sysctl provider. If both are set, 'value' will take precedence over 'val'." }, { "name": "value", "doc": "Value to change the setting to. Settings with multiple values (such as net.ipv4.tcp_mem) are represented as a single whitespace separated string." }, { "name": "comment", "doc": "Text to be stored in a comment immediately above the entry. It will be automatically prepended with the name of the setting in order for the provider to know whether it controls the comment or not." } ], "parameters": [ { "name": "name", "doc": "The name of the setting, e.g. net.ipv4.ip_forward" }, { "name": "target", "doc": "The file in which to store the settings, defaults to\n `/etc/sysctl.conf`." }, { "name": "apply", "doc": "Whether to apply the value using the sysctl command. Valid values are `true`, `false`." } ], "providers": [ { "doc": "Uses Augeas API to update sysctl settings\n\nRequired binaries: `sysctl`." } ] }, { "name": "apache_setenv", "doc": "Manages SetEnv entries in a Apache config", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "The value to set it to" } ], "parameters": [ { "name": "name", "doc": "The variable name to set" }, { "name": "target", "doc": "The config file to use" } ], "providers": [ { "doc": "Use Augeas API to update SetEnv in Apache" } ] }, { "name": "sshd_config_subsystem", "doc": "Manages Subsystem settings in an OpenSSH sshd_config file.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "command", "doc": "The command to execute upon subsystem request." } ], "parameters": [ { "name": "name", "doc": "The name of the subsystem to set." }, { "name": "target", "doc": "The file in which to store the settings, defaults to\n `/etc/ssh/sshd_config`." } ], "providers": [ { "doc": "Uses Augeas API to update a Subsystem parameter in sshd_config." } ] }, { "name": "kernel_parameter", "doc": "Manages kernel parameters stored in bootloaders.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "Value of the parameter if applicable. Many parameters are just keywords so this must be left blank, while others (e.g. 'vga') will take a value." } ], "parameters": [ { "name": "name", "doc": "The parameter name, e.g. 'quiet' or 'vga'." }, { "name": "target", "doc": "The bootloader configuration file, if in a non-default location for the provider." }, { "name": "bootmode", "doc": "Boot mode(s) to apply the parameter to. Either 'all' (default) to use the parameter on all boots (normal and recovery mode), 'normal' for just normal boots or 'recovery' for just recovery boots. Valid values are `all`, `normal`, `recovery`." } ], "providers": [ { "name": "grub", "doc": "Uses Augeas API to update kernel parameters in GRUB's menu.lst" }, { "name": "grub2", "doc": "Uses Augeas API to update kernel parameters in GRUB2's /etc/default/grub\n\nRequired binaries: `/usr/sbin/grub2-mkconfig`." } ] }, { "name": "syslog", "doc": "Manages settings in syslog.conf.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "no_sync", "doc": "Whether to omit syncing the file after every logging, ony when action_type is file. Valid values are `true`, `false`." } ], "parameters": [ { "name": "name", "doc": "The name of the resource." }, { "name": "facility", "doc": "The syslog facility for the selector." }, { "name": "level", "doc": "The syslog level for the selector." }, { "name": "action_type", "doc": "The type of action: file, hostname, user or program." }, { "name": "action", "doc": "The action for the entry." }, { "name": "target", "doc": "The file in which to store the settings, defaults to\n `/etc/syslog.conf`." }, { "name": "lens", "doc": "The augeas lens used to parse the file" } ], "providers": [ { "doc": "Uses Augeas API to update a syslog.conf entry" }, { "name": "rsyslog", "doc": "Uses Augeas API to update an rsyslog.conf entry" } ] }, { "name": "nrpe_command", "doc": "Manages commands in /etc/nagios/nrpe.cfg.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "command", "doc": "Check command to run on the system, with arguments" } ], "parameters": [ { "name": "name", "doc": "The name of the command, e.g. check_my_stuff" }, { "name": "target", "doc": "The file in which to store the command, defaults to\n `/etc/nagios/nrpe.cfg`." } ], "providers": [ { "doc": "Uses Augeas API to update nrpe commands" } ] }, { "name": "shellvar", "doc": "Manages variables in simple shell scripts.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "value", "doc": "Value to change the variable to." }, { "name": "comment", "doc": "Text to be stored in a comment immediately above the entry. It will be automatically prepended with the name of the variable in order for the provider to know whether it controls the comment or not." } ], "parameters": [ { "name": "variable", "doc": "The name of the variable, e.g. OPTIONS" }, { "name": "quoted", "doc": "Quoting method to use, defaults to `auto`.\n\n* `auto` will quote only if necessary, leaving existing quotes as-is\n* `double` and `single` will always quotes\n* `none` will remove quotes, which may result in save failures Valid values are `auto`, `double`, `single`, `none`, `false`, `true`." }, { "name": "array_type", "doc": "Type of array mapping to use, defaults to `auto`.\n\n* `auto` will detect the current type, and default to `string`\n* `string` will render the array as a string and use space-separated values\n* `array` will render the array as a shell array Valid values are `auto`, `string`, `array`." }, { "name": "target", "doc": "The file in which to store the variable." } ], "providers": [ { "doc": "Uses Augeas API to update shell script variables" } ] }, { "name": "pg_hba", "doc": "Manages commands in pg_hba.conf.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`, `positioned`." }, { "name": "method", "doc": "The authentication method" }, { "name": "options", "doc": "The hash of authentication options" } ], "parameters": [ { "name": "name", "doc": "The default namevar" }, { "name": "type", "doc": "The type of host Valid values are `local`, `host`, `hostssl`, `hostnossl`." }, { "name": "database", "doc": "The database" }, { "name": "user", "doc": "The user" }, { "name": "address", "doc": "The address (for host, hostssl, hostnossl types)" }, { "name": "target", "doc": "The file in which to the pg_hba rule" }, { "name": "position", "doc": "Where to place the new entry" } ], "providers": [ { "doc": "Uses Augeas API to update pg_hba settings" } ] }, { "name": "puppet_auth", "doc": "Manages settings in Puppet's auth.conf.", "properties": [ { "name": "ensure", "doc": "The basic property that the resource should be in. Valid values are `present`, `absent`." }, { "name": "environments", "doc": "The list of environments the rule applies to." }, { "name": "methods", "doc": "The list of methods the rule applies to. Possible values are:\n\n- find;\n- search;\n- save;\n- destroy." }, { "name": "allow", "doc": "The list of hosts allowed for this rule,\nspecified by hostname or cername. Regexes are allowed,\nas well as the special value `*`." }, { "name": "allow_ip", "doc": "The list of IPs allowed for this rule.\nRequires Puppet 3.0.0 or greater." }, { "name": "authenticated", "doc": "The type of authentication for the rule. Possible values are:\n\n- yes;\n- no;\n- on;\n- off;\n- any." } ], "parameters": [ { "name": "name", "doc": "The name of the resource." }, { "name": "path", "doc": "The path for the auth rule." }, { "name": "path_regex", "doc": "Whether the path is specified as a regex. Valid values are `true`, `false`." }, { "name": "ins_before", "doc": "Optional XPath expression to specify where to insert the auth rule.\n\nThis parameter takes special values working as aliases:\n\n- `first allow`, mapping to `path[allow][1]`;\n- `last allow`, mapping to `path[allow][last()]`;\n- `first deny`, mapping to `path[count(allow)=0][1]`;\n- `last deny`, mapping to path[count(allow)=0][last()]`" }, { "name": "ins_after", "doc": "Optional XPath expression to specify where to insert the auth rule.\n\nThis parameter takes special values working as aliases:\n\n- `first allow`, mapping to `path[allow][1]`;\n- `last allow`, mapping to `path[allow][last()]`;\n- `first deny`, mapping to `path[count(allow)=0][1]`;\n- `last deny`, mapping to path[count(allow)=0][last()]`" }, { "name": "target", "doc": "The file in which to store the settings, defaults to\n `/etc/puppet/auth.conf`." } ], "providers": [ { "doc": "Uses Augeas API to update a rule in Puppet's auth.conf." } ] } ], "checksums": { "CONTRIBUTING.md": "11e7aa5b3f05c7b09d32a385578db71f", "Changelog": "67a8c94966c143165d11b60f9d71865a", "Gemfile": "ffb402399ce96277f2e439294ebe4ac5", "Gemfile.lock": "31ef64b8925d8d78596c32fb730d2fd7", "LICENSE": "0a23d6c579795bb78b0de2ba06b1dfeb", "Modulefile": "e1fbe38b9395a9902be17da540a014f0", "README.md": "17fa460c65b8cb025a1d1bc996a24f5a", "Rakefile": "340a2ef6ee5a822c9e0bed70862fca6b", "docs/CHANGELOG.html": "712adda1ee4f95abaa369748e37c8afc", "docs/CONTRIBUTING.html": "47d11b3c6b78b460a15555d6a300256a", "docs/Makefile": "a39d8376506e31d445f134a658e48ecd", "docs/README.html": "55b192ae2b2556e490bca8ee2b7ba25f", "docs/buttondown.css": "f15e6924612f4c5ae477030bf7bf665b", "docs/examples/apache_setenv.md": "62cf9cadbf3f207734ee5c6d3c84143e", "docs/examples/host.md": "ccc23a5bc50a746c90a6890012d64ce7", "docs/examples/kernel_parameter.md": "716f9890eef1a71bfbed77ef16219471", "docs/examples/mailalias.md": "5e13bdf971e6c1ae81ce946c4cde9276", "docs/examples/mounttab.md": "a244e500f1ce2d991e56dc93dc7cb869", "docs/examples/nrpe_command.md": "6ae395751d493a28ca591078a6587695", "docs/examples/pg_hba.md": "be48d901f065eb79eb812a99047ab7ff", "docs/examples/puppet_auth.md": "35c2400a4c63112680da83d24a901674", "docs/examples/shellvar.md": "b056d5308d657d3b20af712f2df392d6", "docs/examples/sshd_config.md": "226cd405bfafb81cba6bc3baf9d99182", "docs/examples/sshd_config_subsystem.md": "e5dacd86a8bb2679f08908ecbbb2f42f", "docs/examples/sysctl.md": "1d41d081676e14ec7afa3a10ec77f2ea", "docs/examples/syslog.md": "355e0ff109881a34986302676d258791", "docs/examples.html": "7755abb4cb3660f69cd68a6538c10caf", "docs/examples.md": "40e34f471adecc717736ba27d93a4ae1", "docs/examples_header.html": "6b96fe444bf6b8accc3e32c24a8490ec", "docs/examples_header.md": "30ca99c44f2c022d61c33d3c951f5e4c", "docs/images/augeasproviders-spec-augparse.png": "19df7091646b354bcf85903b28cdf2d6", "docs/images/augeasproviders-spec-part1.png": "9d4bd03096614a39bf0d8beeb1537749", "docs/images/augeasproviders-spec-specshould.png": "b803dd2e6acaa7e67d9c030aab312d4f", "docs/index.html": "33e0369142c6dc29fda1e31ec1742a6a", "docs/index.md": "374dbf0d63e77d11b53bb97cdf963090", "docs/motw.html": "7bfe94da2f1cb68274febc86b5e769b8", "docs/motw.md": "0227cd4d0aee940d1df0ebea7b5fcb06", "docs/specs.html": "f4a30d7684a0b9cff200085a0ca98f1c", "docs/specs.md": "9eb05fe66f1d4e3686515182bac19e38", "lib/augeasproviders/mounttab/fstab.rb": "7ceea9a30b033b231dde1f4f1ee21079", "lib/augeasproviders/mounttab/vfstab.rb": "3be8bf59a4539cdaaa0bdda8e8c33174", "lib/augeasproviders/mounttab.rb": "d0dd1845a9408148eed0d8dbb93790c2", "lib/augeasproviders/provider.rb": "b634bcacc9ad40fbad17d6fb8b4b1b14", "lib/augeasproviders/type.rb": "1a91d2fec25301a1ba09042462f4372c", "lib/augeasproviders.rb": "4730498403c2d9ced6d586669ae7bbbc", "lib/puppet/provider/apache_setenv/augeas.rb": "3a5f17147d57750348ef9b39ef5e3058", "lib/puppet/provider/host/augeas.rb": "f1c9c58ae1ca4d450f9946e5e431f3b5", "lib/puppet/provider/kernel_parameter/grub.rb": "4a8b4ea3be974976c9dc05fd557b009c", "lib/puppet/provider/kernel_parameter/grub2.rb": "456fce5ec37df1f454c46f84aa8cc484", "lib/puppet/provider/mailalias/augeas.rb": "a86f77d15928a17e32a7cdfeb4090546", "lib/puppet/provider/mounttab/augeas.rb": "e2cedcedd7d312844e184572c61eceef", "lib/puppet/provider/nrpe_command/augeas.rb": "6362f4dec54e726fe58f2281f68c97e1", "lib/puppet/provider/pg_hba/augeas.rb": "0c936a460f99aef1089b6488aa1df9e2", "lib/puppet/provider/puppet_auth/augeas.rb": "962054aaf99c0de34c2dd265c4026f71", "lib/puppet/provider/shellvar/augeas.rb": "cec8e65c29da5970722f4b910f9748fd", "lib/puppet/provider/sshd_config/augeas.rb": "9ac4871bfd06d96e41ad295631ea9cfc", "lib/puppet/provider/sshd_config_subsystem/augeas.rb": "ad2e9060dfa9d84512f96c807563328f", "lib/puppet/provider/sysctl/augeas.rb": "408f8304890166d874aa6b60f84158ed", "lib/puppet/provider/syslog/augeas.rb": "3192ffa10d2fcf1a599779edc06083be", "lib/puppet/provider/syslog/rsyslog.rb": "2c077f0a8a2110343d0e2818bb3b0326", "lib/puppet/type/apache_setenv.rb": "dddc11b0c1c3ca92434f3820b70bbdf7", "lib/puppet/type/kernel_parameter.rb": "aa05738676e60fb432edd61fb72f95ea", "lib/puppet/type/nrpe_command.rb": "b639c9ee2cd6b5be91c3518be9ce8cad", "lib/puppet/type/pg_hba.rb": "22750898802ef2d02d4f0825d6ca3c95", "lib/puppet/type/puppet_auth.rb": "4879beaae171df46cc70ca6cd9057f1d", "lib/puppet/type/shellvar.rb": "ba5133cd31b6799a2e91c1b60eeebccb", "lib/puppet/type/sshd_config.rb": "281b25e8ddd43aaecd0373358dfa2a13", "lib/puppet/type/sshd_config_subsystem.rb": "f8d2d0e7ae12eb222c97825f275c3cd9", "lib/puppet/type/sysctl.rb": "ab61fd2889a36f80993cb3e8d2fa5711", "lib/puppet/type/syslog.rb": "38d8db1bf661078a68f2aaa03aa4a752", "manifests/init.pp": "33a2ec2e85db97f9b8b3e27d7b08e7d5", "spec/fixtures/unit/augeasproviders/provider/broken": "7657a3a3c58088d06aa33ab174622ef4", "spec/fixtures/unit/augeasproviders/provider/full": "20380104252d133d336cec79930ac625", "spec/fixtures/unit/puppet/apache_setenv/broken": "6a01556b45cde8a64fcb809810d41d43", "spec/fixtures/unit/puppet/apache_setenv/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/apache_setenv/full": "ac2608c38289d3ee813d001a3b6868ec", "spec/fixtures/unit/puppet/apache_setenv/simple": "534e3774e415f71a0eeea3e1c276ff3c", "spec/fixtures/unit/puppet/host/broken": "7657a3a3c58088d06aa33ab174622ef4", "spec/fixtures/unit/puppet/host/empty": "68b329da9893e34099c7d8ad5cb9c940", "spec/fixtures/unit/puppet/host/full": "20380104252d133d336cec79930ac625", "spec/fixtures/unit/puppet/kernel_parameter_grub/broken": "3d1c58f1d44d0231f34bae6b2e08c3df", "spec/fixtures/unit/puppet/kernel_parameter_grub/full": "11c31975ef0c4ae6749b326d02b3f44a", "spec/fixtures/unit/puppet/kernel_parameter_grub2/broken": "dd0b6633ef7bf01593927e0953555749", "spec/fixtures/unit/puppet/kernel_parameter_grub2/full": "ff203824922bb2bc5e823ffd0d9287f5", "spec/fixtures/unit/puppet/mailalias/broken": "7657a3a3c58088d06aa33ab174622ef4", "spec/fixtures/unit/puppet/mailalias/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/mailalias/full": "76a769cc7efe5e27e3c992c9cb695588", "spec/fixtures/unit/puppet/mounttab_fstab/broken": "14e37dc984061fe2f3b32f666872b9aa", "spec/fixtures/unit/puppet/mounttab_fstab/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/mounttab_fstab/full": "36122c5b2fc9619838c0f009c41612c0", "spec/fixtures/unit/puppet/mounttab_vfstab/broken": "c670fb8d65147a83eea6baeec218a093", "spec/fixtures/unit/puppet/mounttab_vfstab/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/mounttab_vfstab/full": "73cd949d3b00bff34b25e21e84197e8d", "spec/fixtures/unit/puppet/nrpe_command/broken": "7657a3a3c58088d06aa33ab174622ef4", "spec/fixtures/unit/puppet/nrpe_command/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/nrpe_command/full": "f51ce4ffb282fdd0782db7993ea230a7", "spec/fixtures/unit/puppet/pg_hba/broken": "cf43a8b553a24d7fada4537d28911cae", "spec/fixtures/unit/puppet/pg_hba/empty": "68b329da9893e34099c7d8ad5cb9c940", "spec/fixtures/unit/puppet/pg_hba/full": "068aafbab0d59bedf45bed12699f67e0", "spec/fixtures/unit/puppet/puppet_auth/broken": "56f785241d0ed9fe51a8170b9dd50272", "spec/fixtures/unit/puppet/puppet_auth/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/puppet_auth/full": "1bf33c8f5fa99e42a5490cf8166a3c80", "spec/fixtures/unit/puppet/rsyslog/broken": "0d97022df1ad5428512f5c20f49e5b79", "spec/fixtures/unit/puppet/rsyslog/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/rsyslog/full": "ab5109f47b56cdf68d1a49d1dc2f161e", "spec/fixtures/unit/puppet/shellvar/broken": "b25c9c687a562b638209926a7cdeec02", "spec/fixtures/unit/puppet/shellvar/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/shellvar/full": "a7f155c873f669fa4695a83ca6a53a8f", "spec/fixtures/unit/puppet/sshd_config/broken": "180da60c75056519fdaf4b4e8fe73e56", "spec/fixtures/unit/puppet/sshd_config/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/sshd_config/full": "2152c57f394aa75347bba1d8666fd371", "spec/fixtures/unit/puppet/sshd_config/nomatch": "a276b6b8e3fbc2e6c7915ba0de10950c", "spec/fixtures/unit/puppet/sshd_config_subsystem/broken": "180da60c75056519fdaf4b4e8fe73e56", "spec/fixtures/unit/puppet/sshd_config_subsystem/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/sshd_config_subsystem/full": "336b6c3da647bb3b052a8bc178425c02", "spec/fixtures/unit/puppet/sysctl/broken": "4ad66fadf9b67382b16817c66105b8a5", "spec/fixtures/unit/puppet/sysctl/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/sysctl/full": "f647c9efc637e452c88259ab7f90e71c", "spec/fixtures/unit/puppet/sysctl/small": "f7c2d9f63cd00cca8d055bcf83e4911c", "spec/fixtures/unit/puppet/syslog/broken": "9d1884537b34bb75b6545014a85b5296", "spec/fixtures/unit/puppet/syslog/empty": "d41d8cd98f00b204e9800998ecf8427e", "spec/fixtures/unit/puppet/syslog/full": "3509686927da43b107dc1090d0caaaae", "spec/lib/augeas_spec/augparse.rb": "aba3b1e4cba77c5cae79b365a8625f67", "spec/lib/augeas_spec/fixtures.rb": "957152713139276627a2005b40a481ed", "spec/lib/augeas_spec.rb": "347f96f25a5610c69519af8c05cf35d5", "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", "spec/spec_helper.rb": "57a56adc3b220c8dc0afecdef283858d", "spec/unit/augeasproviders/provider_spec.rb": "ecf3ead5a7e351ecb50df0342b890fdd", "spec/unit/puppet/apache_setenv_spec.rb": "4d721ec28430b568d7034c9753fa21d0", "spec/unit/puppet/host_spec.rb": "b4fb6b6e96921c17180731af553ef425", "spec/unit/puppet/kernel_parameter_grub2_spec.rb": "6b27266a6dafac6e7a6c65ca8a155a03", "spec/unit/puppet/kernel_parameter_grub_spec.rb": "eb5d33d32c0c469d760d49981a322284", "spec/unit/puppet/mailalias_spec.rb": "bc9805cd726848f68c04dd3476cd3296", "spec/unit/puppet/mounttab_fstab_spec.rb": "58b9ee0c774bf95207d40cf758382736", "spec/unit/puppet/mounttab_vfstab_spec.rb": "a6abf535a6bafbc115aed87359a4fe1f", "spec/unit/puppet/nrpe_command_spec.rb": "1a751265d24a474c856fa6dcd6142ce4", "spec/unit/puppet/pg_hba_spec.rb": "ef79c198ca071b2cb5cfb44231c1d901", "spec/unit/puppet/puppet_auth_spec.rb": "318fc55bb031a080dfdd88ce8b919261", "spec/unit/puppet/rsyslog_spec.rb": "4f10000eb491b1cae315573360a4ff0f", "spec/unit/puppet/shellvar_spec.rb": "4e3e2d3ca22385b72003e2fa2440b348", "spec/unit/puppet/shellvar_type_spec.rb": "2f18150a7c96830e639546a4dafff3e2", "spec/unit/puppet/sshd_config_spec.rb": "3a91c684a08208e1a182b3af60c76ae6", "spec/unit/puppet/sshd_config_subsystem_spec.rb": "b8b1a285812c0c974cf02ff610b6dbea", "spec/unit/puppet/sysctl_spec.rb": "445c596e2cbeacdaa784a485fe390e52", "spec/unit/puppet/syslog_spec.rb": "43d9c9a10c86bbb876ea97e223ebf0a7" } }, "tags": [ "utilities", "mail", "nagios", "ssh", "sysctl", "hosts", "syslog", "nrpe", "sshd", "augeas", "host", "aliases", "mailalias", "mount", "mounttab", "fstab", "vfstab", "grub", "grub2", "kernel", "apache", "httpd", "sysconfig", "shell", "auth.conf", "rsyslog", "postgresql", "pg_hba" ], "file_uri": "/v3/files/domcleal-augeasproviders-1.0.2.tar.gz", "file_size": 187123, "file_md5": "8269efa8b955dec684abd53a82172e44", "downloads": 1952, "readme": "

augeasproviders: alternative Augeas-based providers for Puppet

\n\n

This module provides alternative providers for core Puppet types such as\nhost and mailalias using the Augeas configuration library. It also adds\nsome of its own types for new functionality.

\n\n

The advantage of using Augeas over the default Puppet parsedfile\nimplementations is that Augeas will go to great lengths to preserve file\nformatting and comments, while also failing safely when needed.

\n\n

These providers will hide all of the Augeas commands etc., you don't need to\nknow anything about Augeas to make use of it.

\n\n

If you want to make changes to config files in your own way, you should use\nthe augeas type directly. For more information about Augeas, see the\nweb site or the\nPuppet/Augeas\nwiki page.

\n\n

Types and providers

\n\n

The following builtin types have an Augeas-based provider implemented:

\n\n
    \n
  • host
  • \n
  • mailalias
  • \n
\n\n

The following other types have a provider implemented:

\n\n\n\n

The module adds the following new types:

\n\n
    \n
  • apache_setenv for updating SetEnv entries in Apache HTTP Server configs
  • \n
  • kernel_parameter for adding kernel parameters to GRUB Legacy or GRUB 2 configs
  • \n
  • nrpe_command for setting command entries in Nagios NRPE's nrpe.cfg
  • \n
  • pg_hba for PostgreSQL's pg_hba.conf entries
  • \n
  • puppet_auth for authentication rules in Puppet's auth.conf
  • \n
  • shellvar for shell variables in /etc/sysconfig or /etc/default etc.
  • \n
  • sshd_config for setting configuration entries in OpenSSH's sshd_config
  • \n
  • sshd_config_subsystem for setting subsystem entries in OpenSSH's sshd_config
  • \n
  • sysctl for entries inside Linux's sysctl.conf
  • \n
  • syslog for entries inside syslog.conf
  • \n
\n\n

Lots of examples are provided in the accompanying documentation (see\ndocs/examples.html) and are also published on the web site.\nIf this is a git checkout, you will need to run make in docs/ to generate the\nHTML pages.

\n\n

Type documentation can be generated with puppet doc -r type or viewed on the\nPuppet Forge page.

\n\n

For builtin types and mounttab, the default provider will automatically become\nthe augeas provider once the module is installed. This can be changed back\nto parsed where necessary.

\n\n

Requirements

\n\n

Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as\nnormal.

\n\n

See Puppet/Augeas pre-requisites.

\n\n

Installing

\n\n

On Puppet 2.7.14+, the module can be installed easily (documentation):

\n\n
puppet module install domcleal/augeasproviders\n
\n\n

You may see an error similar to this on Puppet 2.x (#13858):

\n\n
Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type `kernel_parameter` at ...\n
\n\n

Ensure the module is present in your primary Puppet server's own environment (it doesn't\nhave to use it) and that the primary Puppet server has pluginsync enabled. Run the agent on\nthe primary Puppet server to cause the custom types to be synced to its local libdir\n(primary Puppet server --configprint libdir) and then restart the primary Puppet server so it\nloads them.

\n\n

Planned

\n\n

The following builtin types have Augeas-based providers planned:

\n\n
    \n
  • ssh_authorized_key
  • \n
  • port, once #5660 is done
  • \n
  • yumrepo, once #8758 is done
  • \n
\n\n

Other ideas for new types are:

\n\n
    \n
  • /etc/system types
  • \n
\n\n

Issues

\n\n

Please file any issues or suggestions on GitHub.

\n
", "changelog": "
# Changelog\n\n## 1.0.2\n* no change, re-release for bad tarball checksum\n\n## 1.0.1\n* sysctl: fix quoting issue when applying settings, fixes #53 (Jeremy Kitchen)\n* sysctl: fix apply=>false, was always running, fixes #56 (Trey Dockendorf)\n* all: use augeas/lenses/ from Puppet's pluginsync libdir (Craig Dunn)\n* sshd: create array entries before Match groups\n\n## 1.0.0\n* devel: AugeasProviders::Provider has gained a large number of helper methods\n  for writing providers\n* all: providers completely refactored to use AugeasProviders::Provider helpers\n* sysctl: ignore whitespace inside values during comparisons, fixes #50\n* shellvar: fix require to work for puppet apply/specs\n\n## 0.7.0\n* pg_hba: new type for managing PostgreSQL pg_hba.conf entries\n* shellvar: add support for array values\n* sysctl: add 'apply' parameter to change live kernel value (default: true)\n* sysctl: add 'val' parameter alias for duritong/puppet-sysctl compatibility\n* mailalias: fix quoting of pipe recipients, fixes #41\n* devel: test Ruby 2.0\n\n## 0.6.1\n* syslog: add rsyslog provider variant, requires Augeas 1.0.0\n* all: fix ruby-augeas 0.3.0 compatibility on Ruby 1.9\n* all: don't throw error when target file doesn't already exist\n* kernel_parameter/grub: ensure partially present parameters will be removed\n\n## 0.6.0\n* apache_setenv: new type for managing Apache HTTP SetEnv config options (Endre\n  Karlson)\n* puppet_auth: new type for managing Puppet's auth.conf file\n* shellvar: new type for managing /etc/{default,sysconfig}\n* kernel_parameter: use EFI GRUB legacy config if present\n* devel: replaced librarian-puppet with puppetlabs_spec_helper's .fixtures.yml\n* devel: use augparse --notypecheck for improved speed\n\n## 0.5.3\n* sshd_config: reinstate separate name parameter\n* docs: add sshd_config multiple keys example, fixes #27\n\n## 0.5.2\n* sshd_config, sysctl: create entries after commented out entry\n* host, mailalias: implement prefetch for performance\n* sshd_config: remove separate name parameter, only use key as namevar\n* docs: remove symlinks from docs/, fixes #25, improve README, rename LICENSE\n* devel: improve idempotence logging\n* devel: update to Augeas 1.0.0, test Puppet 3.1\n\n## 0.5.1\n* all: fix library loading issue with `puppet apply`\n\n## 0.5.0\n* kernel_parameter: new type for managing kernel arguments in GRUB Legacy and\n  GRUB 2 configs\n* docs: documentation index, existing articles and numerous examples for all\n  providers added\n* docs: URLs changed to GitHub hercules-team organisation\n* devel: files existence stubbed out in tests\n* devel: Augeas submodule changed to point to GitHub\n* devel: specs compatibility with 2.7.20 fixed\n\n## 0.4.0\n* nrpe_command: new type for managing NRPE settings (Christian Kaenzig)\n* syslog: new type for managing (r)syslog destinations (Raphaël Pinson)\n\n## 0.3.1\n* all: fix missing require causing load errors\n* sshd_config: store multiple values for a setting as multiple entries, e.g.\n  multiple ListenAddress lines (issue #13)\n* docs: minor fixes\n* devel: test Puppet 3.0\n\n## 0.3.0\n* sysctl: new type for managing sysctl.conf entries\n* mounttab: add Solaris /etc/vfstab support\n* mounttab: fix options property idempotency\n* mounttab: fix key=value options in fstab instances\n* host: fix comment and host_aliases properties idempotency\n* all: log /augeas//error output when unable to save\n* packaging: hard mount_providers dependency removed\n* devel: augparse used to test providers against expected tree\n* devel: augeas submodule included for testing against latest lenses\n\n## 0.2.0\n* mounttab: new provider for mounttab type in puppetlabs-mount_providers\n  (supports fstab only, no vfstab), mount_providers now a dependency\n* devel: librarian-puppet used to install Puppet module dependencies\n\n## 0.1.1\n* host: fix host_aliases param support pre-2.7\n* sshd_config: find Match groups in instances/ralsh\n* sshd_config: support arrays for ((Allow|Deny)(Groups|Users))|AcceptEnv|MACs\n* sshd_config_subsystem: new type and provider (Raphaël Pinson)\n* devel: use Travis CI, specify deps via Gemfile + bundler\n* specs: fixes for 0.25 and 2.6 series\n\n## 0.1.0\n* host: fix pre-2.7 compatibility when without comment property\n* sshd_config: new type and provider (Raphaël Pinson)\n* all: fix provider confine to enable use in same run as ruby-augeas install\n  (Puppet #14822)\n* devel: refactor common augopen code into utility class\n* specs: fix both Ruby 1.8 and mocha 0.12 compatibility\n\n## 0.0.4\n* host: fix handling of multiple host_aliases\n* host: fix handling of empty comment string, now removes comment\n* host: fix missing ensure and comment parameters in puppet resource, only\n  return aliases if present\n* mailalias: fix missing ensure parameter in puppet resource\n* specs: added comprehensive test harness for both providers\n\n## 0.0.3\n* all: add instances methods to enable `puppet resource`\n\n## 0.0.2\n* mailalias: new provider added for builtin mailalias type\n\n## 0.0.1\n* host: new provider added for builtin host type\n
", "license": "
augeasproviders: alternative Augeas-based providers for Puppet\n\nCopyright (c) 2012 Dominic Cleal\n\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n
", "created_at": "2013-10-28 11:15:54 -0700", "updated_at": "2013-10-28 11:15:54 -0700", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/domcleal-augeasproviders-1.0.2", "version": "1.0.2" }, { "uri": "/v3/releases/domcleal-augeasproviders-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/domcleal-augeasproviders-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.7.0", "version": "0.7.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.6.1", "version": "0.6.1" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.6.0", "version": "0.6.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.5.3", "version": "0.5.3" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.5.2", "version": "0.5.2" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.5.1", "version": "0.5.1" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.5.0", "version": "0.5.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.4.0", "version": "0.4.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.3.1", "version": "0.3.1" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.3.0", "version": "0.3.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.2.0", "version": "0.2.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.1.1", "version": "0.1.1" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.1.0", "version": "0.1.0" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.0.4", "version": "0.0.4" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.0.3", "version": "0.0.3" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/domcleal-augeasproviders-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://augeasproviders.com/", "issues_url": "http://github.com/hercules-team/augeasproviders/issues" }, { "uri": "/v3/modules/maestrodev-maven", "name": "maven", "downloads": 8503, "created_at": "2012-06-13 05:31:36 -0700", "updated_at": "2014-01-06 14:19:34 -0800", "owner": { "uri": "/v3/users/maestrodev", "username": "maestrodev", "gravatar_id": "192d33f0c408b08b3df9d4927bfbcdc0" }, "current_release": { "uri": "/v3/releases/maestrodev-maven-1.1.9", "module": { "uri": "/v3/modules/maestrodev-maven", "name": "maven", "owner": { "uri": "/v3/users/maestrodev", "username": "maestrodev", "gravatar_id": "192d33f0c408b08b3df9d4927bfbcdc0" } }, "version": "1.1.9", "metadata": { "name": "maestrodev-maven", "version": "1.1.9", "source": "http://github.com/maestrodev/puppet-maven", "author": "maestrodev", "license": "Apache License, Version 2.0", "summary": "Apache Maven module for Puppet", "description": "A Puppet module to download artifacts from Maven repositories", "project_page": "http://github.com/maestrodev/puppet-maven", "dependencies": [ { "name": "maestrodev/wget", "version_requirement": ">=1.0.0" } ], "types": [ { "name": "maven", "doc": "Maven repository files.", "properties": [ { "name": "ensure", "doc": "May be one of two values: 'present' or 'latest'. When 'present' (the default)\nthe specified maven artifact is downloaded when no file exists\nat 'path' (or 'name' if no path is specified.) This is approporate\nwhen the specified maven artifact refers to a released (non-SNAPSHOT)\nartifact. If 'latest' is specified and the value of version is\n'RELEASE', 'LATEST', or a SNAPSHOT the repository is queried for the\nmost recent version.\n\nValid values are `present`, `latest`. " } ], "parameters": [ { "name": "path", "doc": "The destination path of the downloaded file.\n\n" }, { "name": "id", "doc": "The Maven repository id, ie. 'org.apache.maven:maven-core:jar:3.0.5',\n'org.apache.maven:maven-core:jar:sources:3.0.5'\n\n" }, { "name": "groupid", "doc": "The Maven arifact group id, ie. 'org.apache.maven'\n\n" }, { "name": "artifactid", "doc": "The Maven artifact id, ie. 'maven-core'\n\n" }, { "name": "version", "doc": "The Maven artifact version, ie. '3.0.5'\n\n" }, { "name": "packaging", "doc": "The Maven artifact packaging, ie. 'jar'\n\n" }, { "name": "classifier", "doc": "The Maven artifact classifier, ie. 'sources'\n\n" }, { "name": "repoid", "doc": "Id of the repository to use. Useful for mirroring, authentication,...\n\n" }, { "name": "repos", "doc": "Repositories to use for artifact downloading. Defaults to http://repo1.maven.apache.org/maven2\n\n" }, { "name": "timeout", "doc": "Download timeout.\n\n" }, { "name": "pluginversion", "doc": "Version of the dependency plugin to use.\n\n" }, { "name": "options", "doc": "Other options to pass to mvn.\n\n" }, { "name": "user", "doc": "User to run Maven as. Useful to share a local repo and settings.xml. Defaults to root.\n\n" }, { "name": "group", "doc": "Group to run Maven as. Defaults to root.\n\n" } ], "providers": [ { "name": "mvn", "doc": "Maven download using mvn command line." } ] } ], "checksums": { "Gemfile": "7af3acbbb3a8be369945a46bcb1fc190", "Gemfile.lock": "98dfcaf3eb4cd6f02ea88bdaa84b3c4f", "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57", "Modulefile": "7fafa54223fbf4bfb645014751c18513", "Puppetfile": "ffbfa1dee66bf4bf8db958d36bc710c5", "Puppetfile.lock": "9bd55c56058d4003eb45481648b625f9", "README.md": "b6b7deccbd6856ccfacd105c5940eb64", "Rakefile": "eb3609d9e10aa67e2a60992460b8b66a", "Vagrantfile": "a7ca2302b3450128d36e866d7f3781e0", "lib/facter/maven_version.rb": "b8f07ca896a5da84f4f61a44389a6bc4", "lib/puppet/parser/functions/snapshotbaseversion.rb": "04a9c5225aa266202ca7699d6934f515", "lib/puppet/provider/maven/mvn.rb": "eddd3beb564c9c16e1440a1d4155681a", "lib/puppet/type/maven.rb": "a8523957e4384c452b660b542839cd9e", "manifests/buildr.pp": "2229539426e20cf286e547e4e631e9ef", "manifests/configure.pp": "8c0ab3e2e4349e8b17958aa1d100f598", "manifests/environment.pp": "50e56defef3a123a6629df3547259eb3", "manifests/init.pp": "c2589c4c1dee9f3e510ddda520069b3e", "manifests/install-gem.pp": "f4b2354eafad286eb160b71c6f2c3d38", "manifests/install_gem.pp": "1118a2cee8e85960f84bafcbbf09d354", "manifests/maven.pp": "bfc8a429fafd81c40df8605a8d1fd121", "manifests/settings.pp": "ec5e72854506b05cdff7f675f815b45d", "spec/classes/maven_spec.rb": "7aa7a05027d0b8f00342db730c6ce36d", "spec/defines/complete-settings.xml": "93cd3fb1045c05b1335cc57527837459", "spec/defines/default-mavenrc": "d41d8cd98f00b204e9800998ecf8427e", "spec/defines/default-repo-only-url-settings.xml": "7f6e08fbc6e9bc0b4cf3a70f36fd08b9", "spec/defines/default-repo-settings.xml": "3561cff50da7d88e17076b4051e73a17", "spec/defines/default-settings.xml": "c32126be976d4cce94072d259d60c65d", "spec/defines/environment_spec.rb": "d463392855a42f32743fbb4750abd678", "spec/defines/local-repo-settings.xml": "d5616742cec8e8607218c6b904a30a92", "spec/defines/mirror-servers-settings.xml": "662435f74748748da087b16895c42cc3", "spec/defines/populated-mavenrc": "f3ba57173b64666212ae64fcc2e0c8e3", "spec/defines/properties-settings.xml": "77981a6e51efa1781a7adfb660a5d4d1", "spec/defines/proxy-settings.xml": "58918c96c513e2e5649f42c65c8a29fd", "spec/defines/settings_spec.rb": "621e49c1ae4004e1bee9522b540184b7", "spec/fixtures/modules/wget/Gemfile": "4867df718b033e152c59c2a418e88b92", "spec/fixtures/modules/wget/Gemfile.lock": "b3e4cf700f055d8d242ad877da298127", "spec/fixtures/modules/wget/Modulefile": "319654cea17d4ad7af5a45f4746f6678", "spec/fixtures/modules/wget/README.md": "53e3a8bdf9ad988aae9b9581831bbcd6", "spec/fixtures/modules/wget/Rakefile": "527f8893f2694a9bc92993074f011cc3", "spec/fixtures/modules/wget/manifests/init.pp": "7a1575c5a0a755b01dcdd2dbf4f8e956", "spec/fixtures/modules/wget/spec/classes/init_spec.rb": "337ce66ffc43c7478ff0d3ff166d278a", "spec/fixtures/modules/wget/spec/fixtures/manifests/site.pp": "627dec82fd1b0d0b4f9e47135ed3e1b7", "spec/fixtures/modules/wget/spec/spec_helper.rb": "0db89c9a486df193c0e40095422e19dc", "spec/spec_helper.rb": "cc65187d0436f0481de4f83a41179d37", "spec/spec_helper_system.rb": "de7467d5673b34504b38ab22a34616aa", "spec/system/maven_system_spec.rb": "a0070e37027c70711fee7908597629e1", "spec/unit/puppet/provider/maven/mvn_spec.rb": "1c86764b1736b96ba1cef73c7ad016c0", "spec/unit/puppet/type/maven_spec.rb": "ba9d2fb1f50817a9c36d5dc11be21778", "templates/mavenrc.erb": "319f01bd0b0ec202132d7338230f09a6", "templates/settings.xml.erb": "ad0068b18196bcc816e3fc0e57476150", "tests/init.pp": "5f811b0b07e068c555afb42c34d94928" } }, "tags": [ "maven", "apache" ], "file_uri": "/v3/files/maestrodev-maven-1.1.9.tar.gz", "file_size": 25420, "file_md5": "6fcb2d26a6ccc8c59c9df0c520563a87", "downloads": 300, "readme": "

Puppet-Maven

\n\n

A Puppet recipe for Apache Maven, to download artifacts from a Maven repository

\n\n

Uses Apache Maven command line to download the artifacts.

\n\n

Building and Installing the Module

\n\n

To build the module for installing in your primary Puppet server:

\n\n
gem install puppet-module\ngit clone git://github.com/maestrodev/puppet-maven.git\ncd puppet-maven\npuppet module build\npuppet module install pkg/maestrodev-maven-1.0.1.tar.gz\n
\n\n

Of course, you can also clone the repository straight into /etc/puppet/modules/maven as well.

\n\n

Developing and Testing the Module

\n\n

If you are developing the module, it can be built using rake:

\n\n
gem install bundler\nbundle\nrake spec\nrake spec:system\n
\n\n

Usage

\n\n
  maven { "/tmp/myfile":\n    id => "groupId:artifactId:version:packaging:classifier",\n    repos => ["id::layout::http://repo.acme.com","http://repo2.acme.com"],\n  }\n
\n\n

or

\n\n
  maven { "/tmp/myfile":\n    groupid => "org.apache.maven",\n    artifactid => "maven-core",\n    version => "3.0.5",\n    packaging => "jar",\n    classifier => "sources",\n    repos => ["id::layout::http://repo.acme.com","http://repo2.acme.com"],\n  }\n
\n\n

ensure

\n\n

ensure may be one of two values:

\n\n
    \n
  • present (the default) -- the specified maven artifact is downloaded when no file exists\nat path (or name if no path is specified.) This is probably makes\nsense when the specified maven artifact refers to a released (non-SNAPSHOT)\nartifact.
  • \n
  • latest -- if value of version is RELEASE, LATEST, or a SNAPSHOT the repository\nis queried for an updated artifact. If an updated artifact is found the file\nat path is replaced.
  • \n
\n\n

MAVEN_OPTS Precedence

\n\n

Values set in maven_opts will be prepended to any existing\nMAVEN_OPTS value. This ensures that those already specified will win over\nthose added in mavenrc.

\n\n

If you would prefer these options to win, instead use:

\n\n
  maven_opts        => "",\n  mavenrc_additions => 'MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m"\n
\n\n

Examples

\n\n

Setup

\n\n
  $central = {\n    id => "myrepo",\n    username => "myuser",\n    password => "mypassword",\n    url => "http://repo.acme.com",\n    mirrorof => "external:*",      # if you want to use the repo as a mirror, see maven::settings below\n  }\n\n  $proxy = {\n    active => true, #Defaults to true\n    protocol => 'http', #Defaults to 'http'\n    host => 'http://proxy.acme.com',\n    username => 'myuser', #Optional if proxy does not require\n    password => 'mypassword', #Optional if proxy does not require\n    nonProxyHosts => 'www.acme.com', #Optional, provides exceptions to the proxy\n  }\n\n  # Install Maven\n  class { "maven::maven":\n    version => "3.0.5", # version to install\n    # you can get Maven tarball from a Maven repository instead than from Apache servers, optionally with a user/password\n    repo => {\n      #url => "http://repo.maven.apache.org/maven2",\n      #username => "",\n      #password => "",\n    }\n  } ->\n\n  # Setup a .mavenrc file for the specified user\n  maven::environment { 'maven-env' : \n      user => 'root',\n      # anything to add to MAVEN_OPTS in ~/.mavenrc\n      maven_opts => '-Xmx1384m',       # anything to add to MAVEN_OPTS in ~/.mavenrc\n      maven_path_additions => "",      # anything to add to the PATH in ~/.mavenrc\n\n  } ->\n\n  # Create a settings.xml with the repo credentials\n  maven::settings { 'maven-user-settings' :\n    mirrors => [$central], # mirrors entry in settings.xml, uses id, url, mirrorof from the hash passed\n    servers => [$central], # servers entry in settings.xml, uses id, username, password from the hash passed\n    proxies => [$proxy], # proxies entry in settings.xml, active, protocol, host, username, password, nonProxyHosts\n    user    => 'maven',\n  }\n\n  # defaults for all maven{} declarations\n  Maven {\n    user  => "maven", # you can make puppet run Maven as a specific user instead of root, useful to share Maven settings and local repository\n    group => "maven", # you can make puppet run Maven as a specific group\n    repos => "http://repo.maven.apache.org/maven2"\n  }\n
\n\n

Downloading artifacts

\n\n
  maven { "/tmp/maven-core-3.0.5.jar":\n    id => "org.apache.maven:maven-core:3.0.5:jar",\n    repos => ["central::default::http://repo.maven.apache.org/maven2","http://mirrors.ibiblio.org/pub/mirrors/maven2"],\n  }\n\n  maven { "/tmp/maven-core-3.0.5-sources.jar":\n    groupid    => "org.apache.maven",\n    artifactid => "maven-core",\n    version    => "3.0.5",\n    classifier => "sources",\n  }\n
\n\n

Buildr version

\n\n

Initially there was an Apache Buildr version, but it required to have Buildr installed before running Puppet and you would need to enable pluginsync\nin both primary Puppet server and clients.

\n\n

License

\n\n
  Copyright 2011-2012 MaestroDev\n\n  Licensed under the Apache License, Version 2.0 (the "License");\n  you may not use this file except in compliance with the License.\n  You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing, software\n  distributed under the License is distributed on an "AS IS" BASIS,\n  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  See the License for the specific language governing permissions and\n  limitations under the License.\n
\n\n

Author

\n\n

Carlos Sanchez csanchez@maestrodev.com\nMaestroDev\n2010-03-01

\n
", "changelog": null, "license": "
\n                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      "License" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      "Licensor" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      "Legal Entity" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      "control" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      "You" (or "Your") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      "Source" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      "Object" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      "Work" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      "Derivative Works" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      "Contribution" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, "submitted"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as "Not a Contribution."\n\n      "Contributor" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a "NOTICE" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an "AS IS" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets "[]"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same "printed page" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n
", "created_at": "2013-12-20 09:58:35 -0800", "updated_at": "2013-12-20 09:59:15 -0800", "deleted_at": null }, "releases": [ { "uri": "/v3/releases/maestrodev-maven-1.1.9", "version": "1.1.9" }, { "uri": "/v3/releases/maestrodev-maven-1.1.8", "version": "1.1.8" }, { "uri": "/v3/releases/maestrodev-maven-1.1.7", "version": "1.1.7" }, { "uri": "/v3/releases/maestrodev-maven-1.1.6", "version": "1.1.6" }, { "uri": "/v3/releases/maestrodev-maven-1.1.5", "version": "1.1.5" }, { "uri": "/v3/releases/maestrodev-maven-1.1.4", "version": "1.1.4" }, { "uri": "/v3/releases/maestrodev-maven-1.1.3", "version": "1.1.3" }, { "uri": "/v3/releases/maestrodev-maven-1.1.2", "version": "1.1.2" }, { "uri": "/v3/releases/maestrodev-maven-1.1.1", "version": "1.1.1" }, { "uri": "/v3/releases/maestrodev-maven-1.1.0", "version": "1.1.0" }, { "uri": "/v3/releases/maestrodev-maven-1.0.2", "version": "1.0.2" }, { "uri": "/v3/releases/maestrodev-maven-1.0.1", "version": "1.0.1" }, { "uri": "/v3/releases/maestrodev-maven-1.0.0", "version": "1.0.0" }, { "uri": "/v3/releases/maestrodev-maven-0.0.2", "version": "0.0.2" }, { "uri": "/v3/releases/maestrodev-maven-0.0.1", "version": "0.0.1" } ], "homepage_url": "http://github.com/maestrodev/puppet-maven", "issues_url": "http://github.com/maestrodev/puppet-maven/issues" } ] } puppet_forge-5.0.3/spec/fixtures/uri/0000755000004100000410000000000014515571425017661 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/uri/prefix/0000755000004100000410000000000014515571425021156 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/uri/prefix/v3/0000755000004100000410000000000014515571425021506 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/uri/prefix/v3/bases/0000755000004100000410000000000014515571425022603 5ustar www-datawww-datapuppet_forge-5.0.3/spec/fixtures/uri/prefix/v3/bases/puppet.headers0000644000004100000410000000062014515571425025453 0ustar www-datawww-dataHTTP/1.1 200 OK Server: nginx Date: Mon, 06 Jan 2014 22:42:07 GMT Content-Type: application/json;charset=utf-8 Content-Length: 285 Connection: keep-alive Status: 200 OK X-Frame-Options: sameorigin X-XSS-Protection: 1; mode=block Cache-Control: public, must-revalidate Last-Modified: Mon, 12 Nov 2012 14:51:00 GMT X-Node: forgeapi02 X-Revision: 49f66e061b0021c081fb58e754898cd928f61494 puppet_forge-5.0.3/spec/fixtures/uri/prefix/v3/bases/puppet.json0000644000004100000410000000010014515571425025002 0ustar www-datawww-data{ "uri": "/uri/prefix/v3/bases/puppet", "username": "bar" } puppet_forge-5.0.3/spec/unit/0000755000004100000410000000000014515571425016170 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/puppet_forge_spec.rb0000644000004100000410000000106714515571425022232 0ustar www-datawww-datarequire 'spec_helper' require 'uri' RSpec.describe PuppetForge do describe 'host attribute' do after(:each) do PuppetForge.host = PuppetForge::DEFAULT_FORGE_HOST end it 'should add a trailing slash if not present' do PuppetForge.host = 'http://example.com' expect(PuppetForge.host[-1,1]).to eq '/' end it 'should coerce non-String values if possible' do PuppetForge.host = URI.parse('http://example.com') expect(PuppetForge.host).to be_a String expect(PuppetForge.host[-1,1]).to eq '/' end end end puppet_forge-5.0.3/spec/unit/forge/0000755000004100000410000000000014515571425017272 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/forge/tar/0000755000004100000410000000000014515571425020060 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/forge/tar/mini_spec.rb0000644000004100000410000000616614515571425022364 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::Tar::Mini do let(:entry_class) do Class.new do attr_accessor :typeflag, :name, :full_name def initialize(name, full_name, typeflag) @name = name @full_name = full_name @typeflag = typeflag end end end let(:sourcefile) { '/the/module.tar.gz' } let(:destdir) { File.expand_path '/the/dest/dir' } let(:sourcedir) { '/the/src/dir' } let(:destfile) { '/the/dest/file.tar.gz' } let(:minitar) { described_class.new } let(:tarfile_contents) { [entry_class.new('file', 'full_file', '0'), \ entry_class.new('symlink', 'full_symlink', '2'), \ entry_class.new('invalid', 'full_invalid', 'F')] } it "unpacks a tar file" do unpacks_the_entry(:file_start, 'thefile') minitar.unpack(sourcefile, destdir) end it "does not allow an absolute path" do unpacks_the_entry(:file_start, '/thefile') expect { minitar.unpack(sourcefile, destdir) }.to raise_error(PuppetForge::InvalidPathInPackageError, "Attempt to install file into \"/thefile\" under \"#{destdir}\"") end it "does not allow a file to be written outside the destination directory" do unpacks_the_entry(:file_start, '../../thefile') expect { minitar.unpack(sourcefile, destdir) }.to raise_error(PuppetForge::InvalidPathInPackageError, "Attempt to install file into \"#{File.expand_path('/the/thefile')}\" under \"#{destdir}\"") end it "does not allow a directory to be written outside the destination directory" do unpacks_the_entry(:dir, '../../thedir') expect { minitar.unpack(sourcefile, destdir) }.to raise_error(PuppetForge::InvalidPathInPackageError, "Attempt to install file into \"#{File.expand_path('/the/thedir')}\" under \"#{destdir}\"") end it "packs a tar file" do writer = double('GzipWriter') expect(Zlib::GzipWriter).to receive(:open).with(destfile).and_yield(writer) expect(Archive::Tar::Minitar).to receive(:pack).with(sourcedir, writer) minitar.pack(sourcedir, destfile) end it "returns filenames in a tar separated into correct categories" do reader = double('GzipReader') expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader) expect(Archive::Tar::Minitar).to receive(:open).with(reader).and_return(tarfile_contents) expect(Archive::Tar::Minitar).to receive(:unpack).with(reader, destdir, ['full_file']).and_yield(:file_start, 'thefile', nil) file_lists = minitar.unpack(sourcefile, destdir) expect(file_lists[:valid]).to eq(['full_file']) expect(file_lists[:invalid]).to eq(['full_invalid']) expect(file_lists[:symlinks]).to eq(['full_symlink']) end def unpacks_the_entry(type, name) reader = double('GzipReader') expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader) expect(minitar).to receive(:validate_files).with(reader).and_return({:valid => [name]}) expect(Archive::Tar::Minitar).to receive(:unpack).with(reader, destdir, [name]).and_yield(type, name, nil) end end puppet_forge-5.0.3/spec/unit/forge/v3/0000755000004100000410000000000014515571425017622 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/forge/v3/base_spec.rb0000644000004100000410000001143314515571425022075 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::V3::Base do context 'connection management' do before(:each) do PuppetForge::Connection.authorization = nil PuppetForge::Connection.proxy = nil described_class.conn = nil end after(:each) do PuppetForge::Connection.authorization = nil PuppetForge::Connection.proxy = nil described_class.conn = nil end describe 'setting authorization value after a connection is created' do it 'should reset connection' do old_conn = described_class.conn PuppetForge::Connection.authorization = 'post-init auth value' new_conn = described_class.conn expect(new_conn).to_not eq(old_conn) expect(new_conn.headers).to include(:authorization => 'post-init auth value') end end describe 'setting proxy value after a connection is created' do it 'should reset connection' do old_conn = described_class.conn PuppetForge::Connection.proxy = 'http://proxy.example.com:8888' new_conn = described_class.conn expect(new_conn).to_not eq(old_conn) expect(new_conn.proxy).to_not be_nil expect(new_conn.proxy.uri.to_s).to eq('http://proxy.example.com:8888') end end end describe '::new_collection' do it 'should handle responses with no results' do response_data = { data: {}, errors: "Something bad happened!" } expect(PuppetForge::V3::Base.new_collection(response_data)).to eq([]) end it 'should handle responses with no pagination info' do response_data = { data: {}, errors: "Something bad happened!" } collection = PuppetForge::V3::Base.new_collection(response_data) expect(collection.limit).to eq(20) expect(collection.offset).to eq(0) expect(collection.total).to eq(0) end end describe 'the host url setting' do context 'without a path prefix' do before(:each) do PuppetForge::V3::Base.lru_cache.clear # We test the cache later, so clear it now @orig_host = PuppetForge.host PuppetForge.host = 'https://api.example.com' # Trigger connection reset PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection end after(:each) do PuppetForge.host = @orig_host # Trigger connection reset PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection end it 'should work' do stub_api_for(PuppetForge::V3::Base) do |stubs| stub_fixture(stubs, :get, '/v3/bases/puppet') end base = PuppetForge::V3::Base.find 'puppet' expect(base.username).to eq('foo') end it 'caches responses' do stub_api_for(PuppetForge::V3::Base, lru_cache: true) do |stubs| stub_fixture(stubs, :get, '/v3/bases/puppet') end allow(PuppetForge::V3::Base.lru_cache).to receive(:put).and_call_original allow(PuppetForge::V3::Base.lru_cache).to receive(:get).and_call_original PuppetForge::V3::Base.find 'puppet' PuppetForge::V3::Base.find 'puppet' PuppetForge::V3::Base.find 'puppet' expect(PuppetForge::V3::Base.lru_cache).to have_received(:put).once expect(PuppetForge::V3::Base.lru_cache).to have_received(:get).exactly(3).times end end context 'with a path prefix' do before(:each) do PuppetForge::V3::Base.lru_cache.clear # We test the cache later, so clear it now @orig_host = PuppetForge.host PuppetForge.host = 'https://api.example.com/uri/prefix' # Trigger connection reset PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection end after(:each) do PuppetForge.host = @orig_host # Trigger connection reset PuppetForge::V3::Base.conn = PuppetForge::Connection.default_connection end it 'should work' do stub_api_for(PuppetForge::V3::Base, PuppetForge.host) do |stubs| stub_fixture(stubs, :get, '/uri/prefix/v3/bases/puppet') end base = PuppetForge::V3::Base.find 'puppet' expect(base.username).to eq('bar') end it 'caches responses' do stub_api_for(PuppetForge::V3::Base, PuppetForge.host, lru_cache: true) do |stubs| stub_fixture(stubs, :get, '/uri/prefix/v3/bases/puppet') end allow(PuppetForge::V3::Base.lru_cache).to receive(:put).and_call_original allow(PuppetForge::V3::Base.lru_cache).to receive(:get).and_call_original PuppetForge::V3::Base.find 'puppet' PuppetForge::V3::Base.find 'puppet' PuppetForge::V3::Base.find 'puppet' expect(PuppetForge::V3::Base.lru_cache).to have_received(:put).once expect(PuppetForge::V3::Base.lru_cache).to have_received(:get).exactly(3).times end end end end puppet_forge-5.0.3/spec/unit/forge/v3/metadata_spec.rb0000644000004100000410000002032614515571425022744 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::Metadata do let(:data) { {} } let(:metadata) { PuppetForge::Metadata.new } describe 'property lookups' do subject { metadata } %w[ name version author summary license source project_page issues_url dependencies dashed_name release_name description ].each do |prop| describe "##{prop}" do it "responds to the property" do subject.send(prop) end end end end describe "#update" do subject { metadata.update(data) } context "with a valid name" do let(:data) { { 'name' => 'billgates-mymodule' } } it "extracts the author name from the name field" do expect(subject.to_hash['author']).to eq('billgates') end it "extracts a module name from the name field" do expect(subject.module_name).to eq('mymodule') end context "and existing author" do before { metadata.update('author' => 'foo') } it "avoids overwriting the existing author" do expect(subject.to_hash['author']).to eq('foo') end end end context "with a valid name and author" do let(:data) { { 'name' => 'billgates-mymodule', 'author' => 'foo' } } it "use the author name from the author field" do expect(subject.to_hash['author']).to eq('foo') end context "and preexisting author" do before { metadata.update('author' => 'bar') } it "avoids overwriting the existing author" do expect(subject.to_hash['author']).to eq('foo') end end end context "with an invalid name" do context "(short module name)" do let(:data) { { 'name' => 'mymodule' } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name") end end context "(missing namespace)" do let(:data) { { 'name' => '/mymodule' } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name") end end context "(missing module name)" do let(:data) { { 'name' => 'namespace/' } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the field must be a namespaced module name") end end context "(invalid namespace)" do let(:data) { { 'name' => "dolla'bill$-mymodule" } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the namespace contains non-alphanumeric characters") end end context "(non-alphanumeric module name)" do let(:data) { { 'name' => "dollabils-fivedolla'" } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the module name contains non-alphanumeric (or underscore) characters") end end context "(module name starts with a number)" do let(:data) { { 'name' => "dollabills-5dollars" } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'name' field in metadata.json: the module name must begin with a letter") end end end context "with an invalid version" do let(:data) { { 'version' => '3.0' } } it "raises an exception" do expect { subject }.to raise_error(ArgumentError, "Invalid 'version' field in metadata.json: version string cannot be parsed as a valid Semantic Version") end end context "with a valid source" do context "which is a GitHub URL" do context "with a scheme" do before { metadata.update('source' => 'https://github.com/billgates/amazingness') } it "predicts a default project_page" do expect(subject.to_hash['project_page']).to eq('https://github.com/billgates/amazingness') end it "predicts a default issues_url" do expect(subject.to_hash['issues_url']).to eq('https://github.com/billgates/amazingness/issues') end end context "without a scheme" do before { metadata.update('source' => 'github.com/billgates/amazingness') } it "predicts a default project_page" do expect(subject.to_hash['project_page']).to eq('https://github.com/billgates/amazingness') end it "predicts a default issues_url" do expect(subject.to_hash['issues_url']).to eq('https://github.com/billgates/amazingness/issues') end end end context "which is not a GitHub URL" do before { metadata.update('source' => 'https://notgithub.com/billgates/amazingness') } it "does not predict a default project_page" do expect(subject.to_hash['project_page']).to be nil end it "does not predict a default issues_url" do expect(subject.to_hash['issues_url']).to be nil end end context "which is not a URL" do before { metadata.update('source' => 'my brain') } it "does not predict a default project_page" do expect(subject.to_hash['project_page']).to be nil end it "does not predict a default issues_url" do expect(subject.to_hash['issues_url']).to be nil end end end context "with a invalid dependency name" do let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule'}] }} it "raises an exception" do expect { subject }.to raise_error(ArgumentError) end end context "with a invalid version range" do let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule', 'version_requirement' => '>= banana'}] }} it "raises an exception" do expect { subject }.to raise_error(ArgumentError) end end end describe '#dashed_name' do it 'returns nil in the absence of a module name' do expect(metadata.update('version' => '1.0.0').release_name).to be_nil end it 'returns a hyphenated string containing namespace and module name' do data = metadata.update('name' => 'foo-bar') expect(data.dashed_name).to eq('foo-bar') end it 'properly handles slash-separated names' do data = metadata.update('name' => 'foo/bar') expect(data.dashed_name).to eq('foo-bar') end it 'is unaffected by author name' do data = metadata.update('name' => 'foo/bar', 'author' => 'me') expect(data.dashed_name).to eq('foo-bar') end end describe '#release_name' do it 'returns nil in the absence of a module name' do expect(metadata.update('version' => '1.0.0').release_name).to be_nil end it 'returns nil in the absence of a version' do expect(metadata.update('name' => 'foo/bar').release_name).to be_nil end it 'returns a hyphenated string containing module name and version' do data = metadata.update('name' => 'foo/bar', 'version' => '1.0.0') expect(data.release_name).to eq('foo-bar-1.0.0') end it 'is unaffected by author name' do data = metadata.update('name' => 'foo/bar', 'version' => '1.0.0', 'author' => 'me') expect(data.release_name).to eq('foo-bar-1.0.0') end end describe "#to_hash" do subject { metadata.to_hash } it "contains the default set of keys" do expect(subject.keys.sort).to eq(%w[ name version author summary license source issues_url project_page dependencies ].sort) end describe "['license']" do it "defaults to Apache 2" do expect(subject['license']).to eq("Apache-2.0") end end describe "['dependencies']" do it "defaults to an empty set" do expect(subject['dependencies']).to eq(Set.new) end end context "when updated with non-default data" do subject { metadata.update('license' => 'MIT', 'non-standard' => 'yup').to_hash } it "overrides the defaults" do expect(subject['license']).to eq('MIT') end it 'contains unanticipated values' do expect(subject['non-standard']).to eq('yup') end end end end puppet_forge-5.0.3/spec/unit/forge/v3/release_spec.rb0000644000004100000410000002263714515571425022613 0ustar www-datawww-datarequire 'spec_helper' require 'fileutils' describe PuppetForge::V3::Release do context 'connection management' do before(:each) do PuppetForge::Connection.authorization = nil PuppetForge::Connection.proxy = nil described_class.conn = PuppetForge::V3::Base.conn(true) end after(:each) do PuppetForge::Connection.authorization = nil PuppetForge::Connection.proxy = nil described_class.conn = nil end describe 'setting authorization value after a connection is created' do it 'should reset connection' do old_conn = described_class.conn PuppetForge::Connection.authorization = 'post-init auth value' new_conn = described_class.conn expect(new_conn).to_not eq(old_conn) expect(new_conn.headers).to include(:authorization => 'post-init auth value') end end describe 'setting proxy value after a connection is created' do it 'should reset connection' do old_conn = described_class.conn PuppetForge::Connection.proxy = 'http://proxy.example.com:8888' new_conn = described_class.conn expect(new_conn).to_not eq(old_conn) expect(new_conn.proxy).to_not be_nil expect(new_conn.proxy.uri.to_s).to eq('http://proxy.example.com:8888') end end end context 'with stubbed connection' do before do stub_api_for(PuppetForge::V3::Base) do |stubs| stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.0.1') stub_fixture(stubs, :get, '/v3/releases/absent-apache-0.0.1') stub_fixture(stubs, :get, '/v3/files/puppetlabs-apache-0.0.1.tar.gz') stub_fixture(stubs, :get, '/v3/modules/puppetlabs-apache') stub_fixture(stubs, :get, '/v3/releases?module=puppetlabs-apache') end end describe '::find' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } let(:missing_release) { PuppetForge::V3::Release.find('absent-apache-0.0.1') } it 'can find releases that exist' do expect(release.version).to eql('0.0.1') end it 'raises Faraday::ResourceNotFound for non-existent releases' do expect { missing_release }.to raise_error(Faraday::ResourceNotFound) end end describe '#module' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } it 'exposes the related module as a property' do expect(release.module).to_not be nil end it 'grants access to module attributes without an API call' do expect(PuppetForge::V3::Module).not_to receive(:request) expect(release.module.name).to eql('apache') end it 'transparently makes API calls for other attributes' do expect(PuppetForge::V3::Module).to receive(:request).once.and_call_original expect(release.module.created_at).to_not be nil end end describe '#download_url' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } it 'handles an API response that does not include a scheme and host' do release.file_uri = '/v3/files/puppetlabs-apache-0.0.1.tar.gz' uri_with_host = URI.join(PuppetForge.host, '/v3/files/puppetlabs-apache-0.0.1.tar.gz').to_s expect(release.download_url).to eql(uri_with_host) end it 'handles an API response that includes a scheme and host' do release.file_uri = 'https://example.com/v3/files/puppetlabs-apache-0.0.1.tar.gz' expect(release.download_url).to eql('https://example.com/v3/files/puppetlabs-apache-0.0.1.tar.gz') end context 'when PuppetForge.host has a path prefix' do around(:each) do |spec| old_host = PuppetForge.host PuppetForge.host = 'http://example.com/forge/api/' spec.run PuppetForge.host = old_host end it 'includes path prefix in download url' do expect(release.download_url).to eql('http://example.com/forge/api/v3/files/puppetlabs-apache-0.0.1.tar.gz') end end end describe '#download' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } let(:tarball) { "#{PROJECT_ROOT}/spec/tmp/module.tgz" } before { FileUtils.rm tarball rescue nil } after { FileUtils.rm tarball rescue nil } it 'downloads the file to the specified location' do expect(File.exist?(tarball)).to be false release.download(Pathname.new(tarball)) expect(File.exist?(tarball)).to be true end context 'when response is 403' do it "raises PuppetForge::ReleaseForbidden" do mock_conn = instance_double("PuppetForge::V3::Connection", :url_prefix => PuppetForge.host) allow(described_class).to receive(:conn).and_return(mock_conn) expect(mock_conn).to receive(:get).and_raise(Faraday::ClientError.new("403", {:status => 403, :body => ({:message => "Forbidden"}.to_json)})) expect { release.download(Pathname.new(tarball)) }.to raise_error(PuppetForge::ReleaseForbidden) end end context 'when connection fails' do it "re-raises original error" do mock_conn = instance_double("PuppetForge::V3::Connection", :url_prefix => PuppetForge.host) allow(described_class).to receive(:conn).and_return(mock_conn) expect(mock_conn).to receive(:get).and_raise(Faraday::ConnectionFailed.new("connection failed")) expect { release.download(Pathname.new(tarball)) }.to raise_error(Faraday::ConnectionFailed, /connection failed/) end end end describe '#verify' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } let(:tarball) { "#{PROJECT_ROOT}/spec/tmp/module.tgz" } let(:allow_md5) { true } before(:each) do FileUtils.rm tarball rescue nil release.download(Pathname.new(tarball)) end after(:each) { FileUtils.rm tarball rescue nil } context 'file_sha256 is available' do before(:each) do allow(release).to receive(:file_sha256).and_return("810ff2fb242a5dee4220f2cb0e6a519891fb67f2f828a6cab4ef8894633b1f50") end let(:mock_sha256) { double(Digest::SHA256, hexdigest: release.file_sha256) } it 'only verifies sha-256 checksum' do expect(Digest::SHA256).to receive(:file).and_return(mock_sha256) expect(Digest::MD5).not_to receive(:file) release.verify(tarball, allow_md5) end end context 'file_sha256 is not available' do let(:mock_md5) { double(Digest::MD5, hexdigest: release.file_md5) } it 'only verfies the md5 checksum' do expect(Digest::SHA256).not_to receive(:file) expect(Digest::MD5).to receive(:file).and_return(mock_md5) release.verify(tarball, allow_md5) end end context 'when allow_md5=false' do let(:allow_md5) { false } context 'file_sha256 is not available' do it 'raises an appropriate error' do expect(Digest::SHA256).not_to receive(:file) expect(Digest::MD5).not_to receive(:file) expect { release.verify(tarball, allow_md5) }.to raise_error(PuppetForge::Error, /cannot verify module release.*md5.*forbidden/i) end end end end describe '#metadata' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } it 'is lazy and repeatable' do 3.times do expect(release.module.releases.last.metadata).to_not be_nil end end end describe 'instance properies' do let(:release) { PuppetForge::V3::Release.find('puppetlabs-apache-0.0.1') } example 'are easily accessible' do expect(release.created_at).to_not be nil end end describe '#upload' do let(:tarball) { "#{PROJECT_ROOT}/spec/tmp/module.tgz" } let(:file_object) { double('file', read: 'file contents') } let(:release) { PuppetForge::V3::Release.upload(tarball) } let(:mock_conn) { instance_double('PuppetForge::V3::Connection', url_prefix: PuppetForge.host) } context 'when there is no auth token provided' do it 'raises PuppetForge::ReleaseForbidden' do allow(File).to receive(:file?).and_return(true) allow(File).to receive(:open).and_return(file_object) allow(described_class).to receive(:conn).and_return(mock_conn) response = { status: 403, body: { 'message' => 'Forbidden' }.to_json } expect(mock_conn).to receive(:post).and_raise(Faraday::ClientError.new('Forbidden', response)) expect { release }.to raise_error(PuppetForge::ReleaseForbidden) end end context 'when the module is not valid' do it 'raises PuppetForge::ReleaseBadRequest' do allow(File).to receive(:file?).and_return(true) allow(File).to receive(:open).and_return(file_object) allow(described_class).to receive(:conn).and_return(mock_conn) response = { status: 400, body: { message: 'Bad Content' }.to_json } expect(mock_conn).to receive(:post).and_raise(Faraday::ClientError.new('400', response)) expect { release }.to raise_error(PuppetForge::ReleaseBadContent) end end context 'when the tarball does not exist' do it 'raises PuppetForge::FileNotFound' do expect { PuppetForge::V3::Release.upload(tarball) }.to raise_error(PuppetForge::FileNotFound) end end end end end puppet_forge-5.0.3/spec/unit/forge/v3/base/0000755000004100000410000000000014515571425020534 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/forge/v3/base/paginated_collection_spec.rb0000644000004100000410000000610714515571425026246 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::V3::Base::PaginatedCollection do let(:klass) do allow(PuppetForge::V3::Base).to receive(:get_collection) do |url| data = { '/v3/collection' => [ { :data => :A }, { :data => :B }, { :data => :C } ], '/v3/collection?page=2' => [ { :data => :D }, { :data => :E }, { :data => :F } ], '/v3/collection?page=3' => [ { :data => :G }, { :data => :H } ], } meta = { '/v3/collection' => { :limit => 3, :offset => 0, :first => '/v3/collection', :previous => nil, :current => '/v3/collection', :next => '/v3/collection?page=2', :total => 8, }, '/v3/collection?page=2' => { :limit => 3, :offset => 0, :first => '/v3/collection', :previous => '/v3/collection', :current => '/v3/collection?page=2', :next => '/v3/collection?page=3', :total => 8, }, '/v3/collection?page=3' => { :limit => 3, :offset => 0, :first => '/v3/collection', :previous => '/v3/collection?page=2', :current => '/v3/collection?page=3', :next => nil, :total => 8, }, } PuppetForge::V3::Base::PaginatedCollection.new(PuppetForge::V3::Base, data[url], meta[url], {}) end PuppetForge::V3::Base end subject { klass.get_collection('/v3/collection') } def collect_data(paginated) paginated.to_a.collect do |x| x.data end end it '#all returns self for backwards compatibility.' do paginated = subject.all expect(paginated).to eq(subject) end it 'maps to a single page of the collection' do expect(collect_data(subject)).to eql([ :A, :B, :C ]) end it 'knows the size of the entire collection' do expect(subject.total).to be 8 end it 'contains only a subset of the entire collection' do expect(subject.size).to be 3 end it 'enables page navigation' do expect(subject.next).to_not be_empty expect(collect_data(subject.next)).to_not eql(collect_data(subject)) expect(collect_data(subject.next.previous)).to eql(collect_data(subject)) end it 'exposes the pagination metadata' do expect(subject.limit).to be subject.size end it 'exposes previous_url and next_url' do expected = subject.next_url expect(subject.next.next.previous_url).to eql(expected) end describe '#unpaginated' do it 'provides an iterator over the entire collection' do expected = [ :A, :B, :C, :D, :E, :F, :G, :H ] actual = subject.unpaginated.to_a.collect do |x| expect(x).to be_a(klass) x.data end expect(actual).to eql(expected) end it "provides a full iterator regardless of which page it's started on" do expected = [ :A, :B, :C, :D, :E, :F, :G, :H ] actual = subject.next.next.unpaginated.to_a.collect do |x| expect(x).to be_a(klass) x.data end expect(actual).to eql(expected) end end end puppet_forge-5.0.3/spec/unit/forge/v3/user_spec.rb0000644000004100000410000000260514515571425022142 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::V3::User do before do stub_api_for(PuppetForge::V3::User) do |stubs| stub_fixture(stubs, :get, '/v3/users/puppetlabs') stub_fixture(stubs, :get, '/v3/users/absent') end end describe '::find' do let(:user) { PuppetForge::V3::User.find('puppetlabs') } let(:missing_user) { PuppetForge::V3::User.find('absent') } it 'can find users that exist' do expect(user.username).to eq('puppetlabs') end it 'raises Faraday::ResourceNotFound for non-existent users' do expect { missing_user }.to raise_error(Faraday::ResourceNotFound) end end describe '#modules' do before do stub_api_for(PuppetForge::V3::Module) do |stubs| stub_fixture(stubs, :get, '/v3/modules?owner=puppetlabs') end end let(:user) { PuppetForge::V3::User.find('puppetlabs') } it 'should return a PaginatedCollection' do expect(user.modules).to be_a PuppetForge::V3::Base::PaginatedCollection end it 'should only return modules for the current user' do module_owners = user.modules.map(&:owner) expect(module_owners.group_by(&:username).keys).to eql(['puppetlabs']) end end describe 'instance properies' do let(:user) { PuppetForge::V3::User.find('puppetlabs') } example 'are easily accessible' do expect(user.created_at).to_not be nil end end end puppet_forge-5.0.3/spec/unit/forge/v3/module_spec.rb0000644000004100000410000000654314515571425022456 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::V3::Module do before do stub_api_for(PuppetForge::V3::Base) do |stubs| stub_fixture(stubs, :get, '/v3/modules/puppetlabs-apache') stub_fixture(stubs, :get, '/v3/modules/absent-apache') stub_fixture(stubs, :get, '/v3/users/puppetlabs') stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.0.1') stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.0.2') stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.0.3') stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.0.4') stub_fixture(stubs, :get, '/v3/releases/puppetlabs-apache-0.1.1') stub_fixture(stubs, :get, '/v3/releases?module=puppetlabs-apache') end end describe '::find' do let(:mod) { PuppetForge::V3::Module.find('puppetlabs-apache') } let(:mod_stateless) { PuppetForge::V3::Module.find_stateless('puppetlabs-apache') } let(:missing_mod) { PuppetForge::V3::Module.find('absent-apache') } it 'can find modules that exist' do expect(mod.name).to eq('apache') end it 'can find modules that exist from a stateless call' do expect(mod_stateless.name).to eq('apache') end it 'raises exception for non-existent modules' do expect { missing_mod }.to raise_error(PuppetForge::ModuleNotFound, 'Module absent-apache not found') end end describe '#owner' do let(:mod) { PuppetForge::V3::Module.find('puppetlabs-apache') } it 'exposes the related module as a property' do expect(mod.owner).to_not be nil end it 'grants access to module attributes without an API call' do expect(PuppetForge::V3::User).not_to receive(:request) expect(mod.owner.username).to eql('puppetlabs') end it 'transparently makes API calls for other attributes' do expect(PuppetForge::V3::User).to receive(:request).once.and_call_original expect(mod.owner.created_at).to_not be nil end end describe '#current_release' do let(:mod) { PuppetForge::V3::Module.find('puppetlabs-apache') } it 'exposes the current_release as a property' do expect(mod.current_release).to_not be nil end it 'grants access to release attributes without an API call' do expect(PuppetForge::V3::Release).not_to receive(:request) expect(mod.current_release.version).to_not be nil end end describe '#releases' do let(:mod) { PuppetForge::V3::Module.find('puppetlabs-apache') } it 'exposes the related releases as a property' do expect(mod.releases).to be_an Array end it 'knows the size of the collection' do expect(mod.releases).to_not be_empty end it 'grants access to release attributes without an API call' do expect(PuppetForge::V3::Release).not_to receive(:request) expect(mod.releases.map(&:version)).to_not include nil end it 'loads releases lazily' do versions = %w[ 0.0.1 0.0.2 0.0.3 0.0.4 0.1.1 ] releases = mod.releases.select { |x| versions.include? x.version } expect(PuppetForge::V3::Base).to receive(:request).exactly(5).times.and_call_original expect(releases.map(&:downloads)).to_not include nil end end describe 'instance properies' do let(:mod) { PuppetForge::V3::Module.find('puppetlabs-apache') } example 'are easily accessible' do expect(mod.created_at).to_not be nil end end end puppet_forge-5.0.3/spec/unit/forge/lazy_accessors_spec.rb0000644000004100000410000000754714515571425023672 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::LazyAccessors do let(:klass) do class PuppetForge::V3::Thing < PuppetForge::V3::Base # Needed for #inspect def uri "/things/1" end # Needed for fetch def slug "1" end def standalone_method "a/b/c" end def satisified_dependent_method "-#{local}-" end def unsatisfied_dependent_method "-#{remote}-" end def shadow "-#{super}-" end def remote_shadow "-#{super}-" end end PuppetForge::V3::Thing end let(:base_class) { PuppetForge::V3::Base } let(:local_data) { { :id => 1, :local => 'data', :shadow => 'x' } } let(:remote_data) { local_data.merge(:remote => 'DATA', :remote_shadow => 'X') } subject { klass.new(local_data) } it 'does not call methods to #inspect' do expect(subject).not_to receive(:shadow) subject.inspect end describe 'local attributes' do before { expect(klass).not_to receive(:request) } example 'allow access to local attributes' do expect(subject.local).to eql('data') end example 'provide local attributes predicates' do expect(subject.local?).to be true end example 'provide local attributes setters' do subject.local = 'foo' expect(subject.local).to eql('foo') end example 'allow access to local standalone methods' do expect(subject.standalone_method).to eql('a/b/c') end example 'allow access to locally satisfiable methods' do expect(subject.satisified_dependent_method).to eql('-data-') end example 'allow `super` access to shadowed attributes' do expect(subject.shadow).to eql('-x-') end example 'do not create accessors on the base class itself' do expect(klass.instance_methods(false)).to_not include(:local) subject.local rescue nil expect(klass.instance_methods(false)).to_not include(:local) end end describe 'remote attributes' do before do stub_api_for(base_class) do |api| api.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end example 'allow access to remote attributes' do expect(subject.remote).to eql('DATA') end example 'provide remote attributes predicates' do expect(subject.remote?).to be true end example 'provide remote attributes setters' do subject.remote = 'foo' expect(subject.remote).to eql('foo') end example 'allow multiple instances to access remote attributes' do expect(klass).to receive(:request).exactly(9).times.and_call_original 9.times { expect(klass.new(local_data).remote).to eql('DATA') } end example 'allow access to locally unsatisfiable methods' do expect(subject.unsatisfied_dependent_method).to eql('-DATA-') end example 'allow `super` access to shadowed remote attributes' do expect(subject.remote_shadow).to eql('-X-') end example 'do not create accessors on the base class itself' do expect(klass.instance_methods(false)).to_not include(:remote) subject.remote rescue nil expect(klass.instance_methods(false)).to_not include(:remote) end end describe 'unsatisfiable attributes' do before do stub_api_for(base_class) do |api| api.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end example 'raise an exception when accessing an unknown attribute' do expect { subject.unknown_attribute }.to raise_error(NoMethodError) end example 'do not create accessors on the base class itself' do expect(klass.instance_methods(false)).to_not include(:local) subject.unknown_attribute rescue nil expect(klass.instance_methods(false)).to_not include(:local) end end end puppet_forge-5.0.3/spec/unit/forge/util_spec.rb0000644000004100000410000000055014515571425021606 0ustar www-datawww-datarequire 'puppet_forge/util' describe PuppetForge::Util do describe "version_valid?" do it "returns true for a valid version" do expect(described_class.version_valid?('1.0.0')).to equal(true) end it "returns false for an invalid version" do expect(described_class.version_valid?('notaversion')).to equal(false) end end end puppet_forge-5.0.3/spec/unit/forge/connection_spec.rb0000644000004100000410000001122214515571425022766 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::Connection do before(:each) do PuppetForge.host = "https://forgeapi.puppet.com" end let(:test_conn) do PuppetForge::Connection end describe 'class methods' do subject { described_class } describe '#proxy=' do after(:each) do subject.proxy = nil end it "sets @proxy to value when passed non-empty string" do proxy = "http://proxy.example.com:3128" subject.proxy = proxy expect(subject.instance_variable_get(:@proxy)).to eq proxy end it "sets @proxy to nil when passed an empty string" do subject.proxy = '' expect(subject.instance_variable_get(:@proxy)).to be_nil end it "replaces existing @proxy value with nil when set to empty string" do subject.instance_variable_set(:@proxy, 'value') subject.proxy = '' expect(subject.instance_variable_get(:@proxy)).to be_nil end end describe '#accept_language=' do after(:each) do subject.accept_language = nil end it "sets @accept_language to value when passed non-empty string" do lang = "ja-JP" subject.accept_language = lang expect(subject.instance_variable_get(:@accept_language)).to eq lang end it "sets @accept_language to nil when passed an empty string" do subject.accept_language = '' expect(subject.instance_variable_get(:@accept_language)).to be_nil end it "replaces existing @accept_language value with nil when set to empty string" do subject.instance_variable_set(:@accept_language, 'value') subject.accept_language = '' expect(subject.instance_variable_get(:@accept_language)).to be_nil end end end describe 'creating a new connection' do let(:faraday_stubs) { Faraday::Adapter::Test::Stubs.new } subject { test_conn.make_connection('https://some.site/url', [:test, faraday_stubs]) } it 'parses response bodies with a JSON content-type into a hash' do faraday_stubs.get('/json') { [200, {'Content-Type' => 'application/json'}, '{"hello": "world"}'] } expect(subject.get('/json').body).to eq(:hello => 'world') end it 'returns the response body as-is when the content-type is not JSON' do faraday_stubs.get('/binary') { [200, {'Content-Type' => 'application/octet-stream'}, 'I am a big bucket of binary data'] } expect(subject.get('/binary').body).to eq('I am a big bucket of binary data') end it 'raises errors when the request has an error status code' do faraday_stubs.get('/error') { [503, {}, "The server caught fire and cannot service your request right now"] } expect { subject.get('/error') }.to raise_error(Faraday::ServerError, "the server responded with status 503") end context 'when an authorization value is provided' do let(:key) { "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" } let(:prepended_key) { "Bearer #{key}" } context 'when the key already includes the Bearer prefix as expected' do before(:each) do allow(described_class).to receive(:authorization).and_return(prepended_key) end it 'does not prepend it again' do expect(subject.headers).to include(:authorization => prepended_key) end end context 'when the key does not includ the Bearer prefix' do context 'when the value looks like a Forge API key' do before(:each) do allow(described_class).to receive(:authorization).and_return(key) end it 'prepends "Bearer"' do expect(subject.headers).to include(:authorization => prepended_key) end end context 'when the value does not look like a Forge API key' do let(:key) { "auth-test value" } before(:each) do allow(described_class).to receive(:authorization).and_return(key) end it 'does not alter the value' do expect(subject.headers).to include(:authorization => key) end end end end context 'when an accept language value is provided' do before(:each) do allow(described_class).to receive(:accept_language).and_return("ja-JP") end it 'sets accept-language header on requests' do expect(subject.headers).to include('Accept-Language' => "ja-JP") end end end describe 'creating a default connection' do it 'creates a connection with the PuppetForge host' do conn = test_conn.default_connection expect(conn.url_prefix.to_s).to eq 'https://forgeapi.puppet.com/' end end end puppet_forge-5.0.3/spec/unit/forge/lru_cache_spec.rb0000644000004100000410000001043214515571425022556 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::LruCache do it 'creates a cache key from a list of strings' do expect { subject.class.new_key('foo', 'bar', 'baz') }.not_to raise_error end it 'creates a new instance' do expect { PuppetForge::LruCache.new(1) }.not_to raise_error end it 'raises an error if max_size is not a positive integer' do expect { PuppetForge::LruCache.new(-1) }.to raise_error(ArgumentError) expect { PuppetForge::LruCache.new(0) }.to raise_error(ArgumentError) expect { PuppetForge::LruCache.new(1.5) }.to raise_error(ArgumentError) end it 'defaults to a max_size of 30' do expect(PuppetForge::LruCache.new.max_size).to eq(30) end it 'allows max_size to be set via the max_size parameter' do expect(PuppetForge::LruCache.new(42).max_size).to eq(42) end it 'provides a #get method' do expect(PuppetForge::LruCache.new).to respond_to(:get) end it 'provides a #put method' do expect(PuppetForge::LruCache.new).to respond_to(:put) end it 'provides a #clear method' do expect(PuppetForge::LruCache.new).to respond_to(:clear) end context 'with environment variables' do around(:each) do |example| @old_max_size = ENV['PUPPET_FORGE_MAX_CACHE_SIZE'] ENV['PUPPET_FORGE_MAX_CACHE_SIZE'] = '42' example.run ENV['PUPPET_FORGE_MAX_CACHE_SIZE'] = @old_max_size end it 'uses the value of the PUPPET_FORGE_MAX_CACHE_SIZE environment variable if present' do expect(PuppetForge::LruCache.new.max_size).to eq(42) end end context '#get' do it 'returns nil if the key is not present in the cache' do expect(PuppetForge::LruCache.new.get('foo')).to be_nil end it 'returns the cached value for the given key' do cache = PuppetForge::LruCache.new cache.put('foo', 'bar') expect(cache.get('foo')).to eq('bar') end it 'moves the key to the front of the LRU list' do cache = PuppetForge::LruCache.new cache.put('foo', 'bar') cache.put('baz', 'qux') cache.get('foo') expect(cache.send(:lru)).to eq(['foo', 'baz']) end it 'is thread-safe for get calls' do cache = PuppetForge::LruCache.new # Populate the cache with initial values cache.put('foo', 'bar') cache.put('baz', 'qux') # Create two threads for concurrent cache get operations thread_one = Thread.new do 100.times { expect(cache.get('foo')).to eq('bar') } end thread_two = Thread.new do 100.times { expect(cache.get('baz')).to eq('qux') } end # Wait for both threads to complete thread_one.join thread_two.join end end context '#put' do it 'adds the key to the front of the LRU list' do cache = PuppetForge::LruCache.new cache.put('foo', 'bar') expect(cache.send(:lru)).to eq(['foo']) end it 'adds the value to the cache' do cache = PuppetForge::LruCache.new cache.put('foo', 'bar') expect(cache.send(:cache)).to eq({ 'foo' => 'bar' }) end it 'removes the least recently used item if the cache is full' do cache = PuppetForge::LruCache.new(2) cache.put('foo', 'bar') cache.put('baz', 'qux') cache.put('quux', 'corge') expect(cache.send(:lru)).to eq(['quux', 'baz']) end it 'is thread-safe' do cache = PuppetForge::LruCache.new # Create two threads for concurrent cache operations thread_one = Thread.new do 100.times { cache.put('foo', 'bar') } end thread_two = Thread.new do 100.times { cache.put('baz', 'qux') } end # Wait for both threads to complete thread_one.join thread_two.join # At this point, we don't need to compare the LRU list, # because the order may change due to concurrent puts. # Instead, we simply expect the code to run without errors. expect { thread_one.value }.not_to raise_error expect { thread_two.value }.not_to raise_error end end context '#clear' do it 'clears the cache' do cache = PuppetForge::LruCache.new cache.put('foo', 'bar') cache.put('baz', 'qux') cache.clear expect(cache.send(:lru).empty?).to be_truthy expect(cache.send(:cache).empty?).to be_truthy end end end puppet_forge-5.0.3/spec/unit/forge/unpacker_spec.rb0000644000004100000410000000426214515571425022445 0ustar www-datawww-datarequire 'tmpdir' require 'spec_helper' describe PuppetForge::Unpacker do let(:source) { Dir.mktmpdir("source") } let(:target) { Dir.mktmpdir("unpacker") } let(:module_name) { 'myusername-mytarball' } let(:filename) { Dir.mktmpdir("module") + "/module.tar.gz" } let(:working_dir) { Dir.mktmpdir("working_dir") } let(:trash_dir) { Dir.mktmpdir("trash_dir") } it "attempts to untar file to temporary location" do minitar = double('PuppetForge::Tar::Mini') expect(minitar).to receive(:unpack).with(filename, anything()) do |src, dest| FileUtils.mkdir(File.join(dest, 'extractedmodule')) File.open(File.join(dest, 'extractedmodule', 'metadata.json'), 'w+') do |file| file.puts JSON.generate('name' => module_name, 'version' => '1.0.0') end true end expect(PuppetForge::Tar).to receive(:instance).and_return(minitar) PuppetForge::Unpacker.unpack(filename, target, trash_dir) expect(File).to be_directory(target) end it "returns the appropriate categories of the contents of the tar file from the tar implementation" do minitar = double('PuppetForge::Tar::Mini') expect(minitar).to receive(:unpack).with(filename, anything()) do |src, dest| FileUtils.mkdir(File.join(dest, 'extractedmodule')) File.open(File.join(dest, 'extractedmodule', 'metadata.json'), 'w+') do |file| file.puts JSON.generate('name' => module_name, 'version' => '1.0.0') end { :valid => [File.join('extractedmodule', 'metadata.json')], :invalid => [], :symlinks => [] } end expect(PuppetForge::Tar).to receive(:instance).and_return(minitar) file_lists = PuppetForge::Unpacker.unpack(filename, target, trash_dir) expect(file_lists).to eq({:valid=>["extractedmodule/metadata.json"], :invalid=>[], :symlinks=>[]}) expect(File).to be_directory(target) end it "attempts to set the ownership of a target dir to a source dir's owner" do source_path = Pathname.new(source) target_path = Pathname.new(target) expect(FileUtils).to receive(:chown_R).with(source_path.stat.uid, source_path.stat.gid, target_path) PuppetForge::Unpacker.harmonize_ownership(source_path, target_path) end end puppet_forge-5.0.3/spec/unit/forge/lazy_relations_spec.rb0000644000004100000410000002031214515571425023666 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::LazyRelations do class PuppetForge::V3::Parent < PuppetForge::V3::Base lazy :relation, 'Thing' lazy :chained, 'Parent' lazy_collection :relations, 'Thing' lazy_collection :parents, 'Parent' def uri "/parents/#{slug}" end def slug "1" end end class PuppetForge::V3::Thing < PuppetForge::V3::Base # Needed for #inspect def uri "/things/1" end # Needed for fetch def slug "1" end def standalone_method "a/b/c" end def satisified_dependent_method "-#{local}-" end def unsatisfied_dependent_method "-#{remote}-" end def shadow "-#{super}-" end def remote_shadow "-#{super}-" end end let(:base_class) { PuppetForge::V3::Base } let(:klass) do |*args| PuppetForge::V3::Parent end let(:related_class) do PuppetForge::V3::Thing end let(:local_data) { { :id => 1, :local => 'data', :shadow => 'x' } } let(:remote_data) { local_data.merge(:remote => 'DATA', :remote_shadow => 'X') } describe '.lazy' do subject { klass.new(:relation => local_data).relation } it do should be_a(related_class) end it 'does not call methods to #inspect' do expect(subject).not_to receive(:shadow) subject.inspect end describe 'local attributes' do before { expect(related_class).not_to receive(:request) } example 'allow access to local attributes' do expect(subject.local).to eql('data') end example 'provide local attributes predicates' do expect(subject.local?).to be true end example 'provide local attributes setters' do subject.local = 'foo' expect(subject.local).to eql('foo') end example 'allow access to local standalone methods' do expect(subject.standalone_method).to eql('a/b/c') end example 'allow access to locally satisfiable methods' do expect(subject.satisified_dependent_method).to eql('-data-') end example 'allow `super` access to shadowed attributes' do expect(subject.shadow).to eql('-x-') end end describe 'remote attributes' do before do stub_api_for(base_class) do |stubs| stubs.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end example 'allow access to remote attributes' do expect(subject.remote).to eql('DATA') end example 'provide remote attributes predicates' do expect(subject.remote?).to be true end example 'provide remote attributes setters' do subject.remote = 'foo' expect(subject.remote).to eql('foo') end example 'allow multiple instances to access remote attributes' do expect(related_class).to receive(:request) \ .exactly(9).times \ .and_call_original 9.times do subject = klass.new(:relation => local_data).relation expect(subject.remote).to eql('DATA') end end example 'allow access to locally unsatisfiable methods' do expect(subject.unsatisfied_dependent_method).to eql('-DATA-') end example 'allow `super` access to shadowed remote attributes' do expect(subject.remote_shadow).to eql('-X-') end end describe 'remote relations' do before do stub_api_for(base_class) do |api| api.get('/v3/parents/1') do data = { :id => 1, :relation => local_data } [ 200, { 'Content-Type' => 'json' }, data ] end api.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end subject { klass.new(:chained => { :id => 1 }) } example 'allow chained lookups of lazy relations' do expect(subject.chained.relation.remote).to eql('DATA') end end describe 'null relations' do subject { klass.new(:relation => nil) } example 'do not return new instances' do expect(subject.relation).to be nil end end describe 'unsatisfiable attributes' do before do stub_api_for(base_class) do |api| api.get('/v3/parents/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end subject { klass.new(local_data) } example 'raise an exception when accessing an unknown attribute' do expect { subject.unknown_attribute }.to raise_error(NoMethodError) end end end describe '.lazy_collection' do subject { klass.new(:relations => [local_data]).relations.first } it { should be_a(related_class) } it 'does not call methods to #inspect' do expect(subject).not_to receive(:shadow) subject.inspect end describe 'local attributes' do before { expect(related_class).not_to receive(:request) } example 'allow access to local attributes' do expect(subject.local).to eql('data') end example 'provide local attributes predicates' do expect(subject.local?).to be true end example 'provide local attributes setters' do subject.local = 'foo' expect(subject.local).to eql('foo') end example 'allow access to local standalone methods' do expect(subject.standalone_method).to eql('a/b/c') end example 'allow access to locally satisfiable methods' do expect(subject.satisified_dependent_method).to eql('-data-') end example 'allow `super` access to shadowed attributes' do expect(subject.shadow).to eql('-x-') end end describe 'remote attributes' do before do stub_api_for(base_class) do |api| api.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end example 'allow access to remote attributes' do expect(subject.remote).to eql('DATA') end example 'provide remote attributes predicates' do expect(subject.remote?).to be true end example 'provide remote attributes setters' do subject.remote = 'foo' expect(subject.remote).to eql('foo') end example 'allow multiple instances to access remote attributes' do expect(related_class).to receive(:request) \ .exactly(9).times \ .and_call_original 9.times do subject = klass.new(:relations => [local_data]).relations.first expect(subject.remote).to eql('DATA') end end example 'allow access to locally unsatisfiable methods' do expect(subject.unsatisfied_dependent_method).to eql('-DATA-') end example 'allow `super` access to shadowed remote attributes' do expect(subject.remote_shadow).to eql('-X-') end end describe 'remote relations' do before do stub_api_for(base_class) do |api| api.get('/v3/parents/1') do data = { :id => 1, :parents => [{ :id => 1, :relation => local_data }] } [ 200, { 'Content-Type' => 'json' }, data ] end api.get('/v3/things/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end subject { klass.new(:id => 1) } example 'allow chained lookups of lazy relations' do expect(subject.parents[0].relation.remote).to eql('DATA') end end describe 'null relations' do subject { klass.new(:relations => nil) } example 'return an empty list' do expect(subject.relations).to be_empty end end describe 'unsatisfiable attributes' do before do stub_api_for(base_class) do |api| api.get('/v3/parents/1') do [ 200, { 'Content-Type' => 'json' }, remote_data ] end end end subject { klass.new(local_data) } example 'raise an exception when accessing an unknown attribute' do expect { subject.unknown_attribute }.to raise_error(NoMethodError) end end end end puppet_forge-5.0.3/spec/unit/forge/connection/0000755000004100000410000000000014515571425021431 5ustar www-datawww-datapuppet_forge-5.0.3/spec/unit/forge/connection/connection_failure_spec.rb0000644000004100000410000000263014515571425026637 0ustar www-datawww-datarequire 'spec_helper' # The adapter NetHttp must be required before the SocketError (used below) is accessible require 'faraday/adapter/net_http' describe PuppetForge::Connection::ConnectionFailure do subject do Faraday.new('https://my-site.url/some-path') do |builder| builder.use(:connection_failure) builder.adapter :test do |stub| stub.get('/connectfail') { raise Faraday::ConnectionFailed.new(SocketError.new("getaddrinfo: Name or service not known"), :hi) } stub.get('/timeout') { raise Faraday::TimeoutError, "request timed out" } end end end it "includes the base URL in the error message" do expect { subject.get('/connectfail') }.to raise_error(Faraday::ConnectionFailed, /unable to connect to.*\/connectfail.*name or service not known/i) end it "logs for timeout errors" do expect { subject.get('/timeout') }.to raise_error(Faraday::ConnectionFailed, /unable to connect to.*\/timeout.*request timed out/i) end it "includes the proxy host in the error message when set" do if subject.respond_to?(:proxy=) subject.proxy = 'https://some-unreachable.proxy:3128' else subject.proxy('https://some-unreachable.proxy:3128') end expect { subject.get('/connectfail') }.to raise_error(Faraday::ConnectionFailed, /unable to connect to.*using proxy.*\/connectfail.*name or service not known/i) end end puppet_forge-5.0.3/spec/unit/forge/tar_spec.rb0000644000004100000410000000026514515571425021422 0ustar www-datawww-datarequire 'spec_helper' describe PuppetForge::Tar do it "returns an instance of minitar" do expect(described_class.instance).to be_a_kind_of PuppetForge::Tar::Mini end end puppet_forge-5.0.3/spec/tmp/0000755000004100000410000000000014515571425016011 5ustar www-datawww-datapuppet_forge-5.0.3/spec/tmp/.gitkeep0000644000004100000410000000000014515571425017430 0ustar www-datawww-datapuppet_forge-5.0.3/spec/spec_helper.rb0000644000004100000410000000414114515571425020027 0ustar www-datawww-dataPROJECT_ROOT = File.join(File.dirname(__FILE__), '..') if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" end end require 'puppet_forge' module StubbingFaraday def stub_api_for(klass, base_url = "http://api.example.com", lru_cache: false) unless lru_cache # Disable LRU cache by default allow(klass).to receive(:lru_cache).and_return(instance_double('PuppetForge::LruCache', get: nil, put: nil, clear: nil)) end allow(klass).to receive(:conn) do Faraday.new :url => base_url do |builder| builder.response(:json, :content_type => /\bjson$/, :parser_options => { :symbolize_names => true }) builder.response(:raise_error) builder.use(:connection_failure) builder.adapter(:test) { |s| yield(s) } end end stubs = Faraday::Adapter::Test::Stubs.new end def stub_fixture(stubs, method, path) stubs.send(method, path) do |env| load_fixture([ env[:url].path, env[:url].query ].compact.join('?')) end end def load_fixture(path) xplatform_path = path.to_s.gsub('?', '__') [ 404 ].tap do |response| local = File.join(PROJECT_ROOT, 'spec', 'fixtures', xplatform_path) if File.exist?("#{local}.headers") && File.exist?("#{local}.json") File.open("#{local}.headers") do |file| response[0] = file.readline[/\d{3}/].to_i response[1] = headers = {} file.read.scan(/^([^:]+?):(.*)/) do |key, val| headers[key] = val.strip end end response << File.read("#{local}.json") end end end end RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus config.include StubbingFaraday # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 config.order = 'random' config.before(:example) do @old_host = PuppetForge.host end config.after(:example) do PuppetForge.host = @old_host end end puppet_forge-5.0.3/CHANGELOG.md0000644000004100000410000001655214515571425016101 0ustar www-datawww-data # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). ## [v5.0.3](https://github.com/puppetlabs/forge-ruby/tree/v5.0.3) - 2023-10-13 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.1...v5.0.3) ## [v5.0.1](https://github.com/puppetlabs/forge-ruby/tree/v5.0.1) - 2023-07-10 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v5.0.0...v5.0.1) ## [v5.0.0](https://github.com/puppetlabs/forge-ruby/tree/v5.0.0) - 2023-06-07 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.1.0...v5.0.0) ## [v4.1.0](https://github.com/puppetlabs/forge-ruby/tree/v4.1.0) - 2023-02-21 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v4.0.0...v4.1.0) ### Added - (CONT-643) Add upload method functionality [#102](https://github.com/puppetlabs/forge-ruby/pull/102) ([chelnak](https://github.com/chelnak)) ## [v4.0.0](https://github.com/puppetlabs/forge-ruby/tree/v4.0.0) - 2022-12-01 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.2.0...v4.0.0) ## [v3.2.0](https://github.com/puppetlabs/forge-ruby/tree/v3.2.0) - 2021-11-09 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.1.0...v3.2.0) ## [v3.1.0](https://github.com/puppetlabs/forge-ruby/tree/v3.1.0) - 2021-08-20 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v3.0.0...v3.1.0) ## [v3.0.0](https://github.com/puppetlabs/forge-ruby/tree/v3.0.0) - 2021-01-28 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.4...v3.0.0) ## [v2.3.4](https://github.com/puppetlabs/forge-ruby/tree/v2.3.4) - 2020-03-31 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.3...v2.3.4) ## [v2.3.3](https://github.com/puppetlabs/forge-ruby/tree/v2.3.3) - 2020-02-20 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.2...v2.3.3) ## [v2.3.2](https://github.com/puppetlabs/forge-ruby/tree/v2.3.2) - 2020-02-05 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.1...v2.3.2) ## [v2.3.1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.1) - 2019-11-15 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.0...v2.3.1) ## [v2.3.0](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0) - 2019-07-10 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.3.0.rc1...v2.3.0) ## [v2.3.0.rc1](https://github.com/puppetlabs/forge-ruby/tree/v2.3.0.rc1) - 2019-07-10 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.9...v2.3.0.rc1) ## [v2.2.9](https://github.com/puppetlabs/forge-ruby/tree/v2.2.9) - 2017-12-01 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.8...v2.2.9) ## [v2.2.8](https://github.com/puppetlabs/forge-ruby/tree/v2.2.8) - 2017-11-09 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.7...v2.2.8) ### Added - (RK-306) Add helper method in puppet_forge for valid semantic version. [#51](https://github.com/puppetlabs/forge-ruby/pull/51) ([andersonmills](https://github.com/andersonmills)) ## [v2.2.7](https://github.com/puppetlabs/forge-ruby/tree/v2.2.7) - 2017-06-30 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.6...v2.2.7) ## [v2.2.6](https://github.com/puppetlabs/forge-ruby/tree/v2.2.6) - 2017-06-27 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.5...v2.2.6) ## [v2.2.5](https://github.com/puppetlabs/forge-ruby/tree/v2.2.5) - 2017-06-26 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.4...v2.2.5) ## [v2.2.4](https://github.com/puppetlabs/forge-ruby/tree/v2.2.4) - 2017-04-17 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.3...v2.2.4) ### Added - (MAINT) Add ability to set Accept-Language header for API requests. [#43](https://github.com/puppetlabs/forge-ruby/pull/43) ([scotje](https://github.com/scotje)) ## [v2.2.3](https://github.com/puppetlabs/forge-ruby/tree/v2.2.3) - 2017-01-17 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.6...v2.2.3) ## [v1.0.6](https://github.com/puppetlabs/forge-ruby/tree/v1.0.6) - 2016-07-25 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.2...v1.0.6) ## [v2.2.2](https://github.com/puppetlabs/forge-ruby/tree/v2.2.2) - 2016-07-06 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.1...v2.2.2) ## [v2.2.1](https://github.com/puppetlabs/forge-ruby/tree/v2.2.1) - 2016-05-24 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.2.0...v2.2.1) ## [v2.2.0](https://github.com/puppetlabs/forge-ruby/tree/v2.2.0) - 2016-05-10 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.5...v2.2.0) ## [v2.1.5](https://github.com/puppetlabs/forge-ruby/tree/v2.1.5) - 2016-04-13 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.4...v2.1.5) ## [v2.1.4](https://github.com/puppetlabs/forge-ruby/tree/v2.1.4) - 2016-04-01 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.3...v2.1.4) ## [v2.1.3](https://github.com/puppetlabs/forge-ruby/tree/v2.1.3) - 2016-01-25 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.2...v2.1.3) ## [v2.1.2](https://github.com/puppetlabs/forge-ruby/tree/v2.1.2) - 2015-12-17 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.1...v2.1.2) ## [v2.1.1](https://github.com/puppetlabs/forge-ruby/tree/v2.1.1) - 2015-10-06 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.1.0...v2.1.1) ## [v2.1.0](https://github.com/puppetlabs/forge-ruby/tree/v2.1.0) - 2015-08-27 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v2.0.0...v2.1.0) ## [v2.0.0](https://github.com/puppetlabs/forge-ruby/tree/v2.0.0) - 2015-08-14 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.5...v2.0.0) ### Added - (CODEMGMT-308) Add hash keys to symbols middleware [#14](https://github.com/puppetlabs/forge-ruby/pull/14) ([austb](https://github.com/austb)) - (CODEMGMT-296) Add PaginatedCollection ORM for where request [#11](https://github.com/puppetlabs/forge-ruby/pull/11) ([austb](https://github.com/austb)) - Add ORM for individual item (User/Module/Release) [#10](https://github.com/puppetlabs/forge-ruby/pull/10) ([austb](https://github.com/austb)) ## [v1.0.5](https://github.com/puppetlabs/forge-ruby/tree/v1.0.5) - 2015-07-23 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.4...v1.0.5) ## [v1.0.4](https://github.com/puppetlabs/forge-ruby/tree/v1.0.4) - 2014-12-17 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.3...v1.0.4) ## [v1.0.3](https://github.com/puppetlabs/forge-ruby/tree/v1.0.3) - 2014-06-24 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.2...v1.0.3) ## [v1.0.2](https://github.com/puppetlabs/forge-ruby/tree/v1.0.2) - 2014-06-16 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.1...v1.0.2) ## [v1.0.1](https://github.com/puppetlabs/forge-ruby/tree/v1.0.1) - 2014-06-02 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/v1.0.0...v1.0.1) ## [v1.0.0](https://github.com/puppetlabs/forge-ruby/tree/v1.0.0) - 2014-05-16 [Full Changelog](https://github.com/puppetlabs/forge-ruby/compare/2f052f220f0b3f4e135d930491edecf222fc059f...v1.0.0) puppet_forge-5.0.3/.gitignore0000644000004100000410000000031314515571425016244 0ustar www-datawww-data*.gem *.rbc .bundle .config .yardoc Gemfile.lock InstalledFiles _yardoc /coverage /doc/ /lib/bundler/man /pkg /rdoc /spec/reports /test/tmp /test/version_tmp /tmp *.bundle *.so *.o *.a mkmf.log /vendor/ puppet_forge-5.0.3/Rakefile0000644000004100000410000000003414515571425015721 0ustar www-datawww-datarequire "bundler/gem_tasks" puppet_forge-5.0.3/lib/0000755000004100000410000000000014515571425015025 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge.rb0000644000004100000410000000122714515571425020053 0ustar www-datawww-datarequire 'puppet_forge/version' module PuppetForge class << self attr_accessor :user_agent attr_reader :host def host=(new_host) new_host = new_host.to_s new_host << '/' unless new_host[-1] == '/' # TODO: maybe freeze this @host = new_host end end DEFAULT_FORGE_HOST = 'https://forgeapi.puppet.com/' self.host = DEFAULT_FORGE_HOST require 'puppet_forge/tar' require 'puppet_forge/unpacker' require 'puppet_forge/v3' const_set :Metadata, PuppetForge::V3::Metadata const_set :User, PuppetForge::V3::User const_set :Module, PuppetForge::V3::Module const_set :Release, PuppetForge::V3::Release end puppet_forge-5.0.3/lib/puppet_forge/0000755000004100000410000000000014515571425017524 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge/tar/0000755000004100000410000000000014515571425020312 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge/tar/mini.rb0000644000004100000410000000573714515571425021607 0ustar www-datawww-datarequire 'zlib' require 'archive/tar/minitar' module PuppetForge class Tar class Mini SYMLINK_FLAGS = [2] VALID_TAR_FLAGS = (0..7) # @return [Hash{:symbol => Array}] a hash with file-category keys pointing to lists of filenames. def unpack(sourcefile, destdir) # directories need to be changed outside of the Minitar::unpack because directories don't have a :file_done action dirlist = [] file_lists = {} Zlib::GzipReader.open(sourcefile) do |reader| file_lists = validate_files(reader) Archive::Tar::Minitar.unpack(reader, destdir, file_lists[:valid]) do |action, name, stats| case action when :file_done FileUtils.chmod('u+rw,g+r,a-st', "#{destdir}/#{name}") when :file_start validate_entry(destdir, name) when :dir validate_entry(destdir, name) dirlist << "#{destdir}/#{name}" end end end dirlist.each {|d| File.chmod(0755, d)} file_lists end def pack(sourcedir, destfile) Zlib::GzipWriter.open(destfile) do |writer| Archive::Tar::Minitar.pack(sourcedir, writer) end end private # Categorize all the files in tarfile as :valid, :invalid, or :symlink. # # :invalid files include 'x' and 'g' flags from the PAX standard but and any other non-standard tar flags. # tar format info: http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Ftaf.htm # pax format info: http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Fpxarchfm.htm # :symlinks are not supported in Puppet modules # :valid files are any of those that can be used in modules # @param tarfile name of the tarfile # @return [Hash{:symbol => Array}] a hash with file-category keys pointing to lists of filenames. def validate_files(tarfile) file_lists = {:valid => [], :invalid => [], :symlinks => []} Archive::Tar::Minitar.open(tarfile).each do |entry| flag = entry.typeflag if flag.nil? || flag =~ /[[:digit:]]/ && SYMLINK_FLAGS.include?(flag.to_i) file_lists[:symlinks] << entry.full_name elsif flag.nil? || flag =~ /[[:digit:]]/ && VALID_TAR_FLAGS.include?(flag.to_i) file_lists[:valid] << entry.full_name else file_lists[:invalid] << entry.full_name end end file_lists end def validate_entry(destdir, path) if Pathname.new(path).absolute? raise PuppetForge::InvalidPathInPackageError, :entry_path => path, :directory => destdir end path = File.expand_path File.join(destdir, path) if path !~ /\A#{Regexp.escape destdir}/ raise PuppetForge::InvalidPathInPackageError, :entry_path => path, :directory => destdir end end end end end puppet_forge-5.0.3/lib/puppet_forge/v3.rb0000644000004100000410000000104114515571425020375 0ustar www-datawww-datamodule PuppetForge # Models specific to the Puppet Forge's v3 API. module V3 # Normalize a module name to use a hyphen as the separator between the # author and module. # @example # PuppetForge::V3.normalize_name('my/module') #=> 'my-module' # PuppetForge::V3.normalize_name('my-module') #=> 'my-module' def self.normalize_name(name) name.tr('/', '-') end end end require 'puppet_forge/v3/metadata' require 'puppet_forge/v3/user' require 'puppet_forge/v3/module' require 'puppet_forge/v3/release' puppet_forge-5.0.3/lib/puppet_forge/version.rb0000644000004100000410000000007514515571425021540 0ustar www-datawww-datamodule PuppetForge VERSION = '5.0.3' # Library version end puppet_forge-5.0.3/lib/puppet_forge/connection.rb0000644000004100000410000001030014515571425022202 0ustar www-datawww-datarequire 'puppet_forge/connection/connection_failure' require 'faraday' require 'faraday/follow_redirects' module PuppetForge # Provide a common mixin for adding a HTTP connection to classes. # # This module provides a common method for creating HTTP connections as well # as reusing a single connection object between multiple classes. Including # classes can invoke #conn to get a reasonably configured HTTP connection. # Connection objects can be passed with the #conn= method. # # @example # class HTTPThing # include PuppetForge::Connection # end # thing = HTTPThing.new # thing.conn = thing.make_connection('https://non-standard-forge.site') # # @api private module Connection attr_writer :conn AUTHORIZATION_TOKEN_REGEX = /^[a-f0-9]{64}$/ USER_AGENT = "#{PuppetForge.user_agent} PuppetForge.gem/#{PuppetForge::VERSION} Faraday/#{Faraday::VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})".strip def self.authorization=(token) @authorization = token # RK-229 Specific Workaround # Capture instance specific proxy setting if defined. if defined?(PuppetForge::V3::Base) if old_conn = PuppetForge::V3::Base.instance_variable_get(:@conn) self.proxy = old_conn.proxy.uri.to_s if old_conn.proxy end end end def self.authorization @authorization end def self.proxy=(url) url = nil if url.respond_to?(:empty?) && url.empty? @proxy = url end def self.proxy @proxy end def self.accept_language=(lang) lang = nil if lang.respond_to?(:empty?) && lang.empty? @accept_language = lang end def self.accept_language @accept_language end # @param reset_connection [Boolean] flag to create a new connection every time this is called # @param opts [Hash] Hash of connection options for Faraday # @return [Faraday::Connection] An existing Faraday connection if one was # already set, otherwise a new Faraday connection. def conn(reset_connection = nil, opts = {}) new_auth = @conn && @conn.headers['Authorization'] != PuppetForge::Connection.authorization new_proxy = @conn && ((@conn.proxy.nil? && PuppetForge::Connection.proxy) || (@conn.proxy && @conn.proxy.uri.to_s != PuppetForge::Connection.proxy)) new_lang = @conn && @conn.headers['Accept-Language'] != PuppetForge::Connection.accept_language if reset_connection || new_auth || new_proxy || new_lang default_connection(opts) else @conn ||= default_connection(opts) end end # @param opts [Hash] Hash of connection options for Faraday def default_connection(opts = {}) begin # Use Typhoeus if available. Gem::Specification.find_by_name('typhoeus', '~> 1.4') require 'typhoeus/adapters/faraday' adapter = :typhoeus rescue Gem::LoadError adapter = Faraday.default_adapter end make_connection(PuppetForge.host, [adapter], opts) end module_function :default_connection # Generate a new Faraday connection for the given URL. # # @param url [String] the base URL for this connection # @param opts [Hash] Hash of connection options for Faraday # @return [Faraday::Connection] def make_connection(url, adapter_args = nil, opts = {}) adapter_args ||= [Faraday.default_adapter] options = { :headers => { :user_agent => USER_AGENT } }.merge(opts) if token = PuppetForge::Connection.authorization options[:headers][:authorization] = token =~ AUTHORIZATION_TOKEN_REGEX ? "Bearer #{token}" : token end if lang = PuppetForge::Connection.accept_language options[:headers]['Accept-Language'] = lang end if proxy = PuppetForge::Connection.proxy options[:proxy] = proxy end Faraday.new(url, options) do |builder| builder.use Faraday::FollowRedirects::Middleware builder.response(:json, :content_type => /\bjson$/, :parser_options => { :symbolize_names => true }) builder.response(:raise_error) builder.use(:connection_failure) builder.adapter(*adapter_args) end end module_function :make_connection end end puppet_forge-5.0.3/lib/puppet_forge/v3/0000755000004100000410000000000014515571425020054 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge/v3/release.rb0000755000004100000410000000657214515571425022036 0ustar www-datawww-datarequire 'puppet_forge/v3/base' require 'puppet_forge/v3/module' require 'digest' require 'base64' module PuppetForge module V3 # Models a specific release version of a Puppet Module on the Forge. class Release < Base lazy :module, 'Module' # Returns a fully qualified URL for downloading this release from the Forge. # # @return [String] fully qualified download URL for release def download_url if URI.parse(file_uri).host.nil? URI.join(PuppetForge.host, file_uri[1..-1]).to_s else file_uri end end # Downloads the Release tarball to the specified file path. # # @param path [Pathname] # @return [void] def download(path) resp = self.class.conn.get(download_url) path.open('wb') { |fh| fh.write(resp.body) } rescue Faraday::ResourceNotFound => e raise PuppetForge::ReleaseNotFound, "The module release #{slug} does not exist on #{self.class.conn.url_prefix}.", e.backtrace rescue Faraday::ClientError => e if e.response && e.response[:status] == 403 raise PuppetForge::ReleaseForbidden.from_response(e.response) else raise e end end # Uploads the tarbarll to the forge # # @param path [Pathname] tarball file path # @return resp def self.upload(path) # We want to make sure that the file exists before trying to upload it raise PuppetForge::FileNotFound, "The file '#{path}' does not exist." unless File.file?(path) file = File.open(path, 'rb') encoded_string = Base64.encode64(file.read) data = { file: encoded_string } resp = conn.post do |req| req.url '/v3/releases' req.headers['Content-Type'] = 'application/json' req.body = data.to_json end [self, resp] rescue Faraday::ClientError => e if e.response case e.response[:status] when 403 raise PuppetForge::ReleaseForbidden.from_response(e.response) when 400 raise PuppetForge::ReleaseBadContent.from_response(e.response) end end raise e end # Verify that a downloaded module matches the best available checksum in the metadata for this release, # validates SHA-256 checksum if available, otherwise validates MD5 checksum # # @param path [Pathname] # @return [void] def verify(path, allow_md5 = true) checksum = if self.respond_to?(:file_sha256) && !self.file_sha256.nil? && !self.file_sha256.size.zero? { type: "SHA-256", expected: self.file_sha256, actual: Digest::SHA256.file(path).hexdigest, } elsif allow_md5 { type: "MD5", expected: self.file_md5, actual: Digest::MD5.file(path).hexdigest, } else raise PuppetForge::Error.new("Cannot verify module release: SHA-256 checksum is not available in API response and fallback to MD5 has been forbidden.") end return if checksum[:expected] == checksum[:actual] raise ChecksumMismatch.new("Unable to validate #{checksum[:type]} checksum for #{path}, download may be corrupt!") end class ChecksumMismatch < StandardError end end end end puppet_forge-5.0.3/lib/puppet_forge/v3/user.rb0000644000004100000410000000106114515571425021355 0ustar www-datawww-datarequire 'puppet_forge/v3/base' require 'puppet_forge/v3/module' module PuppetForge module V3 # Models a Forge user's account. class User < Base include PuppetForge::LazyAccessors # Returns a collection of Modules owned by the user. # # @note Because there is no related module data in the record, we can't # use a {#lazy_collection} here. # # @return [PaginatedCollection] the modules owned by this user def modules Module.where(:owner => username) end end end end puppet_forge-5.0.3/lib/puppet_forge/v3/metadata.rb0000644000004100000410000001503114515571425022161 0ustar www-datawww-datarequire 'uri' require 'json' require 'set' require 'semantic_puppet/version' module PuppetForge module V3 # This class provides a data structure representing a module's metadata. # @api private class Metadata attr_accessor :module_name DEFAULTS = { 'name' => nil, 'version' => nil, 'author' => nil, 'summary' => nil, 'license' => 'Apache-2.0', 'source' => '', 'project_page' => nil, 'issues_url' => nil, 'dependencies' => Set.new.freeze, } def initialize @data = DEFAULTS.dup @data['dependencies'] = @data['dependencies'].dup end # Returns a filesystem-friendly version of this module name. def dashed_name PuppetForge::V3.normalize_name(@data['name']) if @data['name'] end # Returns a string that uniquely represents this version of this module. def release_name return nil unless @data['name'] && @data['version'] [ dashed_name, @data['version'] ].join('-') end alias :name :module_name alias :full_module_name :dashed_name # Merges the current set of metadata with another metadata hash. This # method also handles the validation of module names and versions, in an # effort to be proactive about module publishing constraints. def update(data, with_dependencies = true) process_name(data) if data['name'] process_version(data) if data['version'] process_source(data) if data['source'] merge_dependencies(data) if with_dependencies && data['dependencies'] @data.merge!(data) return self end # Validates the name and version_requirement for a dependency, then creates # the Dependency and adds it. # Returns the Dependency that was added. def add_dependency(name, version_requirement=nil, repository=nil) validate_name(name) validate_version_range(version_requirement) if version_requirement if dup = @data['dependencies'].find { |d| d.full_module_name == name && d.version_requirement != version_requirement } raise ArgumentError, "Dependency conflict for #{full_module_name}: Dependency #{name} was given conflicting version requirements #{version_requirement} and #{dup.version_requirement}. Verify that there are no duplicates in the metadata.json or the Modulefile." end dep = Dependency.new(name, version_requirement, repository) @data['dependencies'].add(dep) dep end # Provides an accessor for the now defunct 'description' property. This # addresses a regression in Puppet 3.6.x where previously valid templates # refering to the 'description' property were broken. # @deprecated def description @data['description'] end def dependencies @data['dependencies'].to_a end # Returns a hash of the module's metadata. Used by Puppet's automated # serialization routines. # # @see Puppet::Network::FormatSupport#to_data_hash def to_hash @data end alias :to_data_hash :to_hash def to_json data = @data.dup.merge('dependencies' => dependencies) contents = data.keys.map do |k| value = (JSON.pretty_generate(data[k]) rescue data[k].to_json) "#{k.to_json}: #{value}" end "{\n" + contents.join(",\n").gsub(/^/, ' ') + "\n}\n" end # Expose any metadata keys as callable reader methods. def method_missing(name, *args) return @data[name.to_s] if @data.key? name.to_s super end private # Do basic validation and parsing of the name parameter. def process_name(data) validate_name(data['name']) author, @module_name = data['name'].split(/[-\/]/, 2) data['author'] ||= author if @data['author'] == DEFAULTS['author'] end # Do basic validation on the version parameter. def process_version(data) validate_version(data['version']) end # Do basic parsing of the source parameter. If the source is hosted on # GitHub, we can predict sensible defaults for both project_page and # issues_url. def process_source(data) if data['source'] =~ %r[://] source_uri = URI.parse(data['source']) else source_uri = URI.parse("http://#{data['source']}") end if source_uri.host =~ /^(www\.)?github\.com$/ source_uri.scheme = 'https' source_uri.path.sub!(/\.git$/, '') data['project_page'] ||= @data['project_page'] || source_uri.to_s data['issues_url'] ||= @data['issues_url'] || source_uri.to_s.sub(/\/*$/, '') + '/issues' end rescue URI::Error return end # Validates and parses the dependencies. def merge_dependencies(data) data['dependencies'].each do |dep| add_dependency(dep['name'], dep['version_requirement'], dep['repository']) end # Clear dependencies so @data dependencies are not overwritten data.delete 'dependencies' end # Validates that the given module name is both namespaced and well-formed. def validate_name(name) return if name =~ /\A[a-z0-9]+[-\/][a-z][a-z0-9_]*\Z/i namespace, modname = name.split(/[-\/]/, 2) modname = :namespace_missing if namespace == '' err = case modname when nil, '', :namespace_missing "the field must be a namespaced module name" when /[^a-z0-9_]/i "the module name contains non-alphanumeric (or underscore) characters" when /^[^a-z]/i "the module name must begin with a letter" else "the namespace contains non-alphanumeric characters" end raise ArgumentError, "Invalid 'name' field in metadata.json: #{err}" end # Validates that the version string can be parsed by SemanticPuppet. def validate_version(version) return if SemanticPuppet::Version.valid?(version) err = "version string cannot be parsed as a valid Semantic Version" raise ArgumentError, "Invalid 'version' field in metadata.json: #{err}" end # Validates that the version range can be parsed by SemanticPuppet. def validate_version_range(version_range) SemanticPuppet::VersionRange.parse(version_range) rescue ArgumentError => e raise ArgumentError, "Invalid 'version_range' field in metadata.json: #{e}" end end end end puppet_forge-5.0.3/lib/puppet_forge/v3/base.rb0000644000004100000410000001213314515571425021313 0ustar www-datawww-datarequire 'puppet_forge/connection' require 'puppet_forge/v3/base/paginated_collection' require 'puppet_forge/error' require 'puppet_forge/lazy_accessors' require 'puppet_forge/lazy_relations' require 'puppet_forge/lru_cache' module PuppetForge module V3 # Acts as the base class for all PuppetForge::V3::* models. # # @api private class Base include PuppetForge::LazyAccessors include PuppetForge::LazyRelations def initialize(json_response) @attributes = json_response orm_resp_item json_response end def orm_resp_item(json_response) json_response.each do |key, value| unless respond_to? key define_singleton_method("#{key}") { @attributes[key] } define_singleton_method("#{key}=") { |val| @attributes[key] = val } end end end # @return true if attribute exists, false otherwise # def has_attribute?(attr) @attributes.has_key?(:"#{attr}") end def attribute(name) @attributes[:"#{name}"] end def attributes @attributes end class << self include PuppetForge::Connection API_VERSION = "v3" def api_version API_VERSION end # @private def lru_cache @lru_cache ||= PuppetForge::LruCache.new end # @private def lru_cache_key(*args) PuppetForge::LruCache.new_key(*args) end # @private def request(resource, item = nil, params = {}, reset_connection = false, conn_opts = {}) cache_key = lru_cache_key(resource, item, params) cached = lru_cache.get(cache_key) return cached unless cached.nil? conn(reset_connection, conn_opts) if reset_connection unless conn.url_prefix.to_s =~ /^#{PuppetForge.host}/ conn.url_prefix = "#{PuppetForge.host}" end if item.nil? uri_path = "v3/#{resource}" else uri_path = "v3/#{resource}/#{item}" end # The API expects a space separated string. This allows the user to invoke it with a more natural feeling array. params['endorsements'] = params['endorsements'].join(' ') if params['endorsements'].is_a? Array result = PuppetForge::V3::Base.conn.get uri_path, params lru_cache.put(cache_key, result) result end # @private def find_request(slug, reset_connection = false, conn_opts = {}) return nil if slug.nil? resp = request("#{self.name.split("::").last.downcase}s", slug, {}, reset_connection, conn_opts) self.new(resp.body) end def find(slug) find_request(slug) end def find_stateless(slug, conn_opts = {}) find_request(slug, true, conn_opts) end # @private def where_request(params, reset_connection = false, conn_opts = {}) resp = request("#{self.name.split("::").last.downcase}s", nil, params, reset_connection, conn_opts) new_collection(resp) end def where(params) where_request(params) end def where_stateless(params, conn_opts = {}) where_request(params, true, conn_opts) end # Return a paginated collection of all modules def all(params = {}) where(params) end # Return a paginated collection of all modules def all_stateless(params = {}, conn_opts = {}) where_stateless(params, conn_opts) end # @private def get_collection_request(uri_path, reset_connection = false, conn_opts = {}) resource, params = split_uri_path uri_path resp = request(resource, nil, params, reset_connection, conn_opts) new_collection(resp) end def get_collection(uri_path) get_collection_request(uri_path) end def get_collection_stateless(uri_path, conn_opts) get_collection_request(uri_path, true, conn_opts) end # Faraday's Util#escape method will replace a '+' with '%2B' to prevent it being # interpreted as a space. For compatibility with the Forge API, we would like a '+' # to be interpreted as a space so they are changed to spaces here. def convert_plus_to_space(str) str.gsub(/[+]/, ' ') end # @private def split_uri_path(uri_path) all, resource, params = /(?:\/v3\/)([^\/]+)(?:\?)(.*)/.match(uri_path).to_a params = convert_plus_to_space(params).split('&') param_hash = Hash.new params.each do |param| key, val = param.split('=') param_hash[key] = val end [resource, param_hash] end # @private def new_collection(faraday_resp) if faraday_resp[:errors].nil? PaginatedCollection.new(self, faraday_resp.body[:results], faraday_resp.body[:pagination], nil) else PaginatedCollection.new(self) end end end end end end puppet_forge-5.0.3/lib/puppet_forge/v3/base/0000755000004100000410000000000014515571425020766 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge/v3/base/paginated_collection.rb0000644000004100000410000000534414515571425025470 0ustar www-datawww-datamodule PuppetForge module V3 class Base # Enables navigation of the Forge API's paginated datasets. class PaginatedCollection < Array # Default pagination limit for API request LIMIT = 20 # @api private # @param klass [PuppetForge::V3::Base] the class to page over # @param data [Array] the current data page # @param metadata [Hash<(:limit, :total, :offset)>] page metadata # @param errors [Object] errors for the page request def initialize(klass, data = [], metadata = {:total => 0, :offset => 0, :limit => LIMIT}, errors = nil) super() @metadata = metadata @errors = errors @klass = klass data.each do |item| self << @klass.new(item) end end # For backwards compatibility, all returns the current object. def all self end # An enumerator that iterates over the entire collection, independent # of API pagination. This will potentially result in several API # requests. # # @return [Enumerator] an iterator for the entire collection def unpaginated page = @klass.get_collection(@metadata[:first]) Enumerator.new do |emitter| loop do page.each { |x| emitter << x } break unless page = page.next end end end # @!method total # @return [Integer] the size of the unpaginated dataset # @!method limit # @return [Integer] the maximum size of any page in this dataset # @!method offset # @return [Integer] the offset for the current page [ :total, :limit, :offset ].each do |info| define_method(info) { @metadata[info] } end [ :next, :previous ].each do |link| # @!method next # Returns the next page if a next page exists. # @return [PaginatedCollection, nil] the next page # @!method previous # Returns the previous page if a previous page exists. # @return [PaginatedCollection, nil] the previous page define_method(link) do return unless path = @metadata[link] @klass.get_collection(path) end # @!method next_url # Returns the url of the next page if a next page exists. # @return [String, nil] the next page's url # @!method previous_url # Returns the url of the previous page if a previous page exists. # @return [String, nil] the previous page's url define_method("#{link}_url") do @metadata[link] end end end end end end puppet_forge-5.0.3/lib/puppet_forge/v3/module.rb0000644000004100000410000000075114515571425021671 0ustar www-datawww-datarequire 'puppet_forge/v3/base' require 'puppet_forge/v3/user' require 'puppet_forge/v3/release' module PuppetForge module V3 # Models a Puppet Module hosted on the Forge. class Module < Base lazy :owner, 'User' lazy :current_release, 'Release' lazy_collection :releases, 'Release' def self.find(slug) super rescue Faraday::ResourceNotFound raise PuppetForge::ModuleNotFound, "Module #{slug} not found" end end end end puppet_forge-5.0.3/lib/puppet_forge/tar.rb0000644000004100000410000000017414515571425020641 0ustar www-datawww-data module PuppetForge class Tar require 'puppet_forge/tar/mini' def self.instance Mini.new end end end puppet_forge-5.0.3/lib/puppet_forge/lazy_accessors.rb0000644000004100000410000001070214515571425023075 0ustar www-datawww-datamodule PuppetForge # When dealing with a remote service, it's reasonably common to receive only # a partial representation of the underlying object, with additional data # available upon request. PuppetForge, by default, provides a convenient interface # for accessing whatever local data is available, but lacks good support for # fleshing out partial representations. In order to build a seamless # interface for both local and remote attriibutes, this module replaces the # default behavior with an "updatable" interface. module LazyAccessors # Callback for module inclusion. # # On each lazy class we'll store a reference to a Module, which will act as # the container for the attribute methods. # # @param base [Class] the Class this module was included into # @return [void] def self.included(base) base.singleton_class.class_eval do attr_accessor :_accessor_container end end # Provide class name for object # def class_name self.class.name.split("::").last.downcase end # Override the default #inspect behavior. # # The original behavior actually invokes each attribute accessor, which can # be somewhat problematic when the accessors have been overridden. This # implementation simply reports the contents of the attributes hash. def inspect attrs = attributes.map do |x, y| [ x, y ].join('=') end "#<#{self.class}(#{uri}) #{attrs.join(' ')}>" end # Override the default #method_misssing behavior. # # When we receive a {#method_missing} call, one of three things is true: # - the caller is looking up a piece of local data without an accessor # - the caller is looking up a piece of remote data # - the method doesn't actually exist # # To solve the remote case, we begin by ensuring our attribute list is # up-to-date with a call to {#fetch}, create a new {AccessorContainer} if # necessary, and add any missing accessors to the container. We can then # dispatch the method call to the newly created accessor. # # The local case is almost identical, except that we can skip updating the # model's attributes. # # If, after our work, we haven't seen the requested method name, we can # surmise that it doesn't actually exist, and pass the call along to # upstream handlers. def method_missing(name, *args, &blk) fetch unless has_attribute?(name.to_s[/\w+/]) klass = self.class mod = (klass._accessor_container ||= AccessorContainer.new(klass)) mod.add_attributes(attributes.keys) if (meth = mod.instance_method(name) rescue nil) return meth.bind(self).call(*args) else return super(name, *args, &blk) end end # Updates model data from the API. This method will short-circuit if this # model has already been fetched from the remote server, to avoid duplicate # requests. # # @return [self] def fetch return self if @_fetch klass = self.class response = klass.request("#{self.class_name}s/#{self.slug}") if @_fetch = response.success? self.send(:initialize, response.body) end return self end # A Module subclass for attribute accessors. class AccessorContainer < Module # Creating a new instance of this class will automatically include itself # into the provided class. # # @param base [Class] the class this container belongs to def initialize(base) base.send(:include, self) end # Adds attribute accessors, predicates, and mutators for the named keys. # Since these methods will also be instantly available on all instances # of the parent class, each of these methods will also conservatively # {LazyAccessors#fetch} any missing data. # # @param keys [Array<#to_s>] the list of attributes to create # @return [void] def add_attributes(keys) keys.each do |key| next if methods.include?(name = key) define_method("#{name}") do fetch unless has_attribute?(name) attribute(name) end define_method("#{name}?") do fetch unless has_attribute?(name) has_attribute?(name) end define_method("#{name}=") do |value| fetch unless has_attribute?(name) attributes[name] = value end end end end end end puppet_forge-5.0.3/lib/puppet_forge/lazy_relations.rb0000644000004100000410000000670214515571425023115 0ustar www-datawww-datamodule PuppetForge # This module provides convenience accessors for related resources. Related # classes will include {LazyAccessors}, allowing them to transparently fetch # fetch more complete representations from the API. # # @see LazyAccessors module LazyRelations # Mask mistaken `include` calls by transparently extending this class. # @private def self.included(base) base.extend(self) end def parent if self.is_a? Class class_name = self.name else class_name = self.class.name end # Get the name of the version module version = class_name.split("::")[-2] if version.nil? raise RuntimeError, "Unable to determine the parent PuppetForge version module" end PuppetForge.const_get(version) end # @!macro [attach] lazy # @!method $1 # Returns a lazily-loaded $1 proxy. To eagerly load this $1, call # #fetch. # @return a proxy for the related $1 # # Declares a new lazily loaded property. # # This is particularly useful since our data hashes tend to contain at # least a partial representation of the related object. This mechanism # provides a proxy object which will avoid making HTTP requests until # it is asked for a property it does not contain, at which point it # will fetch the related object from the API and look up the property # from there. # # @param name [Symbol] the name of the lazy attribute # @param class_name [#to_s] the lazy relation's class name def lazy(name, class_name = name) klass = (class_name.is_a?(Class) ? class_name : nil) class_name = "#{class_name}" define_method(name) do @_lazy ||= {} @_lazy[name] ||= begin klass ||= parent.const_get(class_name) klass.send(:include, PuppetForge::LazyAccessors) fetch unless has_attribute?(name) value = attributes[name] klass.new(value) if value end end end # @!macro [attach] lazy_collection # @!method $1 # Returns a lazily-loaded proxy for a collection of $1. To eagerly # load any one of these $1, call #fetch. # @return [Array<$2>] a proxy for the related collection of $1 # # Declares a new lazily loaded collection. # # This behaves like {#lazy}, with the exception that the underlying # attribute is an array of property hashes, representing several # distinct models. In this case, we return an array of proxy objects, # one for each property hash. # # It's also worth pointing out that this is not a paginated collection. # Since the array of property hashes we're wrapping is itself # unpaginated and complete (if shallow), wrapping it in a paginated # collection doesn't provide any semantic value. # # @see LazyRelations # @param name [Symbol] the name of the lazy collection attribute # @param class_name [#to_s] the lazy relation's class name def lazy_collection(name, class_name = name) klass = (class_name.is_a?(Class) ? class_name : nil) class_name = "#{class_name}" define_method(name) do @_lazy ||= {} @_lazy[name] ||= begin klass ||= parent.const_get(class_name) klass.send(:include, PuppetForge::LazyAccessors) fetch unless has_attribute?(name) (attribute(name) || []).map { |x| klass.new(x) } end end end end end puppet_forge-5.0.3/lib/puppet_forge/error.rb0000644000004100000410000000250714515571425021206 0ustar www-datawww-datarequire 'json' module PuppetForge class Error < RuntimeError attr_accessor :original def initialize(message, original=nil) super(message) @original = original end end class ExecutionFailure < PuppetForge::Error end class InvalidPathInPackageError < PuppetForge::Error def initialize(options) @entry_path = options[:entry_path] @directory = options[:directory] super "Attempt to install file into #{@entry_path.inspect} under #{@directory.inspect}" end def multiline <<-MSG.strip Could not install package Package attempted to install file into #{@entry_path.inspect} under #{@directory.inspect}. MSG end end class ErrorWithDetail < PuppetForge::Error def self.from_response(response) body = JSON.parse(response[:body]) message = body['message'] if body.key?('errors') && !body['errors']&.empty? message << "\nThe following errors were returned from the server:\n - #{body['errors'].join("\n - ")}" end new(message) end end class FileNotFound < PuppetForge::Error end class ModuleNotFound < PuppetForge::Error end class ReleaseNotFound < PuppetForge::Error end class ReleaseForbidden < PuppetForge::ErrorWithDetail end class ReleaseBadContent < PuppetForge::ErrorWithDetail end end puppet_forge-5.0.3/lib/puppet_forge/lru_cache.rb0000644000004100000410000000473514515571425022007 0ustar www-datawww-datarequire 'digest' module PuppetForge # Implements a simple LRU cache. This is used internally by the # {PuppetForge::V3::Base} class to cache API responses. class LruCache # Takes a list of strings (or objects that respond to #to_s) and # returns a SHA256 hash of the strings joined with colons. This is # a convenience method for generating cache keys. Cache keys do not # have to be SHA256 hashes, but they must be unique. def self.new_key(*string_args) Digest(:SHA256).hexdigest(string_args.map(&:to_s).join(':')) end # @return [Integer] the maximum number of items to cache. attr_reader :max_size # @param max_size [Integer] the maximum number of items to cache. This can # be overridden by setting the PUPPET_FORGE_MAX_CACHE_SIZE environment # variable. def initialize(max_size = 30) raise ArgumentError, "max_size must be a positive integer" unless max_size.is_a?(Integer) && max_size > 0 @max_size = ENV['PUPPET_FORGE_MAX_CACHE_SIZE'] ? ENV['PUPPET_FORGE_MAX_CACHE_SIZE'].to_i : max_size @cache = {} @lru = [] @semaphore = Mutex.new end # Retrieves a value from the cache. # @param key [Object] the key to look up in the cache # @return [Object] the cached value for the given key, or nil if # the key is not present in the cache. def get(key) if cache.key?(key) semaphore.synchronize do # If the key is present, move it to the front of the LRU # list. lru.delete(key) lru.unshift(key) end cache[key] end end # Adds a value to the cache. # @param key [Object] the key to add to the cache # @param value [Object] the value to add to the cache def put(key, value) semaphore.synchronize do if cache.key?(key) # If the key is already present, delete it from the LRU list. lru.delete(key) elsif cache.size >= max_size # If the cache is full, remove the least recently used item. cache.delete(lru.pop) end # Add the key to the front of the LRU list and add the value # to the cache. lru.unshift(key) cache[key] = value end end # Clears the cache. def clear semaphore.synchronize do cache.clear lru.clear end end private # Makes testing easier as these can be accessed directly with #send. attr_reader :cache, :lru, :semaphore end end puppet_forge-5.0.3/lib/puppet_forge/connection/0000755000004100000410000000000014515571425021663 5ustar www-datawww-datapuppet_forge-5.0.3/lib/puppet_forge/connection/connection_failure.rb0000644000004100000410000000170214515571425026056 0ustar www-datawww-datarequire 'faraday' module PuppetForge module Connection # Wrap Faraday connection failures to include the host and optional proxy # in use for the failed connection. class ConnectionFailure < Faraday::Middleware def call(env) @app.call(env) rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e baseurl = env[:url].dup errmsg = "Unable to connect to %{scheme}://%{host}" % { scheme: baseurl.scheme, host: baseurl.host } if proxy = env[:request][:proxy] errmsg << " (using proxy %{proxy})" % { proxy: proxy.uri.to_s } end errmsg << " (for request %{path_query}): %{message}" % { message: e.message, path_query: baseurl.request_uri } m = Faraday::ConnectionFailed.new(errmsg) m.set_backtrace(e.backtrace) raise m end end end end Faraday::Middleware.register_middleware(:connection_failure => PuppetForge::Connection::ConnectionFailure) puppet_forge-5.0.3/lib/puppet_forge/unpacker.rb0000644000004100000410000000403214515571425021660 0ustar www-datawww-datarequire 'pathname' require 'puppet_forge/error' require 'puppet_forge/tar' module PuppetForge class Unpacker # Unpack a tar file into a specified directory # # @param filename [String] the file to unpack # @param target [String] the target directory to unpack into # @return [Hash{:symbol => Array}] a hash with file-category keys pointing to lists of filenames. # The categories are :valid, :invalid and :symlink def self.unpack(filename, target, tmpdir) inst = self.new(filename, target, tmpdir) file_lists = inst.unpack inst.move_into(Pathname.new(target)) file_lists end # Set the owner/group of the target directory to those of the source # Note: don't call this function on Microsoft Windows # # @param source [Pathname] source of the permissions # @param target [Pathname] target of the permissions change def self.harmonize_ownership(source, target) FileUtils.chown_R(source.stat.uid, source.stat.gid, target) end # @param filename [String] the file to unpack # @param target [String] the target directory to unpack into def initialize(filename, target, tmpdir) @filename = filename @target = target @tmpdir = tmpdir end # @api private def unpack begin PuppetForge::Tar.instance.unpack(@filename, @tmpdir) rescue PuppetForge::ExecutionFailure => e raise RuntimeError, "Could not extract contents of module archive: #{e.message}" end end # @api private def move_into(dir) dir.rmtree if dir.exist? FileUtils.mv(root_dir, dir) ensure FileUtils.rmtree(@tmpdir) end # @api private def root_dir return @root_dir if @root_dir # Grab the first directory containing a metadata.json file metadata_file = Dir["#{@tmpdir}/**/metadata.json"].sort_by(&:length)[0] if metadata_file @root_dir = Pathname.new(metadata_file).dirname else raise "No valid metadata.json found!" end end end end puppet_forge-5.0.3/lib/puppet_forge/util.rb0000644000004100000410000000025114515571425021024 0ustar www-datawww-datarequire 'semantic_puppet' module PuppetForge class Util def self.version_valid?(version) return SemanticPuppet::Version.valid?(version) end end end puppet_forge-5.0.3/puppet_forge.gemspec0000644000004100000410000000301314515571425020320 0ustar www-datawww-data# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'puppet_forge/version' Gem::Specification.new do |spec| spec.name = "puppet_forge" spec.version = PuppetForge::VERSION spec.authors = ["Puppet Labs"] spec.email = ["forge-team+api@puppetlabs.com"] spec.summary = "Access the Puppet Forge API from Ruby for resource information and to download releases." spec.description = %q{Tools that can be used to access Forge API information on Modules, Users, and Releases. As well as download, unpack, and install Releases to a directory.} spec.homepage = "https://github.com/puppetlabs/forge-ruby" spec.license = "Apache-2.0" spec.files = `git ls-files -z`.split("\x0") spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.required_ruby_version = '>= 2.6.0' spec.add_runtime_dependency "faraday", "~> 2.0" spec.add_runtime_dependency "faraday-follow_redirects", "~> 0.3.0" spec.add_dependency "semantic_puppet", "~> 1.0" spec.add_dependency "minitar" spec.add_development_dependency "rake" spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "simplecov" spec.add_development_dependency "cane" spec.add_development_dependency "yard" spec.add_development_dependency "redcarpet" spec.add_development_dependency "pry-byebug" end puppet_forge-5.0.3/Gemfile0000644000004100000410000000014114515571425015546 0ustar www-datawww-datasource 'https://rubygems.org' # Specify your gem's dependencies in puppet_forge.gemspec gemspec puppet_forge-5.0.3/History.md0000644000004100000410000001532614515571425016251 0ustar www-datawww-data# Change Log Starting with v2.0.0, all notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## Following the release of version 5.0.2 on October 13, 2023, an automated changelog has been implemented, this document is an archived copy of the previous changelog ## v5.0.2 - 2023-09-29 * Correct a Digest call making this thread-safe and allowing for concurrent r10k deploys. Thanks to @cmd-ntrf for fixing it and to @baurmatt for tracking it down in the first place. ## v5.0.1 - 2023-07-10 * Update README to reflect accurate Ruby requirement and `faraday` gem dependency ## v5.0.0 - 2023-05-07 * Ruby 3.2 support. * LRU caching for HTTP response caching. * Raise a ModuleNotFound error instead of just nil when a module is not found. ## v4.1.0 - 2023-02-21 * Add upload method functionality. * Allows the user to search by an array of endorsements. ## v4.0.0 - 2022-11-30 * Breaking: The `puppet_forge` gem now requires at least Ruby 2.6.0 * Update `faraday` gem to 2.x series ## v3.2.0 - 2021-11-09 * Allow requests to follow redirects * Remove the `gettext-setup` gem dependency, which was unused ## v3.1.0 - 2021-08-20 ### Changed * Update `PuppetForge::Connection.authorization` so that it prepends the required `Bearer ` string automatically to values that look like Forge API keys. This won't affect values that already include `Bearer `. ## v3.0.0 - 2021-01-28 * Breaking: The `puppet_forge` gem now requires at least Ruby 2.4.0. * Update `faraday` and `faraday_middleware` gem dependencies to 1.x series. * Update optional `typhoeus` dependency to `>= 1.4` to maintain compatibility with `faraday`. ## v2.3.4 - 2020-03-31 * Update the forge API url to `forgeapi.puppet.com` (instead of using the older puppetlabs.com domain). * Allow versions of the `faraday_middleware` dependency up to 0.15. ## v2.3.3 - 2020-02-20 ### Changed * Allow versions of faraday up to 0.18 ## v2.3.2 - 2020-02-05 ### Fixed * Catch and handle the new `Faraday::TimeoutError`s which are occasionally surfaced by the the typheous adapter with more recent verions of libcurl, and log them the same way that `Faraday::ConnectionFailed` errors are already logged. ### Changed * Allow for using `faraday_middleware` versions in the 0.13.x series. ## v2.3.1 - 2019-11-15 ### Fixed * Fixed an issue where proxy configurations were being ignored by expanding the range of acceptable versions of the `faraday` gem dependency and specifically excluding the version that was ignoring proxy configuration options. ## v2.3.0 - 2019-07-09 ### Changed * Updated `PuppetForge::V3::Release#verify` method to use `file_sha256` checksum from Forge API when available. * Added an `allow_md5` param to `PuppetForge::V3::Release#verify` method to control whether or not fallback to MD5 checksum will be allowed in cases where SHA-256 checksum is not available. ## v2.2.9 - 2017-12-01 ### Changed * Loosened dependency on `faraday` and `faraday_middleware` gems to include recent releases. ## v2.2.8 - 2017-11-09 ### Added Created PuppetForge::Util class with a single method, version_valid?, in order to drop the r10k dependency on semantic_puppet. ## v2.2.7 - 2017-06-30 ### Changed * Updated dependency on `semantic_puppet` to `~> 1.0`. ## v2.2.6 - 2017-06-27 ### Fixed * Fixed an issue when attempting to assign a non-String value to `PuppetForge.host`. ## v2.2.5 - 2017-06-26 ### Fixed * (FORGE-338) Fixed an issue where `V3::Release.download_url` returned an incorrect value when `PuppetForge.host` included a path prefix. (Thanks to [Jainish Shah](https://github.com/jainishshah17) for the report and initial fix proposal.) ## v2.2.4 - 2017-04-17 ### Added * PuppetForge::Connection now has .accept\_language and .accept\_language= class methods providing a way to set the 'Accept-Language' header for outbound requests. ## v2.2.3 - 2017-01-17 ### Changed * Fixed an issue that was preventing PuppetForge.host from honoring any given path prefix. * Upgraded gettext-setup dependency to 0.11 release. ## v2.2.2 - 2016-07-06 ### Changed * Externalized all user facing strings with gettext to support future localization work. ## v2.2.1 - 2016-05-24 ### Changed * Fixed an issue where certain types of connection failures raised a spurious "method missing" error instead of the underlying exception. * When setting PuppetForge::Connection.proxy, an empty string will now be treated as nil. If no proxy has yet been configured, setting to an empty string will have no effect. If a proxy has already been configured, setting to nil will unset the existing value. ## v2.2.0 - 2016-05-10 ### Changed * puppet\_forge's optional dependency on Typhoeus now searches for a gem matching '~> 1.0.1' so it will pick up more recent versions. NOTE: This means if you have a version of Typhoeus installed that is less than 1.0.1, puppet\_forge will no longer use the Typhoeus adapter and will fall back to Ruby's Net::HTTP library. ## v2.1.5 - 2016-04-13 ### Added * PuppetForge::Connection now has .proxy and .proxy= class methods providing a more reliable way of configuring an HTTP proxy. ### Changed * Cached connection objects will now be automatically discarded when proxy or authorization config has changed. ## v2.1.4 - 2016-04-01 ### Changed * Bug in usage of minitar filenames led to ignored tar files with tar file length of >100 chars. ## v2.1.3 - 2016-01-25 ### Changed * PuppetForge::V3::Release.download will now use the "file\_uri" field of the Release API response to calculate the URI to download from. (Thanks to [ericparton](https://github.com/ericparton) for the contribution.) ## v2.1.2 - 2015-12-16 ### Changed * Runtime dependency on "faraday\_middleware" gem updated to allow 0.10.x releases. ## v2.1.1 - 2015-10-06 ### Changed * Bug in error message around missing release on forge caused inappropriate error. ## v2.1.0 - 2015-08-20 ### Added * PuppetForge::ReleaseForbidden added to acknowledge 403 status returned from release download request ## v2.0.0 - 2015-08-13 ### Added * PuppetForge::V3::Release can now verify the md5, unpack, and install a release tarball. * PuppetForge::Middleware::SymbolifyJson to change Faraday response hash keys into symbols. * PuppetForge::V3::Metadata to represent a release's metadata as an object. * PuppetForge::Connection to provide Faraday connections. ### Changed * Failed API requests, such as those for a module that doesn't exist, throw a Faraday::ResourceNotFound error. * API requests are sent through Faraday directly rather than through Her. * PuppetForge::V3::Base#where and PuppetForge::V3::Base#all now send an API request immediately and return a paginated collection. ### Removed * Dependency on Her (also removes dependency on ActiveSupport). puppet_forge-5.0.3/.github/0000755000004100000410000000000014515571425015617 5ustar www-datawww-datapuppet_forge-5.0.3/.github/workflows/0000755000004100000410000000000014515571425017654 5ustar www-datawww-datapuppet_forge-5.0.3/.github/workflows/labeller.yml0000644000004100000410000000101514515571425022156 0ustar www-datawww-dataname: Labeller on: issues: types: - opened - labeled - unlabeled pull_request_target: types: - opened - labeled - unlabeled jobs: label: runs-on: ubuntu-latest steps: - uses: puppetlabs/community-labeller@v1.0.1 name: Label issues or pull requests with: label_name: community label_color: '5319e7' org_membership: puppetlabs fail_if_member: 'true' token: ${{ secrets.IAC_COMMUNITY_LABELER }} puppet_forge-5.0.3/.github/workflows/release.yml0000644000004100000410000000057214515571425022023 0ustar www-datawww-dataname: "release" on: workflow_dispatch: inputs: target: description: "The target for the release. This can be a commit sha or a branch." required: false default: "main" jobs: release: uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main" with: target: "${{ github.event.inputs.target }}" secrets: "inherit" puppet_forge-5.0.3/.github/workflows/ruby-rspec.yml0000644000004100000410000000114114515571425022467 0ustar www-datawww-dataname: ruby-rspec on: push: branches: - main pull_request: branches: - main jobs: test: name: Test with Ruby ${{ matrix.ruby_version }} runs-on: ubuntu-latest strategy: matrix: ruby: - '3.2' - '3.1' - '3.0' - '2.7' - '2.6' steps: - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Build and test with Rspec run: bundle exec rspec puppet_forge-5.0.3/.github/workflows/release_prep.yml0000644000004100000410000000102414515571425023042 0ustar www-datawww-dataname: "release prep" on: workflow_dispatch: inputs: target: description: "The target for the release. This can be a commit sha or a branch." required: false default: "main" version: description: "Version of gem to be released." required: true jobs: release_prep: uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main" with: target: "${{ github.event.inputs.target }}" version: "${{ github.events.inputs.version }}" secrets: "inherit" puppet_forge-5.0.3/.github/workflows/snyk_merge.yml0000644000004100000410000000105214515571425022540 0ustar www-datawww-dataname: snyk_merge on: workflow_dispatch: push: branches: - main jobs: security: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: setup ruby uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 - name: create lock run: bundle lock - name: Run Snyk to check for vulnerabilities uses: snyk/actions/ruby@master env: SNYK_TOKEN: ${{ secrets.SNYK_FORGE_KEY }} with: command: monitor args: --org=puppet-forge puppet_forge-5.0.3/.github/pull_request_template.md0000644000004100000410000000053414515571425022562 0ustar www-datawww-data## Summary Provide a detailed description of all the changes present in this pull request. ## Additional Context Add any additional context about the problem here. - [ ] Root cause and the steps to reproduce. (If applicable) - [ ] Thought process behind the implementation. ## Related Issues (if any) Mention any related issues or pull requests.puppet_forge-5.0.3/LICENSE.txt0000644000004100000410000000106214515571425016101 0ustar www-datawww-dataCopyright (c) 2014 Puppet Labs, Inc. 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.