puppet_forge 2.3.2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -319,7 +319,7 @@
319
319
  "file_size": 85004,
320
320
  "file_md5": "4036f35903264c9b6e3289455cfee225",
321
321
  "downloads": 6389,
322
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>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.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>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.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>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.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>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..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>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.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
322
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>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.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>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.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>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.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>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..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>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.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
323
323
  "changelog": "<section class=\"markdown\"><h2>2013-12-05 Release 0.10.0</h2>\n\n<h3>Summary:</h3>\n\n<p>This release adds FreeBSD osfamily support and various other improvements to some mods.</p>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add suPHP_UserGroup directive to directory context</li>\n<li>Add support for ScriptAliasMatch directives</li>\n<li>Set SSLOptions StdEnvVars in server context</li>\n<li>No implicit <Directory> entry for ScriptAlias path</li>\n<li>Add support for overriding ErrorDocument</li>\n<li>Add support for AliasMatch directives</li>\n<li>Disable default &quot;allow from all&quot; in vhost-directories</li>\n<li>Add WSGIPythonPath as an optional parameter to mod_wsgi. </li>\n<li>Add mod_rpaf support</li>\n<li>Add directives: IndexOptions, IndexOrderDefault</li>\n<li>Add ability to include additional external configurations in vhost</li>\n<li>need to use the provider variable not the provider key value from the directory hash for matches</li>\n<li>Support for FreeBSD and few other features</li>\n<li>Add new params to apache::mod::mime class</li>\n<li>Allow apache::mod to specify module id and path</li>\n<li>added $server_root parameter</li>\n<li>Add Allow and ExtendedStatus support to mod_status</li>\n<li>Expand vhost/_directories.pp directive support</li>\n<li>Add initial support for nss module (no directives in vhost template yet)</li>\n<li>added peruser and event mpms</li>\n<li>added $service_name parameter</li>\n<li>add parameter for TraceEnable</li>\n<li>Make LogLevel configurable for server and vhost</li>\n<li>Add documentation about $ip</li>\n<li>Add ability to pass ip (instead of wildcard) in default vhost files</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Don&#39;t listen on port or set NameVirtualHost for non-existent vhost</li>\n<li>only apply Directory defaults when provider is a directory</li>\n<li>Working mod_authnz_ldap support on Debian/Ubuntu</li>\n</ul>\n\n<h2>2013-09-06 Release 0.9.0</h2>\n\n<h3>Summary:</h3>\n\n<p>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.</p>\n\n<h3>Backwards-incompatible Changes:</h3>\n\n<ul>\n<li>Remove many default mods that are not normally needed.</li>\n<li>Remove <code>rewrite_base</code> <code>apache::vhost</code> parameter; did not work anyway.</li>\n<li>Specify dependencies on stdlib &gt;=2.4.0 (this was already the case, but\nmaking explicit)</li>\n<li>Deprecate <code>a2mod</code> in favor of the <code>apache::mod::*</code> classes and <code>apache::mod</code>\ndefined resource.</li>\n</ul>\n\n<h3>Features:</h3>\n\n<ul>\n<li><code>apache</code> class\n\n<ul>\n<li>Add <code>httpd_dir</code> parameter to change the location of the configuration\nfiles.</li>\n<li>Add <code>logroot</code> parameter to change the logroot</li>\n<li>Add <code>ports_file</code> parameter to changes the <code>ports.conf</code> file location</li>\n<li>Add <code>keepalive</code> parameter to enable persistent connections</li>\n<li>Add <code>keepalive_timeout</code> parameter to change the timeout</li>\n<li>Update <code>default_mods</code> to be able to take an array of mods to enable.</li>\n</ul></li>\n<li><code>apache::vhost</code>\n\n<ul>\n<li>Add <code>wsgi_daemon_process</code>, <code>wsgi_daemon_process_options</code>,\n<code>wsgi_process_group</code>, and <code>wsgi_script_aliases</code> parameters for per-vhost\nWSGI configuration.</li>\n<li>Add <code>access_log_syslog</code> parameter to enable syslogging.</li>\n<li>Add <code>error_log_syslog</code> parameter to enable syslogging of errors.</li>\n<li>Add <code>directories</code> hash parameter. Please see README for documentation.</li>\n<li>Add <code>sslproxyengine</code> parameter to enable SSLProxyEngine</li>\n<li>Add <code>suphp_addhandler</code>, <code>suphp_engine</code>, and <code>suphp_configpath</code> for\nconfiguring SuPHP.</li>\n<li>Add <code>custom_fragment</code> parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)</li>\n</ul></li>\n<li>Add <code>apache::mod::suphp</code> class for configuring SuPHP.</li>\n<li>Add <code>apache::mod::itk</code> class for configuring ITK mpm module.</li>\n<li>Update <code>apache::mod::wsgi</code> class for global WSGI configuration with\n<code>wsgi_socket_prefix</code> and <code>wsgi_python_home</code> parameters.</li>\n<li>Add README.passenger.md to document the <code>apache::mod::passenger</code> usage.\nAdded <code>passenger_high_performance</code>, <code>passenger_pool_idle_time</code>,\n<code>passenger_max_requests</code>, <code>passenger_stat_throttle_rate</code>, <code>rack_autodetect</code>,\nand <code>rails_autodetect</code> parameters.</li>\n<li>Separate the httpd service resource into a new <code>apache::service</code> class for\ndependency chaining of <code>Class[&#39;apache&#39;] -&gt; &lt;resource&gt; ~&gt;\nClass[&#39;apache::service&#39;]</code></li>\n<li>Added <code>apache::mod::proxy_balancer</code> class for <code>apache::balancer</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Change dependency to puppetlabs-concat</li>\n<li>Fix ruby 1.9 bug for <code>a2mod</code></li>\n<li>Change servername to be <code>$::hostname</code> if there is no <code>$::fqdn</code></li>\n<li>Make <code>/etc/ssl/certs</code> the default ssl certs directory for RedHat non-5.</li>\n<li>Make <code>php</code> the default php package for RedHat non-5.</li>\n<li>Made <code>aliases</code> able to take a single alias hash instead of requiring an\narray.</li>\n</ul>\n\n<h2>2013-07-26 Release 0.8.1</h2>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Update <code>apache::mpm_module</code> detection for worker/prefork</li>\n<li>Update <code>apache::mod::cgi</code> and <code>apache::mod::cgid</code> detection for\nworker/prefork</li>\n</ul>\n\n<h2>2013-07-16 Release 0.8.0</h2>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add <code>servername</code> parameter to <code>apache</code> class</li>\n<li>Add <code>proxy_set</code> parameter to <code>apache::balancer</code> define</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix ordering for multiple <code>apache::balancer</code> clusters</li>\n<li>Fix symlinking for sites-available on Debian-based OSs</li>\n<li>Fix dependency ordering for recursive confdir management</li>\n<li>Fix <code>apache::mod::*</code> to notify the service on config change</li>\n<li>Documentation updates</li>\n</ul>\n\n<h2>2013-07-09 Release 0.7.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li>Essentially rewrite the module -- too many to list</li>\n<li><code>apache::vhost</code> has many abilities -- see README.md for details</li>\n<li><code>apache::mod::*</code> classes provide httpd mod-loading capabilities</li>\n<li><code>apache</code> base class is much more configurable</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Many. And many more to come</li>\n</ul>\n\n<h2>2013-03-2 Release 0.6.0</h2>\n\n<ul>\n<li>update travis tests (add more supported versions)</li>\n<li>add access log_parameter</li>\n<li>make purging of vhost dir configurable</li>\n</ul>\n\n<h2>2012-08-24 Release 0.4.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li><code>include apache</code> is now required when using <code>apache::mod::*</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix syntax for validate_re</li>\n<li>Fix formatting in vhost template</li>\n<li><p>Fix spec tests such that they pass</p>\n\n<p>2012-05-08 Puppet Labs <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a> - 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 =&gt; path for file resources in order to name namevar by it&#39;s name\n72e13de One end too much\n0739641 style guide fixes: &#39;true&#39; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#39;httpd&#39;]\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</p></li>\n</ul>\n</section>",
324
324
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
325
325
  "created_at": "2013-12-05 15:29:14 -0800",
@@ -477,7 +477,7 @@
477
477
  "file_size": 16837,
478
478
  "file_md5": "2b5a31ead952c59727f13dc5b12b15f8",
479
479
  "downloads": 1249,
480
- "readme": "<section class=\"markdown\"><h1>Puppet module: apache</h1>\n\n<p>This is a Puppet apache module from the second generation of Example42 Puppet Modules.</p>\n\n<p>Made by Alessandro Franceschi / Lab42</p>\n\n<p>Official site: <a href=\"http://www.example42.com\">http://www.example42.com</a></p>\n\n<p>Official git repository: <a href=\"http://github.com/example42/puppet-apache\">http://github.com/example42/puppet-apache</a></p>\n\n<p>Released under the terms of Apache 2 License.</p>\n\n<p>This module requires functions provided by the Example42 Puppi module.</p>\n\n<p>For detailed info about the logic and usage patterns of Example42 modules read README.usage on Example42 main modules set.</p>\n\n<h2>USAGE - Module specific usage</h2>\n\n<ul>\n<li><p>Install apache with a custom httpd.conf template and some virtual hosts</p>\n\n<pre><code> class { &#39;apache&#39;:\n template =&gt; &#39;example42/apache/httpd.conf.erb&#39;,\n }\n\n apache::vhost { &#39;mysite&#39;:\n docroot =&gt; &#39;/path/to/docroot&#39;,\n template =&gt; &#39;example42/apache/vhost/mysite.com.erb&#39;,\n }\n</code></pre></li>\n<li><p>Install mod ssl</p>\n\n<pre><code>include apache::ssl\n</code></pre></li>\n<li><p>Manage basic auth users (Here user joe is created with the $crypt_password on the defined htpasswd_file</p>\n\n<pre><code>apache::htpasswd { &#39;joe&#39;:\n crypt_password =&gt; &#39;B5dPQYYjf.jjA&#39;,\n htpasswd_file =&gt; &#39;/etc/httpd/users.passwd&#39;,\n}\n</code></pre></li>\n<li><p>Manage custom configuration files (created in conf.d, source or content can be defined)</p>\n\n<pre><code>apache::dotconf { &#39;trac&#39;:\n content =&gt; &#39;template(&quot;site/trac/apache.conf.erb&quot;)&#39;\n}\n</code></pre></li>\n<li><p>Add other listening ports (a relevant NameVirtualHost directive is automatically created)</p>\n\n<pre><code>apache::listen { &#39;8080&#39;: }\n</code></pre></li>\n<li><p>Add other listening ports without creating a relevant NameVirtualHost directive</p>\n\n<pre><code>apache::listen { &#39;8080&#39;:\n $namevirtualhost = false,\n}\n</code></pre></li>\n<li><p>Add an apache module and manage its configuraton</p>\n\n<pre><code>apache::module { &#39;proxy&#39;:\n templatefile =&gt; &#39;site/apache/module/proxy.conf.erb&#39;,\n}\n</code></pre></li>\n<li><p>Install mod passenger</p>\n\n<pre><code>include apache::passenger\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Basic management</h2>\n\n<ul>\n<li><p>Install apache with default settings</p>\n\n<pre><code>class { &quot;apache&quot;: }\n</code></pre></li>\n<li><p>Disable apache service.</p>\n\n<pre><code>class { &quot;apache&quot;:\n disable =&gt; true\n}\n</code></pre></li>\n<li><p>Disable apache service at boot time, but don&#39;t stop if is running.</p>\n\n<pre><code>class { &quot;apache&quot;:\n disableboot =&gt; true\n}\n</code></pre></li>\n<li><p>Remove apache package</p>\n\n<pre><code>class { &quot;apache&quot;:\n absent =&gt; true\n}\n</code></pre></li>\n<li><p>Enable auditing without making changes on existing apache configuration files</p>\n\n<pre><code>class { &quot;apache&quot;:\n audit_only =&gt; true\n}\n</code></pre></li>\n<li><p>Install apache with a specific version</p>\n\n<pre><code>class { &quot;apache&quot;:\n version =&gt; &#39;2.2.22&#39;\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Default server management</h2>\n\n<ul>\n<li><p>Simple way to manage default apache configuration</p>\n\n<pre><code>apache::vhost { &#39;default&#39;:\n docroot =&gt; &#39;/var/www/document_root&#39;,\n server_name =&gt; false,\n priority =&gt; &#39;&#39;,\n template =&gt; &#39;apache/virtualhost/vhost.conf.erb&#39;,\n}\n</code></pre></li>\n<li><p>Using a source file to create the vhost</p>\n\n<pre><code>apache::vhost { &#39;default&#39;:\n source =&gt; &#39;puppet:///files/web/default.conf&#39;\n template =&gt; &#39;&#39;,\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Overrides and Customizations</h2>\n\n<ul>\n<li><p>Use custom sources for main config file</p>\n\n<pre><code>class { &quot;apache&quot;:\n source =&gt; [ &quot;puppet:///modules/lab42/apache/apache.conf-${hostname}&quot; , &quot;puppet:///modules/lab42/apache/apache.conf&quot; ],\n}\n</code></pre></li>\n<li><p>Use custom source directory for the whole configuration dir</p>\n\n<pre><code>class { &quot;apache&quot;:\n source_dir =&gt; &quot;puppet:///modules/lab42/apache/conf/&quot;,\n source_dir_purge =&gt; false, # Set to true to purge any existing file not present in $source_dir\n}\n</code></pre></li>\n<li><p>Use custom template for main config file </p>\n\n<pre><code>class { &quot;apache&quot;:\n template =&gt; &quot;example42/apache/apache.conf.erb&quot;, \n}\n</code></pre></li>\n<li><p>Define custom options that can be used in a custom template without the\nneed to add parameters to the apache class</p>\n\n<pre><code>class { &quot;apache&quot;:\n template =&gt; &quot;example42/apache/apache.conf.erb&quot;, \n options =&gt; {\n &#39;LogLevel&#39; =&gt; &#39;INFO&#39;,\n &#39;UsePAM&#39; =&gt; &#39;yes&#39;,\n },\n}\n</code></pre></li>\n<li><p>Automaticallly include a custom subclass</p>\n\n<pre><code>class { &quot;apache:&quot;\n my_class =&gt; &#39;apache::example42&#39;,\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Example42 extensions management</h2>\n\n<ul>\n<li><p>Activate puppi (recommended, but disabled by default)\nNote that this option requires the usage of Example42 puppi module</p>\n\n<pre><code>class { &quot;apache&quot;: \n puppi =&gt; true,\n}\n</code></pre></li>\n<li><p>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 </p>\n\n<pre><code>class { &quot;apache&quot;:\n puppi =&gt; true,\n puppi_helper =&gt; &quot;myhelper&quot;, \n}\n</code></pre></li>\n<li><p>Activate automatic monitoring (recommended, but disabled by default)\nThis option requires the usage of Example42 monitor and relevant monitor tools modules</p>\n\n<pre><code>class { &quot;apache&quot;:\n monitor =&gt; true,\n monitor_tool =&gt; [ &quot;nagios&quot; , &quot;monit&quot; , &quot;munin&quot; ],\n}\n</code></pre></li>\n<li><p>Activate automatic firewalling \nThis option requires the usage of Example42 firewall and relevant firewall tools modules</p>\n\n<pre><code>class { &quot;apache&quot;: \n firewall =&gt; true,\n firewall_tool =&gt; &quot;iptables&quot;,\n firewall_src =&gt; &quot;10.42.0.0/24&quot;,\n firewall_dst =&gt; &quot;$ipaddress_eth0&quot;,\n}\n</code></pre></li>\n</ul>\n\n<p><a href=\"https://travis-ci.org/example42/puppet-apache\"><img src=\"https://travis-ci.org/example42/puppet-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n</section>",
480
+ "readme": "<section class=\"markdown\"><h1>Puppet module: apache</h1>\n\n<p>This is a Puppet apache module from the second generation of Example42 Puppet Modules.</p>\n\n<p>Made by Alessandro Franceschi / Lab42</p>\n\n<p>Official site: <a href=\"http://www.example42.com\">http://www.example42.com</a></p>\n\n<p>Official git repository: <a href=\"http://github.com/example42/puppet-apache\">http://github.com/example42/puppet-apache</a></p>\n\n<p>Released under the terms of Apache 2 License.</p>\n\n<p>This module requires functions provided by the Example42 Puppi module.</p>\n\n<p>For detailed info about the logic and usage patterns of Example42 modules read README.usage on Example42 main modules set.</p>\n\n<h2>USAGE - Module specific usage</h2>\n\n<ul>\n<li><p>Install apache with a custom httpd.conf template and some virtual hosts</p>\n\n<pre><code> class { &#39;apache&#39;:\n template =&gt; &#39;example42/apache/httpd.conf.erb&#39;,\n }\n\n apache::vhost { &#39;mysite&#39;:\n docroot =&gt; &#39;/path/to/docroot&#39;,\n template =&gt; &#39;example42/apache/vhost/mysite.com.erb&#39;,\n }\n</code></pre></li>\n<li><p>Install mod ssl</p>\n\n<pre><code>include apache::ssl\n</code></pre></li>\n<li><p>Manage basic auth users (Here user joe is created with the $crypt_password on the defined htpasswd_file</p>\n\n<pre><code>apache::htpasswd { &#39;joe&#39;:\n crypt_password =&gt; &#39;B5dPQYYjf.jjA&#39;,\n htpasswd_file =&gt; &#39;/etc/httpd/users.passwd&#39;,\n}\n</code></pre></li>\n<li><p>Manage custom configuration files (created in conf.d, source or content can be defined)</p>\n\n<pre><code>apache::dotconf { &#39;trac&#39;:\n content =&gt; &#39;template(&quot;site/trac/apache.conf.erb&quot;)&#39;\n}\n</code></pre></li>\n<li><p>Add other listening ports (a relevant NameVirtualHost directive is automatically created)</p>\n\n<pre><code>apache::listen { &#39;8080&#39;: }\n</code></pre></li>\n<li><p>Add other listening ports without creating a relevant NameVirtualHost directive</p>\n\n<pre><code>apache::listen { &#39;8080&#39;:\n $namevirtualhost = false,\n}\n</code></pre></li>\n<li><p>Add an apache module and manage its configuraton</p>\n\n<pre><code>apache::module { &#39;proxy&#39;:\n templatefile =&gt; &#39;site/apache/module/proxy.conf.erb&#39;,\n}\n</code></pre></li>\n<li><p>Install mod passenger</p>\n\n<pre><code>include apache::passenger\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Basic management</h2>\n\n<ul>\n<li><p>Install apache with default settings</p>\n\n<pre><code>class { &quot;apache&quot;: }\n</code></pre></li>\n<li><p>Disable apache service.</p>\n\n<pre><code>class { &quot;apache&quot;:\n disable =&gt; true\n}\n</code></pre></li>\n<li><p>Disable apache service at boot time, but don&#39;t stop if is running.</p>\n\n<pre><code>class { &quot;apache&quot;:\n disableboot =&gt; true\n}\n</code></pre></li>\n<li><p>Remove apache package</p>\n\n<pre><code>class { &quot;apache&quot;:\n absent =&gt; true\n}\n</code></pre></li>\n<li><p>Enable auditing without making changes on existing apache configuration files</p>\n\n<pre><code>class { &quot;apache&quot;:\n audit_only =&gt; true\n}\n</code></pre></li>\n<li><p>Install apache with a specific version</p>\n\n<pre><code>class { &quot;apache&quot;:\n version =&gt; &#39;2.2.22&#39;\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Default server management</h2>\n\n<ul>\n<li><p>Simple way to manage default apache configuration</p>\n\n<pre><code>apache::vhost { &#39;default&#39;:\n docroot =&gt; &#39;/var/www/document_root&#39;,\n server_name =&gt; false,\n priority =&gt; &#39;&#39;,\n template =&gt; &#39;apache/virtualhost/vhost.conf.erb&#39;,\n}\n</code></pre></li>\n<li><p>Using a source file to create the vhost</p>\n\n<pre><code>apache::vhost { &#39;default&#39;:\n source =&gt; &#39;puppet:///files/web/default.conf&#39;\n template =&gt; &#39;&#39;,\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Overrides and Customizations</h2>\n\n<ul>\n<li><p>Use custom sources for main config file</p>\n\n<pre><code>class { &quot;apache&quot;:\n source =&gt; [ &quot;puppet:///modules/lab42/apache/apache.conf-${hostname}&quot; , &quot;puppet:///modules/lab42/apache/apache.conf&quot; ],\n}\n</code></pre></li>\n<li><p>Use custom source directory for the whole configuration dir</p>\n\n<pre><code>class { &quot;apache&quot;:\n source_dir =&gt; &quot;puppet:///modules/lab42/apache/conf/&quot;,\n source_dir_purge =&gt; false, # Set to true to purge any existing file not present in $source_dir\n}\n</code></pre></li>\n<li><p>Use custom template for main config file </p>\n\n<pre><code>class { &quot;apache&quot;:\n template =&gt; &quot;example42/apache/apache.conf.erb&quot;, \n}\n</code></pre></li>\n<li><p>Define custom options that can be used in a custom template without the\nneed to add parameters to the apache class</p>\n\n<pre><code>class { &quot;apache&quot;:\n template =&gt; &quot;example42/apache/apache.conf.erb&quot;, \n options =&gt; {\n &#39;LogLevel&#39; =&gt; &#39;INFO&#39;,\n &#39;UsePAM&#39; =&gt; &#39;yes&#39;,\n },\n}\n</code></pre></li>\n<li><p>Automaticallly include a custom subclass</p>\n\n<pre><code>class { &quot;apache:&quot;\n my_class =&gt; &#39;apache::example42&#39;,\n}\n</code></pre></li>\n</ul>\n\n<h2>USAGE - Example42 extensions management</h2>\n\n<ul>\n<li><p>Activate puppi (recommended, but disabled by default)\nNote that this option requires the usage of Example42 puppi module</p>\n\n<pre><code>class { &quot;apache&quot;: \n puppi =&gt; true,\n}\n</code></pre></li>\n<li><p>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 </p>\n\n<pre><code>class { &quot;apache&quot;:\n puppi =&gt; true,\n puppi_helper =&gt; &quot;myhelper&quot;, \n}\n</code></pre></li>\n<li><p>Activate automatic monitoring (recommended, but disabled by default)\nThis option requires the usage of Example42 monitor and relevant monitor tools modules</p>\n\n<pre><code>class { &quot;apache&quot;:\n monitor =&gt; true,\n monitor_tool =&gt; [ &quot;nagios&quot; , &quot;monit&quot; , &quot;munin&quot; ],\n}\n</code></pre></li>\n<li><p>Activate automatic firewalling \nThis option requires the usage of Example42 firewall and relevant firewall tools modules</p>\n\n<pre><code>class { &quot;apache&quot;: \n firewall =&gt; true,\n firewall_tool =&gt; &quot;iptables&quot;,\n firewall_src =&gt; &quot;10.42.0.0/24&quot;,\n firewall_dst =&gt; &quot;$ipaddress_eth0&quot;,\n}\n</code></pre></li>\n</ul>\n\n<p><a href=\"https://travis-ci.org/example42/puppet-apache\"><img src=\"https://travis-ci.org/example42/puppet-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n</section>",
481
481
  "changelog": null,
482
482
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2013 Alessandro Franceschi &#x2F; 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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
483
483
  "created_at": "2013-11-22 01:04:52 -0800",
@@ -1397,7 +1397,7 @@
1397
1397
  "file_size": 31798,
1398
1398
  "file_md5": "68f18e110ffa502fd76514e56dc440a7",
1399
1399
  "downloads": 162,
1400
- "readme": "<section class=\"markdown\"><h1>apache Module</h1>\n\n<p>This module manages apache, with emphasis on setting up virtual hosts and\nmanaging ssl.</p>\n\n<h1>Examples</h1>\n\n<pre lang=\"puppet\"><code> # configure the global apache\n class { &#39;apache&#39;:\n ensure =&gt; running,\n enable =&gt; true,\n server_admin =&gt; &#39;webmaster@example.com&#39;,\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 { &#39;www.example.com&#39;:\n is_default =&gt; true,\n server_name =&gt; &#39;www.example.com&#39;,\n server_alias =&gt; [ &#39;www-2.example.com&#39;,\n &#39;blog.example.com&#39; ],\n ssl =&gt; false,\n }\n\n # if server_name is not specified, the $namevar is used. So in this case\n # server_name = &#39;www2.example.com&#39;. This one has ssl setup using a\n # self-signed cert (since not intermedaite cert is provided).\n apache::vhost { &#39;www2.example.com&#39;:\n ssl =&gt; true,\n ssl_key_file =&gt; &#39;/etc/pki/tls/private/private.key&#39;,\n ssl_crt_file =&gt; &#39;/etc/pki/tls/certs/public.crt&#39;,\n }\n\n # another ssl example, this time with an intermediate cert being provided\n apache::vhost { &#39;www3.example.com:\n ssl =&gt; true,\n ssl_key_file =&gt; &#39;/etc/pki/tls/private/private.key&#39;,\n ssl_crt_file =&gt; &#39;/etc/pki/tls/certs/public.crt&#39;,\n ssl_int_file =&gt; &#39;/etc/pki/tls/certs/intermediate.crt&#39;,\n }\n</code></pre>\n\n<h2>License</h2>\n\n<p>See LICENSE file</p>\n\n<h2>Copyright</h2>\n\n<p>Copyright &copy; 2013 The Regents of the University of California</p>\n\n<h2>Contact</h2>\n\n<p>Aaron Russo <a href=\"mailto:arusso@berkeley.edu\">arusso@berkeley.edu</a></p>\n\n<h2>Support</h2>\n\n<p>Please log tickets and issues at the\n<a href=\"https://github.com/arusso/puppet-apache/issues/\">Projects site</a></p>\n</section>",
1400
+ "readme": "<section class=\"markdown\"><h1>apache Module</h1>\n\n<p>This module manages apache, with emphasis on setting up virtual hosts and\nmanaging ssl.</p>\n\n<h1>Examples</h1>\n\n<pre lang=\"puppet\"><code> # configure the global apache\n class { &#39;apache&#39;:\n ensure =&gt; running,\n enable =&gt; true,\n server_admin =&gt; &#39;web@example.com&#39;,\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 { &#39;www.example.com&#39;:\n is_default =&gt; true,\n server_name =&gt; &#39;www.example.com&#39;,\n server_alias =&gt; [ &#39;www-2.example.com&#39;,\n &#39;blog.example.com&#39; ],\n ssl =&gt; false,\n }\n\n # if server_name is not specified, the $namevar is used. So in this case\n # server_name = &#39;www2.example.com&#39;. This one has ssl setup using a\n # self-signed cert (since not intermedaite cert is provided).\n apache::vhost { &#39;www2.example.com&#39;:\n ssl =&gt; true,\n ssl_key_file =&gt; &#39;/etc/pki/tls/private/private.key&#39;,\n ssl_crt_file =&gt; &#39;/etc/pki/tls/certs/public.crt&#39;,\n }\n\n # another ssl example, this time with an intermediate cert being provided\n apache::vhost { &#39;www3.example.com:\n ssl =&gt; true,\n ssl_key_file =&gt; &#39;/etc/pki/tls/private/private.key&#39;,\n ssl_crt_file =&gt; &#39;/etc/pki/tls/certs/public.crt&#39;,\n ssl_int_file =&gt; &#39;/etc/pki/tls/certs/intermediate.crt&#39;,\n }\n</code></pre>\n\n<h2>License</h2>\n\n<p>See LICENSE file</p>\n\n<h2>Copyright</h2>\n\n<p>Copyright &copy; 2013 The Regents of the University of California</p>\n\n<h2>Contact</h2>\n\n<p>Aaron Russo <a href=\"mailto:arusso@berkeley.edu\">arusso@berkeley.edu</a></p>\n\n<h2>Support</h2>\n\n<p>Please log tickets and issues at the\n<a href=\"https://github.com/arusso/puppet-apache/issues/\">Projects site</a></p>\n</section>",
1401
1401
  "changelog": "<section class=\"plaintext\"><pre>2013-10-07 Aaron Russo &lt;arusso@berkeley.edu&gt; - 0.0.5\n* Issue#9: Allow override of Ssl::Cert dependencies\n\n2013-10-03 Aaron Russo &lt;arusso@berkeley.edu&gt; - 0.0.4\n* Issue#6: Ability to enable&#x2F;disable include files\n* Issue#8: Implemented unused document_root parameter in vhosts\n\n2013-09-19 Aaron Russo &lt;arusso@berkeley.edu&gt; - 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 &lt;arusso@berkeley.edu&gt; - 0.0.2\n* updating docs for acct rename\n\n2013-05-28 Aaron Russo &lt;arusso@berkeley.edu&gt; - 0.0.1\n* Initial Release\n</pre></section>",
1402
1402
  "license": "<section class=\"plaintext\"><pre>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 &quot;Software&quot;), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and&#x2F;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 &quot;AS IS&quot;, 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</pre></section>",
1403
1403
  "created_at": "2013-10-07 14:22:59 -0700",
@@ -2807,7 +2807,7 @@
2807
2807
  "file_size": 187123,
2808
2808
  "file_md5": "8269efa8b955dec684abd53a82172e44",
2809
2809
  "downloads": 1952,
2810
- "readme": "<section class=\"markdown\"><h1>augeasproviders: alternative Augeas-based providers for Puppet</h1>\n\n<p>This module provides alternative providers for core Puppet types such as\n<code>host</code> and <code>mailalias</code> using the Augeas configuration library. It also adds\nsome of its own types for new functionality.</p>\n\n<p>The advantage of using Augeas over the default Puppet <code>parsedfile</code>\nimplementations is that Augeas will go to great lengths to preserve file\nformatting and comments, while also failing safely when needed.</p>\n\n<p>These providers will hide <em>all</em> of the Augeas commands etc., you don&#39;t need to\nknow anything about Augeas to make use of it.</p>\n\n<p>If you want to make changes to config files in your own way, you should use\nthe <code>augeas</code> type directly. For more information about Augeas, see the\n<a href=\"http://augeas.net\">web site</a> or the\n<a href=\"http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas\">Puppet/Augeas</a>\nwiki page.</p>\n\n<h2>Types and providers</h2>\n\n<p>The following builtin types have an Augeas-based provider implemented:</p>\n\n<ul>\n<li><code>host</code></li>\n<li><code>mailalias</code></li>\n</ul>\n\n<p>The following other types have a provider implemented:</p>\n\n<ul>\n<li><code>mounttab</code> from <a href=\"http://forge.puppetlabs.com/puppetlabs/mount_providers\">puppetlabs-mount_providers</a></li>\n</ul>\n\n<p>The module adds the following new types:</p>\n\n<ul>\n<li><code>apache_setenv</code> for updating SetEnv entries in Apache HTTP Server configs</li>\n<li><code>kernel_parameter</code> for adding kernel parameters to GRUB Legacy or GRUB 2 configs</li>\n<li><code>nrpe_command</code> for setting command entries in Nagios NRPE&#39;s <code>nrpe.cfg</code></li>\n<li><code>pg_hba</code> for PostgreSQL&#39;s <code>pg_hba.conf</code> entries</li>\n<li><code>puppet_auth</code> for authentication rules in Puppet&#39;s <code>auth.conf</code></li>\n<li><code>shellvar</code> for shell variables in <code>/etc/sysconfig</code> or <code>/etc/default</code> etc.</li>\n<li><code>sshd_config</code> for setting configuration entries in OpenSSH&#39;s <code>sshd_config</code></li>\n<li><code>sshd_config_subsystem</code> for setting subsystem entries in OpenSSH&#39;s <code>sshd_config</code></li>\n<li><code>sysctl</code> for entries inside Linux&#39;s sysctl.conf</li>\n<li><code>syslog</code> for entries inside syslog.conf</li>\n</ul>\n\n<p>Lots of examples are provided in the accompanying documentation (see\n<code>docs/examples.html</code>) and are also published <a href=\"http://augeasproviders.com/documentation/examples.html\">on the web site</a>.\nIf this is a git checkout, you will need to run <code>make</code> in docs/ to generate the\nHTML pages.</p>\n\n<p>Type documentation can be generated with <code>puppet doc -r type</code> or viewed on the\n<a href=\"http://forge.puppetlabs.com/domcleal/augeasproviders\">Puppet Forge page</a>.</p>\n\n<p>For builtin types and mounttab, the default provider will automatically become\nthe <code>augeas</code> provider once the module is installed. This can be changed back\nto <code>parsed</code> where necessary.</p>\n\n<h2>Requirements</h2>\n\n<p>Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as\nnormal.</p>\n\n<p>See <a href=\"http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas#Pre-requisites\">Puppet/Augeas pre-requisites</a>.</p>\n\n<h2>Installing</h2>\n\n<p>On Puppet 2.7.14+, the module can be installed easily (<a href=\"http://docs.puppetlabs.com/puppet/2.7/reference/modules_installing.html\">documentation</a>):</p>\n\n<pre><code>puppet module install domcleal/augeasproviders\n</code></pre>\n\n<p>You may see an error similar to this on Puppet 2.x (<a href=\"http://projects.puppetlabs.com/issues/13858\">#13858</a>):</p>\n\n<pre><code>Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type `kernel_parameter` at ...\n</code></pre>\n\n<p>Ensure the module is present in your puppetmaster&#39;s own environment (it doesn&#39;t\nhave to use it) and that the master has pluginsync enabled. Run the agent on\nthe puppetmaster to cause the custom types to be synced to its local libdir\n(<code>puppet master --configprint libdir</code>) and then restart the puppetmaster so it\nloads them.</p>\n\n<h2>Planned</h2>\n\n<p>The following builtin types have Augeas-based providers planned:</p>\n\n<ul>\n<li><code>ssh_authorized_key</code></li>\n<li><code>port</code>, once <a href=\"http://projects.puppetlabs.com/issues/5660\">#5660</a> is done</li>\n<li><code>yumrepo</code>, once <a href=\"http://projects.puppetlabs.com/issues/8758\">#8758</a> is done</li>\n</ul>\n\n<p>Other ideas for new types are:</p>\n\n<ul>\n<li><code>/etc/system</code> types</li>\n</ul>\n\n<h2>Issues</h2>\n\n<p>Please file any issues or suggestions <a href=\"https://github.com/hercules-team/augeasproviders/issues\">on GitHub</a>.</p>\n</section>",
2810
+ "readme": "<section class=\"markdown\"><h1>augeasproviders: alternative Augeas-based providers for Puppet</h1>\n\n<p>This module provides alternative providers for core Puppet types such as\n<code>host</code> and <code>mailalias</code> using the Augeas configuration library. It also adds\nsome of its own types for new functionality.</p>\n\n<p>The advantage of using Augeas over the default Puppet <code>parsedfile</code>\nimplementations is that Augeas will go to great lengths to preserve file\nformatting and comments, while also failing safely when needed.</p>\n\n<p>These providers will hide <em>all</em> of the Augeas commands etc., you don&#39;t need to\nknow anything about Augeas to make use of it.</p>\n\n<p>If you want to make changes to config files in your own way, you should use\nthe <code>augeas</code> type directly. For more information about Augeas, see the\n<a href=\"http://augeas.net\">web site</a> or the\n<a href=\"http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas\">Puppet/Augeas</a>\nwiki page.</p>\n\n<h2>Types and providers</h2>\n\n<p>The following builtin types have an Augeas-based provider implemented:</p>\n\n<ul>\n<li><code>host</code></li>\n<li><code>mailalias</code></li>\n</ul>\n\n<p>The following other types have a provider implemented:</p>\n\n<ul>\n<li><code>mounttab</code> from <a href=\"http://forge.puppetlabs.com/puppetlabs/mount_providers\">puppetlabs-mount_providers</a></li>\n</ul>\n\n<p>The module adds the following new types:</p>\n\n<ul>\n<li><code>apache_setenv</code> for updating SetEnv entries in Apache HTTP Server configs</li>\n<li><code>kernel_parameter</code> for adding kernel parameters to GRUB Legacy or GRUB 2 configs</li>\n<li><code>nrpe_command</code> for setting command entries in Nagios NRPE&#39;s <code>nrpe.cfg</code></li>\n<li><code>pg_hba</code> for PostgreSQL&#39;s <code>pg_hba.conf</code> entries</li>\n<li><code>puppet_auth</code> for authentication rules in Puppet&#39;s <code>auth.conf</code></li>\n<li><code>shellvar</code> for shell variables in <code>/etc/sysconfig</code> or <code>/etc/default</code> etc.</li>\n<li><code>sshd_config</code> for setting configuration entries in OpenSSH&#39;s <code>sshd_config</code></li>\n<li><code>sshd_config_subsystem</code> for setting subsystem entries in OpenSSH&#39;s <code>sshd_config</code></li>\n<li><code>sysctl</code> for entries inside Linux&#39;s sysctl.conf</li>\n<li><code>syslog</code> for entries inside syslog.conf</li>\n</ul>\n\n<p>Lots of examples are provided in the accompanying documentation (see\n<code>docs/examples.html</code>) and are also published <a href=\"http://augeasproviders.com/documentation/examples.html\">on the web site</a>.\nIf this is a git checkout, you will need to run <code>make</code> in docs/ to generate the\nHTML pages.</p>\n\n<p>Type documentation can be generated with <code>puppet doc -r type</code> or viewed on the\n<a href=\"http://forge.puppetlabs.com/domcleal/augeasproviders\">Puppet Forge page</a>.</p>\n\n<p>For builtin types and mounttab, the default provider will automatically become\nthe <code>augeas</code> provider once the module is installed. This can be changed back\nto <code>parsed</code> where necessary.</p>\n\n<h2>Requirements</h2>\n\n<p>Ensure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as\nnormal.</p>\n\n<p>See <a href=\"http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas#Pre-requisites\">Puppet/Augeas pre-requisites</a>.</p>\n\n<h2>Installing</h2>\n\n<p>On Puppet 2.7.14+, the module can be installed easily (<a href=\"http://docs.puppetlabs.com/puppet/2.7/reference/modules_installing.html\">documentation</a>):</p>\n\n<pre><code>puppet module install domcleal/augeasproviders\n</code></pre>\n\n<p>You may see an error similar to this on Puppet 2.x (<a href=\"http://projects.puppetlabs.com/issues/13858\">#13858</a>):</p>\n\n<pre><code>Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type `kernel_parameter` at ...\n</code></pre>\n\n<p>Ensure the module is present in your primary Puppet server&#39;s own environment (it doesn&#39;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(<code>primary Puppet server --configprint libdir</code>) and then restart the primary Puppet server so it\nloads them.</p>\n\n<h2>Planned</h2>\n\n<p>The following builtin types have Augeas-based providers planned:</p>\n\n<ul>\n<li><code>ssh_authorized_key</code></li>\n<li><code>port</code>, once <a href=\"http://projects.puppetlabs.com/issues/5660\">#5660</a> is done</li>\n<li><code>yumrepo</code>, once <a href=\"http://projects.puppetlabs.com/issues/8758\">#8758</a> is done</li>\n</ul>\n\n<p>Other ideas for new types are:</p>\n\n<ul>\n<li><code>/etc/system</code> types</li>\n</ul>\n\n<h2>Issues</h2>\n\n<p>Please file any issues or suggestions <a href=\"https://github.com/hercules-team/augeasproviders/issues\">on GitHub</a>.</p>\n</section>",
2811
2811
  "changelog": "<section class=\"plaintext\"><pre># 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=&gt;false, was always running, fixes #56 (Trey Dockendorf)\n* all: use augeas&#x2F;lenses&#x2F; from Puppet&#x27;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&#x2F;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 &#x27;apply&#x27; parameter to change live kernel value (default: true)\n* sysctl: add &#x27;val&#x27; parameter alias for duritong&#x2F;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&#x27;t throw error when target file doesn&#x27;t already exist\n* kernel_parameter&#x2F;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&#x27;s auth.conf file\n* shellvar: new type for managing &#x2F;etc&#x2F;{default,sysconfig}\n* kernel_parameter: use EFI GRUB legacy config if present\n* devel: replaced librarian-puppet with puppetlabs_spec_helper&#x27;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&#x2F;, 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 &#x2F;etc&#x2F;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 &#x2F;augeas&#x2F;&#x2F;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&#x2F;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</pre></section>",
2812
2812
  "license": "<section class=\"plaintext\"><pre>augeasproviders: alternative Augeas-based providers for Puppet\n\nCopyright (c) 2012 Dominic Cleal\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
2813
2813
  "created_at": "2013-10-28 11:15:54 -0700",
@@ -3075,7 +3075,7 @@
3075
3075
  "file_size": 25420,
3076
3076
  "file_md5": "6fcb2d26a6ccc8c59c9df0c520563a87",
3077
3077
  "downloads": 300,
3078
- "readme": "<section class=\"markdown\"><h1>Puppet-Maven</h1>\n\n<p>A Puppet recipe for Apache Maven, to download artifacts from a Maven repository</p>\n\n<p>Uses <a href=\"http://maven.apache.org\">Apache Maven</a> command line to download the artifacts.</p>\n\n<h2>Building and Installing the Module</h2>\n\n<p>To build the module for installing in your Puppet master:</p>\n\n<pre lang=\"sh\"><code>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</code></pre>\n\n<p>Of course, you can also clone the repository straight into <code>/etc/puppet/modules/maven</code> as well.</p>\n\n<h2>Developing and Testing the Module</h2>\n\n<p>If you are developing the module, it can be built using <code>rake</code>:</p>\n\n<pre lang=\"sh\"><code>gem install bundler\nbundle\nrake spec\nrake spec:system\n</code></pre>\n\n<h2>Usage</h2>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/myfile&quot;:\n id =&gt; &quot;groupId:artifactId:version:packaging:classifier&quot;,\n repos =&gt; [&quot;id::layout::http://repo.acme.com&quot;,&quot;http://repo2.acme.com&quot;],\n }\n</code></pre>\n\n<p>or</p>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/myfile&quot;:\n groupid =&gt; &quot;org.apache.maven&quot;,\n artifactid =&gt; &quot;maven-core&quot;,\n version =&gt; &quot;3.0.5&quot;,\n packaging =&gt; &quot;jar&quot;,\n classifier =&gt; &quot;sources&quot;,\n repos =&gt; [&quot;id::layout::http://repo.acme.com&quot;,&quot;http://repo2.acme.com&quot;],\n }\n</code></pre>\n\n<h3>ensure</h3>\n\n<p><code>ensure</code> may be one of two values:</p>\n\n<ul>\n<li><code>present</code> (the default) -- the specified maven artifact is downloaded when no file exists\nat <code>path</code> (or <code>name</code> if no path is specified.) This is probably makes\nsense when the specified maven artifact refers to a released (non-SNAPSHOT)\nartifact.</li>\n<li> <code>latest</code> -- if value of version is <code>RELEASE</code>, <code>LATEST</code>, or a SNAPSHOT the repository\nis queried for an updated artifact. If an updated artifact is found the file\nat <code>path</code> is replaced.</li>\n</ul>\n\n<h3>MAVEN_OPTS Precedence</h3>\n\n<p>Values set in <code>maven_opts</code> will be <em>prepended</em> to any existing\n<code>MAVEN_OPTS</code> value. This ensures that those already specified will win over\nthose added in <code>mavenrc</code>.</p>\n\n<p>If you would prefer these options to win, instead use:</p>\n\n<pre lang=\"puppet\"><code> maven_opts =&gt; &quot;&quot;,\n mavenrc_additions =&gt; &#39;MAVEN_OPTS=&quot;$MAVEN_OPTS -Xmx1024m&quot;\n</code></pre>\n\n<h2>Examples</h2>\n\n<h3>Setup</h3>\n\n<pre lang=\"puppet\"><code> $central = {\n id =&gt; &quot;myrepo&quot;,\n username =&gt; &quot;myuser&quot;,\n password =&gt; &quot;mypassword&quot;,\n url =&gt; &quot;http://repo.acme.com&quot;,\n mirrorof =&gt; &quot;external:*&quot;, # if you want to use the repo as a mirror, see maven::settings below\n }\n\n $proxy = {\n active =&gt; true, #Defaults to true\n protocol =&gt; &#39;http&#39;, #Defaults to &#39;http&#39;\n host =&gt; &#39;http://proxy.acme.com&#39;,\n username =&gt; &#39;myuser&#39;, #Optional if proxy does not require\n password =&gt; &#39;mypassword&#39;, #Optional if proxy does not require\n nonProxyHosts =&gt; &#39;www.acme.com&#39;, #Optional, provides exceptions to the proxy\n }\n\n # Install Maven\n class { &quot;maven::maven&quot;:\n version =&gt; &quot;3.0.5&quot;, # 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 =&gt; {\n #url =&gt; &quot;http://repo.maven.apache.org/maven2&quot;,\n #username =&gt; &quot;&quot;,\n #password =&gt; &quot;&quot;,\n }\n } -&gt;\n\n # Setup a .mavenrc file for the specified user\n maven::environment { &#39;maven-env&#39; : \n user =&gt; &#39;root&#39;,\n # anything to add to MAVEN_OPTS in ~/.mavenrc\n maven_opts =&gt; &#39;-Xmx1384m&#39;, # anything to add to MAVEN_OPTS in ~/.mavenrc\n maven_path_additions =&gt; &quot;&quot;, # anything to add to the PATH in ~/.mavenrc\n\n } -&gt;\n\n # Create a settings.xml with the repo credentials\n maven::settings { &#39;maven-user-settings&#39; :\n mirrors =&gt; [$central], # mirrors entry in settings.xml, uses id, url, mirrorof from the hash passed\n servers =&gt; [$central], # servers entry in settings.xml, uses id, username, password from the hash passed\n proxies =&gt; [$proxy], # proxies entry in settings.xml, active, protocol, host, username, password, nonProxyHosts\n user =&gt; &#39;maven&#39;,\n }\n\n # defaults for all maven{} declarations\n Maven {\n user =&gt; &quot;maven&quot;, # you can make puppet run Maven as a specific user instead of root, useful to share Maven settings and local repository\n group =&gt; &quot;maven&quot;, # you can make puppet run Maven as a specific group\n repos =&gt; &quot;http://repo.maven.apache.org/maven2&quot;\n }\n</code></pre>\n\n<h2>Downloading artifacts</h2>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/maven-core-3.0.5.jar&quot;:\n id =&gt; &quot;org.apache.maven:maven-core:3.0.5:jar&quot;,\n repos =&gt; [&quot;central::default::http://repo.maven.apache.org/maven2&quot;,&quot;http://mirrors.ibiblio.org/pub/mirrors/maven2&quot;],\n }\n\n maven { &quot;/tmp/maven-core-3.0.5-sources.jar&quot;:\n groupid =&gt; &quot;org.apache.maven&quot;,\n artifactid =&gt; &quot;maven-core&quot;,\n version =&gt; &quot;3.0.5&quot;,\n classifier =&gt; &quot;sources&quot;,\n }\n</code></pre>\n\n<h2>Buildr version</h2>\n\n<p>Initially there was an <a href=\"http://buildr.apache.org\">Apache Buildr</a> version, but it required to have Buildr installed before running Puppet and you would need to <a href=\"http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync\">enable pluginsync</a>\nin both master and clients.</p>\n\n<h2>License</h2>\n\n<pre><code> Copyright 2011-2012 MaestroDev\n\n Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\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 &quot;AS IS&quot; 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</code></pre>\n\n<h2>Author</h2>\n\n<p>Carlos Sanchez <a href=\"mailto:csanchez@maestrodev.com\">csanchez@maestrodev.com</a>\n<a href=\"http://www.maestrodev.com\">MaestroDev</a>\n2010-03-01</p>\n</section>",
3078
+ "readme": "<section class=\"markdown\"><h1>Puppet-Maven</h1>\n\n<p>A Puppet recipe for Apache Maven, to download artifacts from a Maven repository</p>\n\n<p>Uses <a href=\"http://maven.apache.org\">Apache Maven</a> command line to download the artifacts.</p>\n\n<h2>Building and Installing the Module</h2>\n\n<p>To build the module for installing in your primary Puppet server:</p>\n\n<pre lang=\"sh\"><code>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</code></pre>\n\n<p>Of course, you can also clone the repository straight into <code>/etc/puppet/modules/maven</code> as well.</p>\n\n<h2>Developing and Testing the Module</h2>\n\n<p>If you are developing the module, it can be built using <code>rake</code>:</p>\n\n<pre lang=\"sh\"><code>gem install bundler\nbundle\nrake spec\nrake spec:system\n</code></pre>\n\n<h2>Usage</h2>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/myfile&quot;:\n id =&gt; &quot;groupId:artifactId:version:packaging:classifier&quot;,\n repos =&gt; [&quot;id::layout::http://repo.acme.com&quot;,&quot;http://repo2.acme.com&quot;],\n }\n</code></pre>\n\n<p>or</p>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/myfile&quot;:\n groupid =&gt; &quot;org.apache.maven&quot;,\n artifactid =&gt; &quot;maven-core&quot;,\n version =&gt; &quot;3.0.5&quot;,\n packaging =&gt; &quot;jar&quot;,\n classifier =&gt; &quot;sources&quot;,\n repos =&gt; [&quot;id::layout::http://repo.acme.com&quot;,&quot;http://repo2.acme.com&quot;],\n }\n</code></pre>\n\n<h3>ensure</h3>\n\n<p><code>ensure</code> may be one of two values:</p>\n\n<ul>\n<li><code>present</code> (the default) -- the specified maven artifact is downloaded when no file exists\nat <code>path</code> (or <code>name</code> if no path is specified.) This is probably makes\nsense when the specified maven artifact refers to a released (non-SNAPSHOT)\nartifact.</li>\n<li> <code>latest</code> -- if value of version is <code>RELEASE</code>, <code>LATEST</code>, or a SNAPSHOT the repository\nis queried for an updated artifact. If an updated artifact is found the file\nat <code>path</code> is replaced.</li>\n</ul>\n\n<h3>MAVEN_OPTS Precedence</h3>\n\n<p>Values set in <code>maven_opts</code> will be <em>prepended</em> to any existing\n<code>MAVEN_OPTS</code> value. This ensures that those already specified will win over\nthose added in <code>mavenrc</code>.</p>\n\n<p>If you would prefer these options to win, instead use:</p>\n\n<pre lang=\"puppet\"><code> maven_opts =&gt; &quot;&quot;,\n mavenrc_additions =&gt; &#39;MAVEN_OPTS=&quot;$MAVEN_OPTS -Xmx1024m&quot;\n</code></pre>\n\n<h2>Examples</h2>\n\n<h3>Setup</h3>\n\n<pre lang=\"puppet\"><code> $central = {\n id =&gt; &quot;myrepo&quot;,\n username =&gt; &quot;myuser&quot;,\n password =&gt; &quot;mypassword&quot;,\n url =&gt; &quot;http://repo.acme.com&quot;,\n mirrorof =&gt; &quot;external:*&quot;, # if you want to use the repo as a mirror, see maven::settings below\n }\n\n $proxy = {\n active =&gt; true, #Defaults to true\n protocol =&gt; &#39;http&#39;, #Defaults to &#39;http&#39;\n host =&gt; &#39;http://proxy.acme.com&#39;,\n username =&gt; &#39;myuser&#39;, #Optional if proxy does not require\n password =&gt; &#39;mypassword&#39;, #Optional if proxy does not require\n nonProxyHosts =&gt; &#39;www.acme.com&#39;, #Optional, provides exceptions to the proxy\n }\n\n # Install Maven\n class { &quot;maven::maven&quot;:\n version =&gt; &quot;3.0.5&quot;, # 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 =&gt; {\n #url =&gt; &quot;http://repo.maven.apache.org/maven2&quot;,\n #username =&gt; &quot;&quot;,\n #password =&gt; &quot;&quot;,\n }\n } -&gt;\n\n # Setup a .mavenrc file for the specified user\n maven::environment { &#39;maven-env&#39; : \n user =&gt; &#39;root&#39;,\n # anything to add to MAVEN_OPTS in ~/.mavenrc\n maven_opts =&gt; &#39;-Xmx1384m&#39;, # anything to add to MAVEN_OPTS in ~/.mavenrc\n maven_path_additions =&gt; &quot;&quot;, # anything to add to the PATH in ~/.mavenrc\n\n } -&gt;\n\n # Create a settings.xml with the repo credentials\n maven::settings { &#39;maven-user-settings&#39; :\n mirrors =&gt; [$central], # mirrors entry in settings.xml, uses id, url, mirrorof from the hash passed\n servers =&gt; [$central], # servers entry in settings.xml, uses id, username, password from the hash passed\n proxies =&gt; [$proxy], # proxies entry in settings.xml, active, protocol, host, username, password, nonProxyHosts\n user =&gt; &#39;maven&#39;,\n }\n\n # defaults for all maven{} declarations\n Maven {\n user =&gt; &quot;maven&quot;, # you can make puppet run Maven as a specific user instead of root, useful to share Maven settings and local repository\n group =&gt; &quot;maven&quot;, # you can make puppet run Maven as a specific group\n repos =&gt; &quot;http://repo.maven.apache.org/maven2&quot;\n }\n</code></pre>\n\n<h2>Downloading artifacts</h2>\n\n<pre lang=\"puppet\"><code> maven { &quot;/tmp/maven-core-3.0.5.jar&quot;:\n id =&gt; &quot;org.apache.maven:maven-core:3.0.5:jar&quot;,\n repos =&gt; [&quot;central::default::http://repo.maven.apache.org/maven2&quot;,&quot;http://mirrors.ibiblio.org/pub/mirrors/maven2&quot;],\n }\n\n maven { &quot;/tmp/maven-core-3.0.5-sources.jar&quot;:\n groupid =&gt; &quot;org.apache.maven&quot;,\n artifactid =&gt; &quot;maven-core&quot;,\n version =&gt; &quot;3.0.5&quot;,\n classifier =&gt; &quot;sources&quot;,\n }\n</code></pre>\n\n<h2>Buildr version</h2>\n\n<p>Initially there was an <a href=\"http://buildr.apache.org\">Apache Buildr</a> version, but it required to have Buildr installed before running Puppet and you would need to <a href=\"http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync\">enable pluginsync</a>\nin both primary Puppet server and clients.</p>\n\n<h2>License</h2>\n\n<pre><code> Copyright 2011-2012 MaestroDev\n\n Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\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 &quot;AS IS&quot; 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</code></pre>\n\n<h2>Author</h2>\n\n<p>Carlos Sanchez <a href=\"mailto:csanchez@maestrodev.com\">csanchez@maestrodev.com</a>\n<a href=\"http://www.maestrodev.com\">MaestroDev</a>\n2010-03-01</p>\n</section>",
3079
3079
  "changelog": null,
3080
3080
  "license": "<section class=\"plaintext\"><pre>\n Apache License\n Version 2.0, January 2004\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n &quot;License&quot; shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n &quot;Licensor&quot; shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n &quot;Legal Entity&quot; 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 &quot;control&quot; 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 &quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n &quot;Source&quot; 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 &quot;Object&quot; 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 &quot;Work&quot; 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 &quot;Derivative Works&quot; 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 &quot;Contribution&quot; 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, &quot;submitted&quot;\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 &quot;Not a Contribution.&quot;\n\n &quot;Contributor&quot; 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 &quot;NOTICE&quot; 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 &quot;AS IS&quot; 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&#x2F;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 &quot;[]&quot;\n replaced with your own identifying information. (Don&#x27;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 &quot;printed page&quot; 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 &quot;License&quot;);\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:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;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 &quot;AS IS&quot; 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</pre></section>",
3081
3081
  "created_at": "2013-12-20 09:58:35 -0800",
@@ -3148,4 +3148,4 @@
3148
3148
  "issues_url": "http://github.com/maestrodev/puppet-maven/issues"
3149
3149
  }
3150
3150
  ]
3151
- }
3151
+ }
@@ -302,8 +302,8 @@
302
302
  "file_size": 67586,
303
303
  "file_md5": "bbf919d7ee9d278d2facf39c25578bf8",
304
304
  "downloads": 628084,
305
- "readme": "<section class=\"markdown\"><h1>Puppet Labs Standard Library</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-stdlib\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<p>This module provides a &quot;standard library&quot; of resources for developing Puppet\nModules. This modules will include the following additions to Puppet</p>\n\n<ul>\n<li>Stages</li>\n<li>Facts</li>\n<li>Functions</li>\n<li>Defined resource types</li>\n<li>Types</li>\n<li>Providers</li>\n</ul>\n\n<p>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.</p>\n\n<p>To report or research a bug with any part of this module, please go to\n<a href=\"http://projects.puppetlabs.com/projects/stdlib\">http://projects.puppetlabs.com/projects/stdlib</a></p>\n\n<h1>Versions</h1>\n\n<p>This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of <a href=\"http://puppetlabs.com/puppet/puppet-enterprise/\">Puppet\nEnterprise</a> and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically &quot;merged up&quot; into master. The current\nlist of integration branches are:</p>\n\n<ul>\n<li>v2.1.x (v2.1.1 released in PE 1)</li>\n<li>v2.2.x (Never released as part of PE, only to the Forge)</li>\n<li>v2.3.x (Released in PE 2)</li>\n<li>v3.0.x (Never released as part of PE, only to the Forge)</li>\n<li>v4.0.x (Drops support for Puppet 2.7)</li>\n<li>master (mainline development branch)</li>\n</ul>\n\n<p>The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.</p>\n\n<h1>Compatibility</h1>\n\n<table><thead>\n<tr>\n<th align=\"left\">Puppet Versions</th>\n<th align=\"center\">&lt; 2.6</th>\n<th align=\"center\">2.6</th>\n<th align=\"center\">2.7</th>\n<th align=\"center\">3.x</th>\n</tr>\n</thead><tbody>\n<tr>\n<td align=\"left\"><strong>stdlib 2.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\">no</td>\n</tr>\n<tr>\n<td align=\"left\"><strong>stdlib 3.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\"><strong>yes</strong></td>\n</tr>\n<tr>\n<td align=\"left\"><strong>stdlib 4.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n</tr>\n</tbody></table>\n\n<p>The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.</p>\n\n<h2>stdlib 2.x</h2>\n\n<p>All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.</p>\n\n<h2>stdlib 3.x</h2>\n\n<p>The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2 and Puppet 3.</p>\n\n<h2>stdlib 4.x</h2>\n\n<p>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.</p>\n\n<h1>Functions</h1>\n\n<h2>abs</h2>\n\n<p>Returns the absolute value of a number, for example -34.56 becomes\n34.56. Takes a single integer and float value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>any2array</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>bool2num</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>capitalize</h2>\n\n<p>Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chomp</h2>\n\n<p>Removes the record separator from the end of a string or an array of\nstrings, for example <code>hello\\n</code> becomes <code>hello</code>.\nRequires a single string or array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chop</h2>\n\n<p>Returns a new string with the last character removed. If the string ends\nwith <code>\\r\\n</code>, 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 <code>chomp</code> function.\nRequires a string or array of strings as input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>concat</h2>\n\n<p>Appends the contents of array 2 onto array 1.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>concat([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<p>[&#39;1&#39;,&#39;2&#39;,&#39;3&#39;,&#39;4&#39;,&#39;5&#39;,&#39;6&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>count</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>defined_with_params</h2>\n\n<p>Takes a resource reference and an optional hash of attributes.</p>\n\n<p>Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n\nif ! defined_with_params(User[dan], {&#39;ensure&#39; =&gt; &#39;present&#39; }) {\n user { &#39;dan&#39;: ensure =&gt; present, }\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete</h2>\n\n<p>Deletes all instances of a given element from an array, substring from a\nstring, or key from a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;b&#39;], &#39;b&#39;)\nWould return: [&#39;a&#39;,&#39;c&#39;]\n\ndelete({&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}, &#39;b&#39;)\nWould return: {&#39;a&#39;=&gt;1,&#39;c&#39;=&gt;3}\n\ndelete(&#39;abracadabra&#39;, &#39;bra&#39;)\nWould return: &#39;acada&#39;\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete_at</h2>\n\n<p>Deletes a determined indexed value from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 1)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>dirname</h2>\n\n<p>Returns the <code>dirname</code> of a path.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>dirname(&#39;/path/to/a/file.ext&#39;)\n</code></pre>\n\n<p>Would return: &#39;/path/to/a&#39;</p>\n\n<h2>downcase</h2>\n\n<p>Converts the case of a string or all strings in an array to lower case.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>empty</h2>\n\n<p>Returns true if the variable is empty.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>ensure_packages</h2>\n\n<p>Takes a list of packages and only installs them if they don&#39;t already exist.</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>ensure_resource</h2>\n\n<p>Takes a resource type, title, and a list of attributes that describe a\nresource.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>This example only creates the resource if it does not already exist:</p>\n\n<pre><code>ensure_resource(&#39;user, &#39;dan&#39;, {&#39;ensure&#39; =&gt; &#39;present&#39; })\n</code></pre>\n\n<p>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.</p>\n\n<p>An array of resources can also be passed in and each will be created with\nthe type and parameters specified if it doesn&#39;t already exist.</p>\n\n<pre><code>ensure_resource(&#39;user&#39;, [&#39;dan&#39;,&#39;alex&#39;], {&#39;ensure&#39; =&gt; &#39;present&#39;})\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>flatten</h2>\n\n<p>This function flattens any deeply nested arrays and returns a single flat array\nas a result.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>flatten([&#39;a&#39;, [&#39;b&#39;, [&#39;c&#39;]]])\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;b&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>floor</h2>\n\n<p>Returns the largest integer less or equal to the argument.\nTakes a single numeric value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>fqdn_rotate</h2>\n\n<p>Rotates an array a random number of times based on a nodes fqdn.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>get_module_path</h2>\n\n<p>Returns the absolute path of the specified module for the current\nenvironment.</p>\n\n<p>Example:\n $module_path = get_module_path(&#39;stdlib&#39;)</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getparam</h2>\n\n<p>Takes a resource reference and name of the parameter and\nreturns value of resource&#39;s parameter.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>define example_resource($param) {\n}\n\nexample_resource { &quot;example_resource_instance&quot;:\n param =&gt; &quot;param_value&quot;\n}\n\ngetparam(Example_resource[&quot;example_resource_instance&quot;], &quot;param&quot;)\n</code></pre>\n\n<p>Would return: param_value</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getvar</h2>\n\n<p>Lookup a variable in a remote namespace.</p>\n\n<p>For example:</p>\n\n<pre><code>$foo = getvar(&#39;site::data::foo&#39;)\n# Equivalent to $foo = $site::data::foo\n</code></pre>\n\n<p>This is useful if the namespace itself is stored in a string:</p>\n\n<pre><code>$datalocation = &#39;site::data&#39;\n$bar = getvar(&quot;${datalocation}::bar&quot;)\n# Equivalent to $bar = $site::data::bar\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>grep</h2>\n\n<p>This function searches through an array and returns any elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>grep([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;aaa&#39;,&#39;aaaddd&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_interface_with</h2>\n\n<p>Returns boolean based on kind and value:</p>\n\n<ul>\n<li>macaddress</li>\n<li>netmask</li>\n<li>ipaddress</li>\n<li>network</li>\n</ul>\n\n<p>has_interface_with(&quot;macaddress&quot;, &quot;x:x:x:x:x:x&quot;)\nhas_interface_with(&quot;ipaddress&quot;, &quot;127.0.0.1&quot;) =&gt; true\netc.</p>\n\n<p>If no &quot;kind&quot; is given, then the presence of the interface is checked:\nhas_interface_with(&quot;lo&quot;) =&gt; true</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_ip_address</h2>\n\n<p>Returns true if the client has the requested IP address on some interface.</p>\n\n<p>This function iterates through the &#39;interfaces&#39; fact and checks the\n&#39;ipaddress_IFACE&#39; facts, performing a simple string comparison.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_ip_network</h2>\n\n<p>Returns true if the client has an IP address within the requested network.</p>\n\n<p>This function iterates through the &#39;interfaces&#39; fact and checks the\n&#39;network_IFACE&#39; facts, performing a simple string comparision.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_key</h2>\n\n<p>Determine if a hash has a certain key value.</p>\n\n<p>Example:</p>\n\n<pre><code>$my_hash = {&#39;key_one&#39; =&gt; &#39;value_one&#39;}\nif has_key($my_hash, &#39;key_two&#39;) {\n notice(&#39;we will not reach here&#39;)\n}\nif has_key($my_hash, &#39;key_one&#39;) {\n notice(&#39;this will be printed&#39;)\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>hash</h2>\n\n<p>This function converts an array into a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>hash([&#39;a&#39;,1,&#39;b&#39;,2,&#39;c&#39;,3])\n</code></pre>\n\n<p>Would return: {&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_array</h2>\n\n<p>Returns true if the variable passed to this function is an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_domain_name</h2>\n\n<p>Returns true if the string passed to this function is a syntactically correct domain name.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_float</h2>\n\n<p>Returns true if the variable passed to this function is a float.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_function_available</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_hash</h2>\n\n<p>Returns true if the variable passed to this function is a hash.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_integer</h2>\n\n<p>Returns true if the variable returned to this string is an integer.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_ip_address</h2>\n\n<p>Returns true if the string passed to this function is a valid IP address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_mac_address</h2>\n\n<p>Returns true if the string passed to this function is a valid mac address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_numeric</h2>\n\n<p>Returns true if the variable passed to this function is a number.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_string</h2>\n\n<p>Returns true if the variable passed to this function is a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join</h2>\n\n<p>This function joins an array into a string using a seperator.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &quot;,&quot;)\n</code></pre>\n\n<p>Would result in: &quot;a,b,c&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join_keys_to_values</h2>\n\n<p>This function joins each key of a hash to that key&#39;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.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join_keys_to_values({&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2}, &quot; is &quot;)\n</code></pre>\n\n<p>Would result in: [&quot;a is 1&quot;,&quot;b is 2&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>keys</h2>\n\n<p>Returns the keys of a hash as an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>loadyaml</h2>\n\n<p>Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.</p>\n\n<p>For example:</p>\n\n<pre><code>$myhash = loadyaml(&#39;/etc/puppet/data/myhash.yaml&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>lstrip</h2>\n\n<p>Strips leading spaces to the left of a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>max</h2>\n\n<p>Returns the highest value of all arguments.\nRequires at least one argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>member</h2>\n\n<p>This function determines if a variable is a member of an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: true</p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;c&#39;)\n</code></pre>\n\n<p>Would return: false</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>merge</h2>\n\n<p>Merges two or more hashes together and returns the resulting hash.</p>\n\n<p>For example:</p>\n\n<pre><code>$hash1 = {&#39;one&#39; =&gt; 1, &#39;two&#39;, =&gt; 2}\n$hash2 = {&#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39;, =&gt; &#39;tres&#39;}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash = {&#39;one&#39; =&gt; 1, &#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39; =&gt; &#39;tres&#39;}\n</code></pre>\n\n<p>When there is a duplicate key, the key in the rightmost hash will &quot;win.&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>min</h2>\n\n<p>Returns the lowest value of all arguments.\nRequires at least one argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>num2bool</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parsejson</h2>\n\n<p>This function accepts JSON as a string and converts into the correct Puppet\nstructure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parseyaml</h2>\n\n<p>This function accepts YAML as a string and converts it into the correct\nPuppet structure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>pick</h2>\n\n<p>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:</p>\n\n<pre><code>$real_jenkins_version = pick($::jenkins_version, &#39;1.449&#39;)\n</code></pre>\n\n<p>The value of $real_jenkins_version will first look for a top-scope variable\ncalled &#39;jenkins_version&#39; (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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>prefix</h2>\n\n<p>This function applies a prefix to all elements in an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>prefix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;pa&#39;,&#39;pb&#39;,&#39;pc&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>range</h2>\n\n<p>When given range in the form of (start, stop) it will extrapolate a range as\nan array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>range(&quot;0&quot;, &quot;9&quot;)\n</code></pre>\n\n<p>Will return: [0,1,2,3,4,5,6,7,8,9]</p>\n\n<pre><code>range(&quot;00&quot;, &quot;09&quot;)\n</code></pre>\n\n<p>Will return: <a href=\"Zero%20padded%20strings%20are%20converted%20to%0Aintegers%20automatically\">0,1,2,3,4,5,6,7,8,9</a></p>\n\n<pre><code>range(&quot;a&quot;, &quot;c&quot;)\n</code></pre>\n\n<p>Will return: [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]</p>\n\n<pre><code>range(&quot;host01&quot;, &quot;host10&quot;)\n</code></pre>\n\n<p>Will return: [&quot;host01&quot;, &quot;host02&quot;, ..., &quot;host09&quot;, &quot;host10&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reject</h2>\n\n<p>This function searches through an array and rejects all elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>reject([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;bbb&#39;,&#39;ccc&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reverse</h2>\n\n<p>Reverses the order of a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>rstrip</h2>\n\n<p>Strips leading spaces to the right of the string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>shuffle</h2>\n\n<p>Randomizes the order of a string or array elements.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>size</h2>\n\n<p>Returns the number of elements in a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>sort</h2>\n\n<p>Sorts strings and arrays lexically.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>squeeze</h2>\n\n<p>Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2bool</h2>\n\n<p>This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to &#39;true&#39; and strings that contain things\nlike: 0, f, n, false, no to &#39;false&#39;.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2saltedsha512</h2>\n\n<p>This converts a string to a salted-SHA512 password hash (which is used for\nOS X versions &gt;= 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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strftime</h2>\n\n<p>This function returns formatted time.</p>\n\n<p><em>Examples:</em></p>\n\n<p>To return the time since epoch:</p>\n\n<pre><code>strftime(&quot;%s&quot;)\n</code></pre>\n\n<p>To return the date:</p>\n\n<pre><code>strftime(&quot;%Y-%m-%d&quot;)\n</code></pre>\n\n<p><em>Format meaning:</em></p>\n\n<pre><code>%a - The abbreviated weekday name (``Sun&#39;&#39;)\n%A - The full weekday name (``Sunday&#39;&#39;)\n%b - The abbreviated month name (``Jan&#39;&#39;)\n%B - The full month name (``January&#39;&#39;)\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</code></pre>\n\n<p>)\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 (<code>AM&#39;&#39; or</code>PM&#39;&#39;)\n %P - Meridian indicator (<code>am&#39;&#39; or</code>pm&#39;&#39;)\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 ``%&#39;&#39; character</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strip</h2>\n\n<p>This function removes leading and trailing whitespace from a string or from\nevery string inside an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>strip(&quot; aaa &quot;)\n</code></pre>\n\n<p>Would result in: &quot;aaa&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>suffix</h2>\n\n<p>This function applies a suffix to all elements in an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>suffix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;ap&#39;,&#39;bp&#39;,&#39;cp&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>swapcase</h2>\n\n<p>This function will swap the existing case of a string.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>swapcase(&quot;aBcD&quot;)\n</code></pre>\n\n<p>Would result in: &quot;AbCd&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>time</h2>\n\n<p>This function will return the current time since epoch as an integer.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>time()\n</code></pre>\n\n<p>Will return something like: 1311972653</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>to_bytes</h2>\n\n<p>Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>type</h2>\n\n<p>Returns the type when passed a variable. Type can be one of:</p>\n\n<ul>\n<li>string</li>\n<li>array</li>\n<li>hash</li>\n<li>float</li>\n<li>integer</li>\n<li><p>boolean</p></li>\n<li><p><em>Type</em>: rvalue</p></li>\n</ul>\n\n<h2>unique</h2>\n\n<p>This function will remove duplicates from strings and arrays.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>unique(&quot;aabbcc&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>abc\n</code></pre>\n\n<p>You can also use this with arrays:</p>\n\n<pre><code>unique([&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;c&quot;])\n</code></pre>\n\n<p>This returns:</p>\n\n<pre><code>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>upcase</h2>\n\n<p>Converts a string or an array of strings to uppercase.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>upcase(&quot;abcd&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>ASDF\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>uriescape</h2>\n\n<p>Urlencodes a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>validate_absolute_path</h2>\n\n<p>Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_path = &quot;C:/Program Files (x86)/Puppet Labs/Puppet&quot;\nvalidate_absolute_path($my_path)\n$my_path2 = &quot;/var/lib/puppet&quot;\nvalidate_absolute_path($my_path2)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_absolute_path(true)\nvalidate_absolute_path([ &#39;var/lib/puppet&#39;, &#39;/var/foo&#39; ])\nvalidate_absolute_path([ &#39;/var/lib/puppet&#39;, &#39;var/foo&#39; ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_array</h2>\n\n<p>Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_array = [ &#39;one&#39;, &#39;two&#39; ]\nvalidate_array($my_array)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_array(true)\nvalidate_array(&#39;some_string&#39;)\n$undefined = undef\nvalidate_array($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_augeas</h2>\n\n<p>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.</p>\n\n<p>A third argument can be specified, listing paths which should\nnot be found in the file. The <code>$file</code> variable points to the location\nof the temporary file being tested in the Augeas tree.</p>\n\n<p>For example, if you want to make sure your passwd content never contains\na user <code>foo</code>, you could write:</p>\n\n<pre><code>validate_augeas($passwdcontent, &#39;Passwd.lns&#39;, [&#39;$file/foo&#39;])\n</code></pre>\n\n<p>Or if you wanted to ensure that no users used the &#39;/bin/barsh&#39; shell,\nyou could use:</p>\n\n<pre><code>validate_augeas($passwdcontent, &#39;Passwd.lns&#39;, [&#39;$file/*[shell=&quot;/bin/barsh&quot;]&#39;]\n</code></pre>\n\n<p>If a fourth argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_augeas($sudoerscontent, &#39;Sudoers.lns&#39;, [], &#39;Failed to validate sudoers content with Augeas&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_bool</h2>\n\n<p>Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>$some_array = [ true ]\nvalidate_bool(&quot;false&quot;)\nvalidate_bool(&quot;true&quot;)\nvalidate_bool($some_array)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_cmd</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>A helpful error message can be returned like this:</p>\n\n<p>Example:</p>\n\n<pre><code>validate_cmd($sudoerscontent, &#39;/usr/sbin/visudo -c -f&#39;, &#39;Visudo failed to validate sudoers content&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_hash</h2>\n\n<p>Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_hash = { &#39;one&#39; =&gt; &#39;two&#39; }\nvalidate_hash($my_hash)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_hash(true)\nvalidate_hash(&#39;some_string&#39;)\n$undefined = undef\nvalidate_hash($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_re</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>The following strings will validate against the regular expressions:</p>\n\n<pre><code>validate_re(&#39;one&#39;, &#39;^one$&#39;)\nvalidate_re(&#39;one&#39;, [ &#39;^one&#39;, &#39;^two&#39; ])\n</code></pre>\n\n<p>The following strings will fail to validate, causing compilation to abort:</p>\n\n<pre><code>validate_re(&#39;one&#39;, [ &#39;^two&#39;, &#39;^three&#39; ])\n</code></pre>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_re($::puppetversion, &#39;^2.7&#39;, &#39;The $puppetversion fact value does not match 2.7&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_slength</h2>\n\n<p>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.</p>\n\n<p>The following values will pass:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,17)\n validate_slength([&quot;discombobulate&quot;,&quot;moo&quot;],17)</p>\n\n<p>The following valueis will not:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,1)\n validate_slength([&quot;discombobulate&quot;,&quot;thermometer&quot;],5)</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_string</h2>\n\n<p>Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_string = &quot;one two&quot;\nvalidate_string($my_string, &#39;three&#39;)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_string(true)\nvalidate_string([ &#39;some&#39;, &#39;array&#39; ])\n$undefined = undef\nvalidate_string($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>values</h2>\n\n<p>When given a hash this function will return the values of that hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>$hash = {\n &#39;a&#39; =&gt; 1,\n &#39;b&#39; =&gt; 2,\n &#39;c&#39; =&gt; 3,\n}\nvalues($hash)\n</code></pre>\n\n<p>This example would return:</p>\n\n<pre><code>[1,2,3]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>values_at</h2>\n\n<p>Finds value inside an array based on location.</p>\n\n<p>The first argument is the array you want to analyze, and the second element can\nbe a combination of:</p>\n\n<ul>\n<li>A single numeric index</li>\n<li>A range in the form of &#39;start-stop&#39; (eg. 4-9)</li>\n<li>An array combining the above</li>\n</ul>\n\n<p><em>Examples</em>:</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 2)\n</code></pre>\n\n<p>Would return [&#39;c&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], [&quot;0-1&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;b&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;d&#39;,&#39;e&#39;], [0, &quot;2-3&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;c&#39;,&#39;d&#39;].</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>zip</h2>\n\n<p>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.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>zip([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<pre><code>[&quot;1&quot;, &quot;4&quot;], [&quot;2&quot;, &quot;5&quot;], [&quot;3&quot;, &quot;6&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<p><em>This page autogenerated on 2013-04-11 13:54:25 -0700</em></p>\n</section>",
306
- "changelog": "<section class=\"plaintext\"><pre>2013-05-06 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;acline@us.ibm.com&gt; - 4.1.0\n * Terser method of string to array conversion courtesy of ethooz. (d38bce0)\n\n2013-05-06 - Alex Cline &lt;acline@us.ibm.com&gt; 4.1.0\n * Refactor ensure_resource expectations (b33cc24)\n\n2013-05-06 - Alex Cline &lt;acline@us.ibm.com&gt; 4.1.0\n * Changed str-to-array conversion and removed abbreviation. (de253db)\n\n2013-05-03 - Alex Cline &lt;acline@us.ibm.com&gt; 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 &lt;raphael.pinson@camptocamp.com&gt; - 4.1.0\n * Add a dirname function (2ba9e47)\n\n2013-04-29 - Mark Smith-Guerrero &lt;msmithgu@gmail.com&gt; - 4.1.0\n * (maint) Fix a small typo in hash() description (928036a)\n\n2013-04-12 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.2\n * Update user information in gemspec to make the intent of the Gem clear.\n\n2013-04-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.1\n * Fix README function documentation (ab3e30c)\n\n2013-04-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Add ability to use puppet from git via bundler (9c5805f)\n\n2013-04-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * (maint) Make stdlib usable as a Ruby GEM (e81a45e)\n\n2013-04-10 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * Add a count function (f28550e)\n\n2013-03-31 - Amos Shapira &lt;ashapira@atlassian.com&gt; - 4.0.0\n * (#19998) Implement any2array (7a2fb80)\n\n2013-03-29 - Steve Huff &lt;shuff@vecna.org&gt; - 4.0.0\n * (19864) num2bool match fix (8d217f0)\n\n2013-03-20 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * Allow comparisons of Numeric and number as String (ff5dd5d)\n\n2013-03-26 - Richard Soderberg &lt;rsoderberg@mozilla.com&gt; - 4.0.0\n * add suffix function to accompany the prefix function (88a93ac)\n\n2013-03-19 - Kristof Willaert &lt;kristof.willaert@gmail.com&gt; - 4.0.0\n * Add floor function implementation and unit tests (0527341)\n\n2012-04-03 - Eric Shamow &lt;eric@puppetlabs.com&gt; - 4.0.0\n * (#13610) Add is_function_available to stdlib (961dcab)\n\n2012-12-17 - Justin Lambert &lt;jlambert@eml.cc&gt; - 4.0.0\n * str2bool should return a boolean if called with a boolean (5d5a4d4)\n\n2012-10-23 - Uwe Stuehler &lt;ustuehler@team.mobile.de&gt; - 4.0.0\n * Fix number of arguments check in flatten() (e80207b)\n\n2013-03-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Add contributing document (96e19d0)\n\n2013-03-04 - Raphaël Pinson &lt;raphael.pinson@camptocamp.com&gt; - 4.0.0\n * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)\n\n2013-02-14 - Joshua Hoblitt &lt;jhoblitt@cpan.org&gt; - 4.0.0\n * (#19272) Add has_element() function (95cf3fe)\n\n2013-02-07 - Raphaël Pinson &lt;raphael.pinson@camptocamp.com&gt; - 4.0.0\n * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)\n\n2012-12-06 - Raphaël Pinson &lt;raphink@gmail.com&gt; - 4.0.0\n * Add validate_augeas function (3a97c23)\n\n2012-12-06 - Raphaël Pinson &lt;raphink@gmail.com&gt; - 4.0.0\n * Add validate_cmd function (6902cc5)\n\n2013-01-14 - David Schmitt &lt;david@dasz.at&gt; - 4.0.0\n * Add geppetto project definition (b3fc0a3)\n\n2013-01-02 - Jaka Hudoklin &lt;jakahudoklin@gmail.com&gt; - 4.0.0\n * Add getparam function to get defined resource parameters (20e0e07)\n\n2013-01-05 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * (maint) Add Travis CI Support (d082046)\n\n2012-12-04 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Clarify that stdlib 3 supports Puppet 3 (3a6085f)\n\n2012-11-30 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * maint: style guideline fixes (7742e5f)\n\n2012-11-09 - James Fryman &lt;james@frymanet.com&gt; - 4.0.0\n * puppet-lint cleanup (88acc52)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 4.0.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)\n\n2012-09-18 - Chad Metcalf &lt;chad@wibidata.com&gt; - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén &lt;dalen@spotify.com&gt; - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * (#14670) autorequire a file_line resource&#x27;s path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza &lt;gary@puppetlabs.com&gt; - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley &lt;wcooley@pdx.edu&gt; - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;dan@puppetlabs.com&gt; - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price &lt;chris@puppetlabs.com&gt; - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price &lt;chris@puppetlabs.com&gt; - 2.4.0\n * Add support for a &#x27;match&#x27; parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén &lt;dalen@spotify.com&gt; - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen &lt;steve.traylen@cern.ch&gt; - 2.4.0\n * (#13205) Rotate array&#x2F;string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs &lt;support@puppetlabs.com&gt; - 2.3.2\n * Make file_line default to ensure =&gt; 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 master (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* &#x2F;etc&#x2F;facter&#x2F;facts.d\n* &#x2F;etc&#x2F;puppetlabs&#x2F;facter&#x2F;facts.d\n\n2011-08-17 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.0\n* Add R.I. Pienaar&#x27;s facts.d custom facter fact\n* facts defined in &#x2F;etc&#x2F;facts.d and &#x2F;etc&#x2F;puppetlabs&#x2F;facts.d are\n automatically loaded now.\n\n2011-08-04 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add stdlib::stages class with a standard set of stages\n</pre></section>",
305
+ "readme": "<section class=\"markdown\"><h1>Puppet Labs Standard Library</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-stdlib\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<p>This module provides a &quot;standard library&quot; of resources for developing Puppet\nModules. This modules will include the following additions to Puppet</p>\n\n<ul>\n<li>Stages</li>\n<li>Facts</li>\n<li>Functions</li>\n<li>Defined resource types</li>\n<li>Types</li>\n<li>Providers</li>\n</ul>\n\n<p>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.</p>\n\n<p>To report or research a bug with any part of this module, please go to\n<a href=\"http://projects.puppetlabs.com/projects/stdlib\">http://projects.puppetlabs.com/projects/stdlib</a></p>\n\n<h1>Versions</h1>\n\n<p>This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of <a href=\"http://puppetlabs.com/puppet/puppet-enterprise/\">Puppet\nEnterprise</a> and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically &quot;merged up&quot; into main. The current\nlist of integration branches are:</p>\n\n<ul>\n<li>v2.1.x (v2.1.1 released in PE 1)</li>\n<li>v2.2.x (Never released as part of PE, only to the Forge)</li>\n<li>v2.3.x (Released in PE 2)</li>\n<li>v3.0.x (Never released as part of PE, only to the Forge)</li>\n<li>v4.0.x (Drops support for Puppet 2.7)</li>\n<li>main (mainline development branch)</li>\n</ul>\n\n<p>The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.</p>\n\n<h1>Compatibility</h1>\n\n<table><thead>\n<tr>\n<th align=\"left\">Puppet Versions</th>\n<th align=\"center\">&lt; 2.6</th>\n<th align=\"center\">2.6</th>\n<th align=\"center\">2.7</th>\n<th align=\"center\">3.x</th>\n</tr>\n</thead><tbody>\n<tr>\n<td align=\"left\"><strong>stdlib 2.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\">no</td>\n</tr>\n<tr>\n<td align=\"left\"><strong>stdlib 3.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n<td align=\"center\"><strong>yes</strong></td>\n</tr>\n<tr>\n<td align=\"left\"><strong>stdlib 4.x</strong></td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\">no</td>\n<td align=\"center\"><strong>yes</strong></td>\n</tr>\n</tbody></table>\n\n<p>The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.</p>\n\n<h2>stdlib 2.x</h2>\n\n<p>All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.</p>\n\n<h2>stdlib 3.x</h2>\n\n<p>The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2 and Puppet 3.</p>\n\n<h2>stdlib 4.x</h2>\n\n<p>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.</p>\n\n<h1>Functions</h1>\n\n<h2>abs</h2>\n\n<p>Returns the absolute value of a number, for example -34.56 becomes\n34.56. Takes a single integer and float value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>any2array</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>bool2num</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>capitalize</h2>\n\n<p>Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chomp</h2>\n\n<p>Removes the record separator from the end of a string or an array of\nstrings, for example <code>hello\\n</code> becomes <code>hello</code>.\nRequires a single string or array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chop</h2>\n\n<p>Returns a new string with the last character removed. If the string ends\nwith <code>\\r\\n</code>, 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 <code>chomp</code> function.\nRequires a string or array of strings as input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>concat</h2>\n\n<p>Appends the contents of array 2 onto array 1.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>concat([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<p>[&#39;1&#39;,&#39;2&#39;,&#39;3&#39;,&#39;4&#39;,&#39;5&#39;,&#39;6&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>count</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>defined_with_params</h2>\n\n<p>Takes a resource reference and an optional hash of attributes.</p>\n\n<p>Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n\nif ! defined_with_params(User[dan], {&#39;ensure&#39; =&gt; &#39;present&#39; }) {\n user { &#39;dan&#39;: ensure =&gt; present, }\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete</h2>\n\n<p>Deletes all instances of a given element from an array, substring from a\nstring, or key from a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;b&#39;], &#39;b&#39;)\nWould return: [&#39;a&#39;,&#39;c&#39;]\n\ndelete({&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}, &#39;b&#39;)\nWould return: {&#39;a&#39;=&gt;1,&#39;c&#39;=&gt;3}\n\ndelete(&#39;abracadabra&#39;, &#39;bra&#39;)\nWould return: &#39;acada&#39;\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete_at</h2>\n\n<p>Deletes a determined indexed value from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 1)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>dirname</h2>\n\n<p>Returns the <code>dirname</code> of a path.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>dirname(&#39;/path/to/a/file.ext&#39;)\n</code></pre>\n\n<p>Would return: &#39;/path/to/a&#39;</p>\n\n<h2>downcase</h2>\n\n<p>Converts the case of a string or all strings in an array to lower case.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>empty</h2>\n\n<p>Returns true if the variable is empty.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>ensure_packages</h2>\n\n<p>Takes a list of packages and only installs them if they don&#39;t already exist.</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>ensure_resource</h2>\n\n<p>Takes a resource type, title, and a list of attributes that describe a\nresource.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>This example only creates the resource if it does not already exist:</p>\n\n<pre><code>ensure_resource(&#39;user, &#39;dan&#39;, {&#39;ensure&#39; =&gt; &#39;present&#39; })\n</code></pre>\n\n<p>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.</p>\n\n<p>An array of resources can also be passed in and each will be created with\nthe type and parameters specified if it doesn&#39;t already exist.</p>\n\n<pre><code>ensure_resource(&#39;user&#39;, [&#39;dan&#39;,&#39;alex&#39;], {&#39;ensure&#39; =&gt; &#39;present&#39;})\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>flatten</h2>\n\n<p>This function flattens any deeply nested arrays and returns a single flat array\nas a result.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>flatten([&#39;a&#39;, [&#39;b&#39;, [&#39;c&#39;]]])\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;b&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>floor</h2>\n\n<p>Returns the largest integer less or equal to the argument.\nTakes a single numeric value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>fqdn_rotate</h2>\n\n<p>Rotates an array a random number of times based on a nodes fqdn.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>get_module_path</h2>\n\n<p>Returns the absolute path of the specified module for the current\nenvironment.</p>\n\n<p>Example:\n $module_path = get_module_path(&#39;stdlib&#39;)</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getparam</h2>\n\n<p>Takes a resource reference and name of the parameter and\nreturns value of resource&#39;s parameter.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>define example_resource($param) {\n}\n\nexample_resource { &quot;example_resource_instance&quot;:\n param =&gt; &quot;param_value&quot;\n}\n\ngetparam(Example_resource[&quot;example_resource_instance&quot;], &quot;param&quot;)\n</code></pre>\n\n<p>Would return: param_value</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getvar</h2>\n\n<p>Lookup a variable in a remote namespace.</p>\n\n<p>For example:</p>\n\n<pre><code>$foo = getvar(&#39;site::data::foo&#39;)\n# Equivalent to $foo = $site::data::foo\n</code></pre>\n\n<p>This is useful if the namespace itself is stored in a string:</p>\n\n<pre><code>$datalocation = &#39;site::data&#39;\n$bar = getvar(&quot;${datalocation}::bar&quot;)\n# Equivalent to $bar = $site::data::bar\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>grep</h2>\n\n<p>This function searches through an array and returns any elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>grep([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;aaa&#39;,&#39;aaaddd&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_interface_with</h2>\n\n<p>Returns boolean based on kind and value:</p>\n\n<ul>\n<li>macaddress</li>\n<li>netmask</li>\n<li>ipaddress</li>\n<li>network</li>\n</ul>\n\n<p>has_interface_with(&quot;macaddress&quot;, &quot;x:x:x:x:x:x&quot;)\nhas_interface_with(&quot;ipaddress&quot;, &quot;127.0.0.1&quot;) =&gt; true\netc.</p>\n\n<p>If no &quot;kind&quot; is given, then the presence of the interface is checked:\nhas_interface_with(&quot;lo&quot;) =&gt; true</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_ip_address</h2>\n\n<p>Returns true if the client has the requested IP address on some interface.</p>\n\n<p>This function iterates through the &#39;interfaces&#39; fact and checks the\n&#39;ipaddress_IFACE&#39; facts, performing a simple string comparison.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_ip_network</h2>\n\n<p>Returns true if the client has an IP address within the requested network.</p>\n\n<p>This function iterates through the &#39;interfaces&#39; fact and checks the\n&#39;network_IFACE&#39; facts, performing a simple string comparision.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_key</h2>\n\n<p>Determine if a hash has a certain key value.</p>\n\n<p>Example:</p>\n\n<pre><code>$my_hash = {&#39;key_one&#39; =&gt; &#39;value_one&#39;}\nif has_key($my_hash, &#39;key_two&#39;) {\n notice(&#39;we will not reach here&#39;)\n}\nif has_key($my_hash, &#39;key_one&#39;) {\n notice(&#39;this will be printed&#39;)\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>hash</h2>\n\n<p>This function converts an array into a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>hash([&#39;a&#39;,1,&#39;b&#39;,2,&#39;c&#39;,3])\n</code></pre>\n\n<p>Would return: {&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_array</h2>\n\n<p>Returns true if the variable passed to this function is an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_domain_name</h2>\n\n<p>Returns true if the string passed to this function is a syntactically correct domain name.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_float</h2>\n\n<p>Returns true if the variable passed to this function is a float.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_function_available</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_hash</h2>\n\n<p>Returns true if the variable passed to this function is a hash.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_integer</h2>\n\n<p>Returns true if the variable returned to this string is an integer.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_ip_address</h2>\n\n<p>Returns true if the string passed to this function is a valid IP address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_mac_address</h2>\n\n<p>Returns true if the string passed to this function is a valid mac address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_numeric</h2>\n\n<p>Returns true if the variable passed to this function is a number.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_string</h2>\n\n<p>Returns true if the variable passed to this function is a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join</h2>\n\n<p>This function joins an array into a string using a seperator.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &quot;,&quot;)\n</code></pre>\n\n<p>Would result in: &quot;a,b,c&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join_keys_to_values</h2>\n\n<p>This function joins each key of a hash to that key&#39;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.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join_keys_to_values({&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2}, &quot; is &quot;)\n</code></pre>\n\n<p>Would result in: [&quot;a is 1&quot;,&quot;b is 2&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>keys</h2>\n\n<p>Returns the keys of a hash as an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>loadyaml</h2>\n\n<p>Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.</p>\n\n<p>For example:</p>\n\n<pre><code>$myhash = loadyaml(&#39;/etc/puppet/data/myhash.yaml&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>lstrip</h2>\n\n<p>Strips leading spaces to the left of a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>max</h2>\n\n<p>Returns the highest value of all arguments.\nRequires at least one argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>member</h2>\n\n<p>This function determines if a variable is a member of an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: true</p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;c&#39;)\n</code></pre>\n\n<p>Would return: false</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>merge</h2>\n\n<p>Merges two or more hashes together and returns the resulting hash.</p>\n\n<p>For example:</p>\n\n<pre><code>$hash1 = {&#39;one&#39; =&gt; 1, &#39;two&#39;, =&gt; 2}\n$hash2 = {&#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39;, =&gt; &#39;tres&#39;}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash = {&#39;one&#39; =&gt; 1, &#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39; =&gt; &#39;tres&#39;}\n</code></pre>\n\n<p>When there is a duplicate key, the key in the rightmost hash will &quot;win.&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>min</h2>\n\n<p>Returns the lowest value of all arguments.\nRequires at least one argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>num2bool</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parsejson</h2>\n\n<p>This function accepts JSON as a string and converts into the correct Puppet\nstructure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parseyaml</h2>\n\n<p>This function accepts YAML as a string and converts it into the correct\nPuppet structure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>pick</h2>\n\n<p>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:</p>\n\n<pre><code>$real_jenkins_version = pick($::jenkins_version, &#39;1.449&#39;)\n</code></pre>\n\n<p>The value of $real_jenkins_version will first look for a top-scope variable\ncalled &#39;jenkins_version&#39; (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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>prefix</h2>\n\n<p>This function applies a prefix to all elements in an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>prefix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;pa&#39;,&#39;pb&#39;,&#39;pc&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>range</h2>\n\n<p>When given range in the form of (start, stop) it will extrapolate a range as\nan array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>range(&quot;0&quot;, &quot;9&quot;)\n</code></pre>\n\n<p>Will return: [0,1,2,3,4,5,6,7,8,9]</p>\n\n<pre><code>range(&quot;00&quot;, &quot;09&quot;)\n</code></pre>\n\n<p>Will return: <a href=\"Zero%20padded%20strings%20are%20converted%20to%0Aintegers%20automatically\">0,1,2,3,4,5,6,7,8,9</a></p>\n\n<pre><code>range(&quot;a&quot;, &quot;c&quot;)\n</code></pre>\n\n<p>Will return: [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]</p>\n\n<pre><code>range(&quot;host01&quot;, &quot;host10&quot;)\n</code></pre>\n\n<p>Will return: [&quot;host01&quot;, &quot;host02&quot;, ..., &quot;host09&quot;, &quot;host10&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reject</h2>\n\n<p>This function searches through an array and rejects all elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>reject([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;bbb&#39;,&#39;ccc&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reverse</h2>\n\n<p>Reverses the order of a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>rstrip</h2>\n\n<p>Strips leading spaces to the right of the string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>shuffle</h2>\n\n<p>Randomizes the order of a string or array elements.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>size</h2>\n\n<p>Returns the number of elements in a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>sort</h2>\n\n<p>Sorts strings and arrays lexically.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>squeeze</h2>\n\n<p>Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2bool</h2>\n\n<p>This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to &#39;true&#39; and strings that contain things\nlike: 0, f, n, false, no to &#39;false&#39;.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2saltedsha512</h2>\n\n<p>This converts a string to a salted-SHA512 password hash (which is used for\nOS X versions &gt;= 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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strftime</h2>\n\n<p>This function returns formatted time.</p>\n\n<p><em>Examples:</em></p>\n\n<p>To return the time since epoch:</p>\n\n<pre><code>strftime(&quot;%s&quot;)\n</code></pre>\n\n<p>To return the date:</p>\n\n<pre><code>strftime(&quot;%Y-%m-%d&quot;)\n</code></pre>\n\n<p><em>Format meaning:</em></p>\n\n<pre><code>%a - The abbreviated weekday name (``Sun&#39;&#39;)\n%A - The full weekday name (``Sunday&#39;&#39;)\n%b - The abbreviated month name (``Jan&#39;&#39;)\n%B - The full month name (``January&#39;&#39;)\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</code></pre>\n\n<p>)\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 (<code>AM&#39;&#39; or</code>PM&#39;&#39;)\n %P - Meridian indicator (<code>am&#39;&#39; or</code>pm&#39;&#39;)\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 ``%&#39;&#39; character</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strip</h2>\n\n<p>This function removes leading and trailing whitespace from a string or from\nevery string inside an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>strip(&quot; aaa &quot;)\n</code></pre>\n\n<p>Would result in: &quot;aaa&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>suffix</h2>\n\n<p>This function applies a suffix to all elements in an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>suffix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;ap&#39;,&#39;bp&#39;,&#39;cp&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>swapcase</h2>\n\n<p>This function will swap the existing case of a string.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>swapcase(&quot;aBcD&quot;)\n</code></pre>\n\n<p>Would result in: &quot;AbCd&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>time</h2>\n\n<p>This function will return the current time since epoch as an integer.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>time()\n</code></pre>\n\n<p>Will return something like: 1311972653</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>to_bytes</h2>\n\n<p>Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>type</h2>\n\n<p>Returns the type when passed a variable. Type can be one of:</p>\n\n<ul>\n<li>string</li>\n<li>array</li>\n<li>hash</li>\n<li>float</li>\n<li>integer</li>\n<li><p>boolean</p></li>\n<li><p><em>Type</em>: rvalue</p></li>\n</ul>\n\n<h2>unique</h2>\n\n<p>This function will remove duplicates from strings and arrays.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>unique(&quot;aabbcc&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>abc\n</code></pre>\n\n<p>You can also use this with arrays:</p>\n\n<pre><code>unique([&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;c&quot;])\n</code></pre>\n\n<p>This returns:</p>\n\n<pre><code>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>upcase</h2>\n\n<p>Converts a string or an array of strings to uppercase.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>upcase(&quot;abcd&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>ASDF\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>uriescape</h2>\n\n<p>Urlencodes a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>validate_absolute_path</h2>\n\n<p>Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_path = &quot;C:/Program Files (x86)/Puppet Labs/Puppet&quot;\nvalidate_absolute_path($my_path)\n$my_path2 = &quot;/var/lib/puppet&quot;\nvalidate_absolute_path($my_path2)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_absolute_path(true)\nvalidate_absolute_path([ &#39;var/lib/puppet&#39;, &#39;/var/foo&#39; ])\nvalidate_absolute_path([ &#39;/var/lib/puppet&#39;, &#39;var/foo&#39; ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_array</h2>\n\n<p>Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_array = [ &#39;one&#39;, &#39;two&#39; ]\nvalidate_array($my_array)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_array(true)\nvalidate_array(&#39;some_string&#39;)\n$undefined = undef\nvalidate_array($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_augeas</h2>\n\n<p>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.</p>\n\n<p>A third argument can be specified, listing paths which should\nnot be found in the file. The <code>$file</code> variable points to the location\nof the temporary file being tested in the Augeas tree.</p>\n\n<p>For example, if you want to make sure your passwd content never contains\na user <code>foo</code>, you could write:</p>\n\n<pre><code>validate_augeas($passwdcontent, &#39;Passwd.lns&#39;, [&#39;$file/foo&#39;])\n</code></pre>\n\n<p>Or if you wanted to ensure that no users used the &#39;/bin/barsh&#39; shell,\nyou could use:</p>\n\n<pre><code>validate_augeas($passwdcontent, &#39;Passwd.lns&#39;, [&#39;$file/*[shell=&quot;/bin/barsh&quot;]&#39;]\n</code></pre>\n\n<p>If a fourth argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_augeas($sudoerscontent, &#39;Sudoers.lns&#39;, [], &#39;Failed to validate sudoers content with Augeas&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_bool</h2>\n\n<p>Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>$some_array = [ true ]\nvalidate_bool(&quot;false&quot;)\nvalidate_bool(&quot;true&quot;)\nvalidate_bool($some_array)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_cmd</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>A helpful error message can be returned like this:</p>\n\n<p>Example:</p>\n\n<pre><code>validate_cmd($sudoerscontent, &#39;/usr/sbin/visudo -c -f&#39;, &#39;Visudo failed to validate sudoers content&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_hash</h2>\n\n<p>Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_hash = { &#39;one&#39; =&gt; &#39;two&#39; }\nvalidate_hash($my_hash)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_hash(true)\nvalidate_hash(&#39;some_string&#39;)\n$undefined = undef\nvalidate_hash($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_re</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>The following strings will validate against the regular expressions:</p>\n\n<pre><code>validate_re(&#39;one&#39;, &#39;^one$&#39;)\nvalidate_re(&#39;one&#39;, [ &#39;^one&#39;, &#39;^two&#39; ])\n</code></pre>\n\n<p>The following strings will fail to validate, causing compilation to abort:</p>\n\n<pre><code>validate_re(&#39;one&#39;, [ &#39;^two&#39;, &#39;^three&#39; ])\n</code></pre>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_re($::puppetversion, &#39;^2.7&#39;, &#39;The $puppetversion fact value does not match 2.7&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_slength</h2>\n\n<p>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.</p>\n\n<p>The following values will pass:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,17)\n validate_slength([&quot;discombobulate&quot;,&quot;moo&quot;],17)</p>\n\n<p>The following valueis will not:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,1)\n validate_slength([&quot;discombobulate&quot;,&quot;thermometer&quot;],5)</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_string</h2>\n\n<p>Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_string = &quot;one two&quot;\nvalidate_string($my_string, &#39;three&#39;)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_string(true)\nvalidate_string([ &#39;some&#39;, &#39;array&#39; ])\n$undefined = undef\nvalidate_string($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>values</h2>\n\n<p>When given a hash this function will return the values of that hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>$hash = {\n &#39;a&#39; =&gt; 1,\n &#39;b&#39; =&gt; 2,\n &#39;c&#39; =&gt; 3,\n}\nvalues($hash)\n</code></pre>\n\n<p>This example would return:</p>\n\n<pre><code>[1,2,3]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>values_at</h2>\n\n<p>Finds value inside an array based on location.</p>\n\n<p>The first argument is the array you want to analyze, and the second element can\nbe a combination of:</p>\n\n<ul>\n<li>A single numeric index</li>\n<li>A range in the form of &#39;start-stop&#39; (eg. 4-9)</li>\n<li>An array combining the above</li>\n</ul>\n\n<p><em>Examples</em>:</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 2)\n</code></pre>\n\n<p>Would return [&#39;c&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], [&quot;0-1&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;b&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;d&#39;,&#39;e&#39;], [0, &quot;2-3&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;c&#39;,&#39;d&#39;].</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>zip</h2>\n\n<p>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.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>zip([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<pre><code>[&quot;1&quot;, &quot;4&quot;], [&quot;2&quot;, &quot;5&quot;], [&quot;3&quot;, &quot;6&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<p><em>This page autogenerated on 2013-04-11 13:54:25 -0700</em></p>\n</section>",
306
+ "changelog": "<section class=\"plaintext\"><pre>2013-05-06 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;acline@us.ibm.com&gt; - 4.1.0\n * Terser method of string to array conversion courtesy of ethooz. (d38bce0)\n\n2013-05-06 - Alex Cline &lt;acline@us.ibm.com&gt; 4.1.0\n * Refactor ensure_resource expectations (b33cc24)\n\n2013-05-06 - Alex Cline &lt;acline@us.ibm.com&gt; 4.1.0\n * Changed str-to-array conversion and removed abbreviation. (de253db)\n\n2013-05-03 - Alex Cline &lt;acline@us.ibm.com&gt; 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 &lt;raphael.pinson@camptocamp.com&gt; - 4.1.0\n * Add a dirname function (2ba9e47)\n\n2013-04-29 - Mark Smith-Guerrero &lt;msmithgu@gmail.com&gt; - 4.1.0\n * (maint) Fix a small typo in hash() description (928036a)\n\n2013-04-12 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.2\n * Update user information in gemspec to make the intent of the Gem clear.\n\n2013-04-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.1\n * Fix README function documentation (ab3e30c)\n\n2013-04-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Add ability to use puppet from git via bundler (9c5805f)\n\n2013-04-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * (maint) Make stdlib usable as a Ruby GEM (e81a45e)\n\n2013-04-10 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * Add a count function (f28550e)\n\n2013-03-31 - Amos Shapira &lt;ashapira@atlassian.com&gt; - 4.0.0\n * (#19998) Implement any2array (7a2fb80)\n\n2013-03-29 - Steve Huff &lt;shuff@vecna.org&gt; - 4.0.0\n * (19864) num2bool match fix (8d217f0)\n\n2013-03-20 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * Allow comparisons of Numeric and number as String (ff5dd5d)\n\n2013-03-26 - Richard Soderberg &lt;rsoderberg@mozilla.com&gt; - 4.0.0\n * add suffix function to accompany the prefix function (88a93ac)\n\n2013-03-19 - Kristof Willaert &lt;kristof.willaert@gmail.com&gt; - 4.0.0\n * Add floor function implementation and unit tests (0527341)\n\n2012-04-03 - Eric Shamow &lt;eric@puppetlabs.com&gt; - 4.0.0\n * (#13610) Add is_function_available to stdlib (961dcab)\n\n2012-12-17 - Justin Lambert &lt;jlambert@eml.cc&gt; - 4.0.0\n * str2bool should return a boolean if called with a boolean (5d5a4d4)\n\n2012-10-23 - Uwe Stuehler &lt;ustuehler@team.mobile.de&gt; - 4.0.0\n * Fix number of arguments check in flatten() (e80207b)\n\n2013-03-11 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Add contributing document (96e19d0)\n\n2013-03-04 - Raphaël Pinson &lt;raphael.pinson@camptocamp.com&gt; - 4.0.0\n * Add missing documentation for validate_augeas and validate_cmd to README.markdown (a1510a1)\n\n2013-02-14 - Joshua Hoblitt &lt;jhoblitt@cpan.org&gt; - 4.0.0\n * (#19272) Add has_element() function (95cf3fe)\n\n2013-02-07 - Raphaël Pinson &lt;raphael.pinson@camptocamp.com&gt; - 4.0.0\n * validate_cmd(): Use Puppet::Util::Execution.execute when available (69248df)\n\n2012-12-06 - Raphaël Pinson &lt;raphink@gmail.com&gt; - 4.0.0\n * Add validate_augeas function (3a97c23)\n\n2012-12-06 - Raphaël Pinson &lt;raphink@gmail.com&gt; - 4.0.0\n * Add validate_cmd function (6902cc5)\n\n2013-01-14 - David Schmitt &lt;david@dasz.at&gt; - 4.0.0\n * Add geppetto project definition (b3fc0a3)\n\n2013-01-02 - Jaka Hudoklin &lt;jakahudoklin@gmail.com&gt; - 4.0.0\n * Add getparam function to get defined resource parameters (20e0e07)\n\n2013-01-05 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * (maint) Add Travis CI Support (d082046)\n\n2012-12-04 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 4.0.0\n * Clarify that stdlib 3 supports Puppet 3 (3a6085f)\n\n2012-11-30 - Erik Dalén &lt;dalen@spotify.com&gt; - 4.0.0\n * maint: style guideline fixes (7742e5f)\n\n2012-11-09 - James Fryman &lt;james@frymanet.com&gt; - 4.0.0\n * puppet-lint cleanup (88acc52)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 4.0.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d)\n\n2012-09-18 - Chad Metcalf &lt;chad@wibidata.com&gt; - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén &lt;dalen@spotify.com&gt; - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * (#14670) autorequire a file_line resource&#x27;s path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza &lt;gary@puppetlabs.com&gt; - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley &lt;wcooley@pdx.edu&gt; - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;dan@puppetlabs.com&gt; - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price &lt;chris@puppetlabs.com&gt; - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price &lt;chris@puppetlabs.com&gt; - 2.4.0\n * Add support for a &#x27;match&#x27; parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén &lt;dalen@spotify.com&gt; - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen &lt;steve.traylen@cern.ch&gt; - 2.4.0\n * (#13205) Rotate array&#x2F;string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs &lt;support@puppetlabs.com&gt; - 2.3.2\n * Make file_line default to ensure =&gt; 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* &#x2F;etc&#x2F;facter&#x2F;facts.d\n* &#x2F;etc&#x2F;puppetlabs&#x2F;facter&#x2F;facts.d\n\n2011-08-17 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.0\n* Add R.I. Pienaar&#x27;s facts.d custom facter fact\n* facts defined in &#x2F;etc&#x2F;facts.d and &#x2F;etc&#x2F;puppetlabs&#x2F;facts.d are\n automatically loaded now.\n\n2011-08-04 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add stdlib::stages class with a standard set of stages\n</pre></section>",
307
307
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
308
308
  "created_at": "2013-05-13 08:31:19 -0700",
309
309
  "updated_at": "2013-05-13 08:31:19 -0700",
@@ -428,7 +428,7 @@
428
428
  "file_size": 11866,
429
429
  "file_md5": "b46fed82226a08b37428769f4fa6e534",
430
430
  "downloads": 66264,
431
- "readme": "<section class=\"markdown\"><h1>What is it?</h1>\n\n<p>A Puppet module that can construct files from fragments.</p>\n\n<p>Please see the comments in the various .pp files for details\nas well as posts on my blog at <a href=\"http://www.devco.net/\">http://www.devco.net/</a></p>\n\n<p>Released under the Apache 2.0 licence</p>\n\n<h2>Usage:</h2>\n\n<p>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:</p>\n\n<pre>\nPuppet modules on this server:\n\n -- Apache\n -- MySQL\n</pre>\n\n<p>Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.</p>\n\n<pre>\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</pre>\n\n<p>Detailed documentation of the class options can be found in the\nmanifest files.</p>\n\n<h2>Known Issues:</h2>\n\n<ul>\n<li>Since puppet-concat now relies on a fact for the concat directory,\nyou will need to set up pluginsync = true on the [master] section of your\nnode&#39;s &#39;/etc/puppet/puppet.conf&#39; 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&quot;err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not &#39;undef&#39; at [...]/concat/manifests/setup.pp:44&quot;.</li>\n</ul>\n\n<h2>Contributors:</h2>\n\n<p><strong>Paul Elliot</strong></p>\n\n<ul>\n<li>Provided 0.24.8 support, shell warnings and empty file creation support.</li>\n</ul>\n\n<p><strong>Chad Netzer</strong></p>\n\n<ul>\n<li>Various patches to improve safety of file operations</li>\n<li>Symlink support</li>\n</ul>\n\n<p><strong>David Schmitt</strong></p>\n\n<ul>\n<li>Patch to remove hard coded paths relying on OS path</li>\n<li>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</li>\n</ul>\n\n<p><strong>Peter Meier</strong></p>\n\n<ul>\n<li>Basedir as a fact</li>\n<li>Unprivileged user support</li>\n</ul>\n\n<p><strong>Sharif Nassar</strong></p>\n\n<ul>\n<li>Solaris/Nexenta support</li>\n<li>Better error reporting</li>\n</ul>\n\n<p><strong>Christian G. Warden</strong></p>\n\n<ul>\n<li>Style improvements</li>\n</ul>\n\n<p><strong>Reid Vandewiele</strong></p>\n\n<ul>\n<li>Support non GNU systems by default</li>\n</ul>\n\n<p><strong>Erik Dalén</strong></p>\n\n<ul>\n<li>Style improvements</li>\n</ul>\n\n<p><strong>Gildas Le Nadan</strong></p>\n\n<ul>\n<li>Documentation improvements</li>\n</ul>\n\n<p><strong>Paul Belanger</strong></p>\n\n<ul>\n<li>Testing improvements and Travis support</li>\n</ul>\n\n<p><strong>Branan Purvine-Riley</strong></p>\n\n<ul>\n<li>Support Puppet Module Tool better</li>\n</ul>\n\n<p><strong>Dustin J. Mitchell</strong></p>\n\n<ul>\n<li>Always include setup when using the concat define</li>\n</ul>\n\n<p><strong>Andreas Jaggi</strong></p>\n\n<ul>\n<li>Puppet Lint support</li>\n</ul>\n\n<p><strong>Jan Vansteenkiste</strong></p>\n\n<ul>\n<li>Configurable paths</li>\n</ul>\n\n<h2>Contact:</h2>\n\n<p>puppet-users@ mailing list.</p>\n</section>",
431
+ "readme": "<section class=\"markdown\"><h1>What is it?</h1>\n\n<p>A Puppet module that can construct files from fragments.</p>\n\n<p>Please see the comments in the various .pp files for details\nas well as posts on my blog at <a href=\"http://www.devco.net/\">http://www.devco.net/</a></p>\n\n<p>Released under the Apache 2.0 licence</p>\n\n<h2>Usage:</h2>\n\n<p>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:</p>\n\n<pre>\nPuppet modules on this server:\n\n -- Apache\n -- MySQL\n</pre>\n\n<p>Local sysadmins can also append to the file by just editing /etc/motd.local\ntheir changes will be incorporated into the puppet managed motd.</p>\n\n<pre>\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</pre>\n\n<p>Detailed documentation of the class options can be found in the\nmanifest files.</p>\n\n<h2>Known Issues:</h2>\n\n<ul>\n<li>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&#39;s &#39;/etc/puppet/puppet.conf&#39; 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&quot;err: Failed to apply catalog: Parameter path failed: File\npaths must be fully qualified, not &#39;undef&#39; at [...]/concat/manifests/setup.pp:44&quot;.</li>\n</ul>\n\n<h2>Contributors:</h2>\n\n<p><strong>Paul Elliot</strong></p>\n\n<ul>\n<li>Provided 0.24.8 support, shell warnings and empty file creation support.</li>\n</ul>\n\n<p><strong>Chad Netzer</strong></p>\n\n<ul>\n<li>Various patches to improve safety of file operations</li>\n<li>Symlink support</li>\n</ul>\n\n<p><strong>David Schmitt</strong></p>\n\n<ul>\n<li>Patch to remove hard coded paths relying on OS path</li>\n<li>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</li>\n</ul>\n\n<p><strong>Peter Meier</strong></p>\n\n<ul>\n<li>Basedir as a fact</li>\n<li>Unprivileged user support</li>\n</ul>\n\n<p><strong>Sharif Nassar</strong></p>\n\n<ul>\n<li>Solaris/Nexenta support</li>\n<li>Better error reporting</li>\n</ul>\n\n<p><strong>Christian G. Warden</strong></p>\n\n<ul>\n<li>Style improvements</li>\n</ul>\n\n<p><strong>Reid Vandewiele</strong></p>\n\n<ul>\n<li>Support non GNU systems by default</li>\n</ul>\n\n<p><strong>Erik Dalén</strong></p>\n\n<ul>\n<li>Style improvements</li>\n</ul>\n\n<p><strong>Gildas Le Nadan</strong></p>\n\n<ul>\n<li>Documentation improvements</li>\n</ul>\n\n<p><strong>Paul Belanger</strong></p>\n\n<ul>\n<li>Testing improvements and Travis support</li>\n</ul>\n\n<p><strong>Branan Purvine-Riley</strong></p>\n\n<ul>\n<li>Support Puppet Module Tool better</li>\n</ul>\n\n<p><strong>Dustin J. Mitchell</strong></p>\n\n<ul>\n<li>Always include setup when using the concat define</li>\n</ul>\n\n<p><strong>Andreas Jaggi</strong></p>\n\n<ul>\n<li>Puppet Lint support</li>\n</ul>\n\n<p><strong>Jan Vansteenkiste</strong></p>\n\n<ul>\n<li>Configurable paths</li>\n</ul>\n\n<h2>Contact:</h2>\n\n<p>puppet-users@ mailing list.</p>\n</section>",
432
432
  "changelog": "<section class=\"plaintext\"><pre>2013-08-09 1.0.0\n\nSummary:\n\nMany new features and bugfixes in this release, and if you&#x27;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 &#x27;pluginsync = true&#x27;\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&#x2F;start with &#x27;#&#x27;.\n- Replace while-read pattern with for-do in order to support Solaris.\n\nCHANGELOG:\n- 2010&#x2F;02&#x2F;19 - initial release\n- 2010&#x2F;03&#x2F;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&#x2F;04&#x2F;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&#x27;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&#x2F;group of the\n resulting file at any time.\n - You can specify ensure =&gt; &quot;&#x2F;some&#x2F;other&#x2F;file&quot; in concat::fragment\n to include the contents of a symlink into the final file.\n- 2010&#x2F;04&#x2F;16 - Add more cleaning of the fragment name - removing &#x2F; from the $name\n- 2010&#x2F;05&#x2F;22 - Improve documentation and show the use of ensure =&gt;\n- 2010&#x2F;07&#x2F;14 - Add support for setting the filebucket behavior of files\n- 2010&#x2F;10&#x2F;04 - Make the warning message configurable\n- 2010&#x2F;12&#x2F;03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett\n- 2011&#x2F;02&#x2F;03 - Make the shell script more portable and add a config option for root group\n- 2011&#x2F;06&#x2F;21 - Make base dir root readable only for security\n- 2011&#x2F;06&#x2F;23 - Set base directory using a fact instead of hardcoding it\n- 2011&#x2F;06&#x2F;23 - Support operating as non privileged user\n- 2011&#x2F;06&#x2F;23 - Support dash instead of bash or sh\n- 2011&#x2F;07&#x2F;11 - Better solaris support\n- 2011&#x2F;12&#x2F;05 - Use fully qualified variables\n- 2011&#x2F;12&#x2F;13 - Improve Nexenta support\n- 2012&#x2F;04&#x2F;11 - Do not use any GNU specific extensions in the shell script\n- 2012&#x2F;03&#x2F;24 - Comply to community style guides\n- 2012&#x2F;05&#x2F;23 - Better errors when basedir isnt set\n- 2012&#x2F;05&#x2F;31 - Add spec tests\n- 2012&#x2F;07&#x2F;11 - Include concat::setup in concat improving UX\n- 2012&#x2F;08&#x2F;14 - Puppet Lint improvements\n- 2012&#x2F;08&#x2F;30 - The target path can be different from the $name\n- 2012&#x2F;08&#x2F;30 - More Puppet Lint cleanup\n- 2012&#x2F;09&#x2F;04 - RELEASE 0.2.0\n- 2012&#x2F;12&#x2F;12 - Added (file) $replace parameter to concat\n</pre></section>",
433
433
  "license": "<section class=\"plaintext\"><pre> Copyright 2012 R.I.Pienaar\n\n Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\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:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;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 &quot;AS IS&quot; 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</pre></section>",
434
434
  "created_at": "2013-08-14 15:59:00 -0700",
@@ -549,7 +549,7 @@
549
549
  "file_size": 27238,
550
550
  "file_md5": "c483d6e375387d5e1fe780ee51ee512c",
551
551
  "downloads": 61047,
552
- "readme": "<section class=\"markdown\"><h1>apt</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apt\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h2>Description</h2>\n\n<h1>Provides helpful definitions for dealing with Apt.</h1>\n\n<h2>Overview</h2>\n\n<p>The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. </p>\n\n<h2>Module Description</h2>\n\n<p>APT automates obtaining and installing software packages on *nix systems. </p>\n\n<h2>Setup</h2>\n\n<p><strong>What APT affects:</strong></p>\n\n<ul>\n<li>package/service/configuration files for APT </li>\n<li>your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory\n\n<ul>\n<li>NOTE: Setting the <code>purge_sources_list</code> and <code>purge_sources_list_d</code> parameters to &#39;true&#39; will destroy any existing content that was not declared with Puppet. The default for these parameters is &#39;false&#39;.</li>\n</ul></li>\n<li>system repositories</li>\n<li>authentication keys</li>\n<li>wget (optional)</li>\n</ul>\n\n<h3>Beginning with APT</h3>\n\n<p>To begin using the APT module with default parameters, declare the class</p>\n\n<pre><code>class { &#39;apt&#39;: }\n</code></pre>\n\n<p>Puppet code that uses anything from the APT module requires that the core apt class be declared. </p>\n\n<h2>Usage</h2>\n\n<p>Using the APT module consists predominantly in declaring classes that provide desired functionality and features. </p>\n\n<h3>apt</h3>\n\n<p><code>apt</code> 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.</p>\n\n<p>The parameters for <code>apt</code> are not required in general and are predominantly for development environment use-cases.</p>\n\n<pre><code>class { &#39;apt&#39;:\n always_apt_update =&gt; false,\n disable_keys =&gt; undef,\n proxy_host =&gt; false,\n proxy_port =&gt; &#39;8080&#39;,\n purge_sources_list =&gt; false,\n purge_sources_list_d =&gt; false,\n purge_preferences_d =&gt; false,\n update_timeout =&gt; undef\n}\n</code></pre>\n\n<p>Puppet will manage your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory but will do its best to respect existing content. </p>\n\n<p>If you declare your apt class with <code>purge_sources_list</code> and <code>purge_sources_list_d</code> set to &#39;true&#39;, Puppet will unapologetically purge any existing content it finds that wasn&#39;t declared with Puppet. </p>\n\n<h3>apt::builddep</h3>\n\n<p>Installs the build depends of a specified package.</p>\n\n<pre><code>apt::builddep { &#39;glusterfs-server&#39;: }\n</code></pre>\n\n<h3>apt::force</h3>\n\n<p>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.</p>\n\n<pre><code>apt::force { &#39;glusterfs-server&#39;:\n release =&gt; &#39;unstable&#39;,\n version =&gt; &#39;3.0.3&#39;,\n require =&gt; Apt::Source[&#39;debian_unstable&#39;],\n}\n</code></pre>\n\n<h3>apt::key</h3>\n\n<p>Adds a key to the list of keys used by APT to authenticate packages.</p>\n\n<pre><code>apt::key { &#39;puppetlabs&#39;:\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n\napt::key { &#39;jenkins&#39;:\n key =&gt; &#39;D50582E6&#39;,\n key_source =&gt; &#39;http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key&#39;,\n}\n</code></pre>\n\n<p>Note that use of <code>key_source</code> requires wget to be installed and working.</p>\n\n<h3>apt::pin</h3>\n\n<p>Adds an apt pin for a certain release.</p>\n\n<pre><code>apt::pin { &#39;karmic&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-updates&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-security&#39;: priority =&gt; 700 }\n</code></pre>\n\n<p>Note you can also specifying more complex pins using distribution properties.</p>\n\n<pre><code>apt::pin { &#39;stable&#39;:\n priority =&gt; -10,\n originator =&gt; &#39;Debian&#39;,\n release_version =&gt; &#39;3.0&#39;,\n component =&gt; &#39;main&#39;,\n label =&gt; &#39;Debian&#39;\n}\n</code></pre>\n\n<h3>apt::ppa</h3>\n\n<p>Adds a ppa repository using <code>add-apt-repository</code>.</p>\n\n<pre><code>apt::ppa { &#39;ppa:drizzle-developers/ppa&#39;: }\n</code></pre>\n\n<h3>apt::release</h3>\n\n<p>Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.</p>\n\n<pre><code>class { &#39;apt::release&#39;:\n release_id =&gt; &#39;precise&#39;,\n}\n</code></pre>\n\n<h3>apt::source</h3>\n\n<p>Adds an apt source to <code>/etc/apt/sources.list.d/</code>.</p>\n\n<pre><code>apt::source { &#39;debian_unstable&#39;:\n location =&gt; &#39;http://debian.mirror.iweb.ca/debian/&#39;,\n release =&gt; &#39;unstable&#39;,\n repos =&gt; &#39;main contrib non-free&#39;,\n required_packages =&gt; &#39;debian-keyring debian-archive-keyring&#39;,\n key =&gt; &#39;55BE302B&#39;,\n key_server =&gt; &#39;subkeys.pgp.net&#39;,\n pin =&gt; &#39;-10&#39;,\n include_src =&gt; true\n}\n</code></pre>\n\n<p>If you would like to configure your system so the source is the Puppet Labs APT repository</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<h3>Testing</h3>\n\n<p>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.</p>\n\n<h4>Example Test</h4>\n\n<p>This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module&#39;s test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<p>This resource creates an apt source named puppetlabs and gives Puppet information about the repository&#39;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.</p>\n\n<p>Check your smoke test for syntax errors</p>\n\n<pre><code>$ puppet parser validate tests/puppetlabs-apt.pp\n</code></pre>\n\n<p>If you receive no output from that command, it means nothing is wrong. Then apply the code</p>\n\n<pre><code>$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as &#39;{md5}3be1da4923fb910f1102a233b77e982e&#39;\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 &#39;refresh&#39; from 1 events&gt;\n</code></pre>\n\n<p>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. </p>\n\n<h2>Implementation</h2>\n\n<h3>apt::backports</h3>\n\n<p>Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to <code>$lsbdistcodename</code>. Setting this manually can cause undefined behavior (read: universe exploding).</p>\n\n<h2>Limitations</h2>\n\n<p>This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. </p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h2>Contributors</h2>\n\n<p>A lot of great people have contributed to this module. A somewhat current list follows:</p>\n\n<ul>\n<li>Ben Godfrey <a href=\"mailto:ben.godfrey@wonga.com\">ben.godfrey@wonga.com</a></li>\n<li>Branan Purvine-Riley <a href=\"mailto:branan@puppetlabs.com\">branan@puppetlabs.com</a></li>\n<li>Christian G. Warden <a href=\"mailto:cwarden@xerus.org\">cwarden@xerus.org</a><br></li>\n<li>Dan Bode <a href=\"mailto:bodepd@gmail.com\">bodepd@gmail.com</a> <a href=\"mailto:dan@puppetlabs.com\">dan@puppetlabs.com</a><br></li>\n<li>Garrett Honeycutt <a href=\"mailto:github@garretthoneycutt.com\">github@garretthoneycutt.com</a><br></li>\n<li>Jeff Wallace <a href=\"mailto:jeff@evolvingweb.ca\">jeff@evolvingweb.ca</a> <a href=\"mailto:jeff@tjwallace.ca\">jeff@tjwallace.ca</a><br></li>\n<li>Ken Barber <a href=\"mailto:ken@bob.sh\">ken@bob.sh</a><br></li>\n<li>Matthaus Litteken <a href=\"mailto:matthaus@puppetlabs.com\">matthaus@puppetlabs.com</a> <a href=\"mailto:mlitteken@gmail.com\">mlitteken@gmail.com</a><br></li>\n<li>Matthias Pigulla <a href=\"mailto:mp@webfactory.de\">mp@webfactory.de</a><br></li>\n<li>Monty Taylor <a href=\"mailto:mordred@inaugust.com\">mordred@inaugust.com</a><br></li>\n<li>Peter Drake <a href=\"mailto:pdrake@allplayers.com\">pdrake@allplayers.com</a><br></li>\n<li>Reid Vandewiele <a href=\"mailto:marut@cat.pdx.edu\">marut@cat.pdx.edu</a><br></li>\n<li>Robert Navarro <a href=\"mailto:rnavarro@phiivo.com\">rnavarro@phiivo.com</a><br></li>\n<li>Ryan Coleman <a href=\"mailto:ryan@puppetlabs.com\">ryan@puppetlabs.com</a><br></li>\n<li>Scott McLeod <a href=\"mailto:scott.mcleod@theice.com\">scott.mcleod@theice.com</a><br></li>\n<li>Spencer Krum <a href=\"mailto:spencer@puppetlabs.com\">spencer@puppetlabs.com</a><br></li>\n<li>William Van Hevelingen <a href=\"mailto:blkperl@cat.pdx.edu\">blkperl@cat.pdx.edu</a> <a href=\"mailto:wvan13@gmail.com\">wvan13@gmail.com</a><br></li>\n<li>Zach Leslie <a href=\"mailto:zach@puppetlabs.com\">zach@puppetlabs.com</a><br></li>\n</ul>\n</section>",
552
+ "readme": "<section class=\"markdown\"><h1>apt</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apt\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h2>Description</h2>\n\n<h1>Provides helpful definitions for dealing with Apt.</h1>\n\n<h2>Overview</h2>\n\n<p>The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. </p>\n\n<h2>Module Description</h2>\n\n<p>APT automates obtaining and installing software packages on *nix systems. </p>\n\n<h2>Setup</h2>\n\n<p><strong>What APT affects:</strong></p>\n\n<ul>\n<li>package/service/configuration files for APT </li>\n<li>your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory\n\n<ul>\n<li>NOTE: Setting the <code>purge_sources_list</code> and <code>purge_sources_list_d</code> parameters to &#39;true&#39; will destroy any existing content that was not declared with Puppet. The default for these parameters is &#39;false&#39;.</li>\n</ul></li>\n<li>system repositories</li>\n<li>authentication keys</li>\n<li>wget (optional)</li>\n</ul>\n\n<h3>Beginning with APT</h3>\n\n<p>To begin using the APT module with default parameters, declare the class</p>\n\n<pre><code>class { &#39;apt&#39;: }\n</code></pre>\n\n<p>Puppet code that uses anything from the APT module requires that the core apt class be declared. </p>\n\n<h2>Usage</h2>\n\n<p>Using the APT module consists predominantly in declaring classes that provide desired functionality and features. </p>\n\n<h3>apt</h3>\n\n<p><code>apt</code> 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.</p>\n\n<p>The parameters for <code>apt</code> are not required in general and are predominantly for development environment use-cases.</p>\n\n<pre><code>class { &#39;apt&#39;:\n always_apt_update =&gt; false,\n disable_keys =&gt; undef,\n proxy_host =&gt; false,\n proxy_port =&gt; &#39;8080&#39;,\n purge_sources_list =&gt; false,\n purge_sources_list_d =&gt; false,\n purge_preferences_d =&gt; false,\n update_timeout =&gt; undef\n}\n</code></pre>\n\n<p>Puppet will manage your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory but will do its best to respect existing content. </p>\n\n<p>If you declare your apt class with <code>purge_sources_list</code> and <code>purge_sources_list_d</code> set to &#39;true&#39;, Puppet will unapologetically purge any existing content it finds that wasn&#39;t declared with Puppet. </p>\n\n<h3>apt::builddep</h3>\n\n<p>Installs the build depends of a specified package.</p>\n\n<pre><code>apt::builddep { &#39;glusterfs-server&#39;: }\n</code></pre>\n\n<h3>apt::force</h3>\n\n<p>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.</p>\n\n<pre><code>apt::force { &#39;glusterfs-server&#39;:\n release =&gt; &#39;unstable&#39;,\n version =&gt; &#39;3.0.3&#39;,\n require =&gt; Apt::Source[&#39;debian_unstable&#39;],\n}\n</code></pre>\n\n<h3>apt::key</h3>\n\n<p>Adds a key to the list of keys used by APT to authenticate packages.</p>\n\n<pre><code>apt::key { &#39;puppetlabs&#39;:\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n\napt::key { &#39;jenkins&#39;:\n key =&gt; &#39;D50582E6&#39;,\n key_source =&gt; &#39;http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key&#39;,\n}\n</code></pre>\n\n<p>Note that use of <code>key_source</code> requires wget to be installed and working.</p>\n\n<h3>apt::pin</h3>\n\n<p>Adds an apt pin for a certain release.</p>\n\n<pre><code>apt::pin { &#39;karmic&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-updates&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-security&#39;: priority =&gt; 700 }\n</code></pre>\n\n<p>Note you can also specifying more complex pins using distribution properties.</p>\n\n<pre><code>apt::pin { &#39;stable&#39;:\n priority =&gt; -10,\n originator =&gt; &#39;Debian&#39;,\n release_version =&gt; &#39;3.0&#39;,\n component =&gt; &#39;main&#39;,\n label =&gt; &#39;Debian&#39;\n}\n</code></pre>\n\n<h3>apt::ppa</h3>\n\n<p>Adds a ppa repository using <code>add-apt-repository</code>.</p>\n\n<pre><code>apt::ppa { &#39;ppa:drizzle-developers/ppa&#39;: }\n</code></pre>\n\n<h3>apt::release</h3>\n\n<p>Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.</p>\n\n<pre><code>class { &#39;apt::release&#39;:\n release_id =&gt; &#39;precise&#39;,\n}\n</code></pre>\n\n<h3>apt::source</h3>\n\n<p>Adds an apt source to <code>/etc/apt/sources.list.d/</code>.</p>\n\n<pre><code>apt::source { &#39;debian_unstable&#39;:\n location =&gt; &#39;http://debian.mirror.iweb.ca/debian/&#39;,\n release =&gt; &#39;unstable&#39;,\n repos =&gt; &#39;main contrib non-free&#39;,\n required_packages =&gt; &#39;debian-keyring debian-archive-keyring&#39;,\n key =&gt; &#39;55BE302B&#39;,\n key_server =&gt; &#39;subkeys.pgp.net&#39;,\n pin =&gt; &#39;-10&#39;,\n include_src =&gt; true\n}\n</code></pre>\n\n<p>If you would like to configure your system so the source is the Puppet Labs APT repository</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<h3>Testing</h3>\n\n<p>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.</p>\n\n<h4>Example Test</h4>\n\n<p>This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module&#39;s test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<p>This resource creates an apt source named puppetlabs and gives Puppet information about the repository&#39;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.</p>\n\n<p>Check your smoke test for syntax errors</p>\n\n<pre><code>$ puppet parser validate tests/puppetlabs-apt.pp\n</code></pre>\n\n<p>If you receive no output from that command, it means nothing is wrong. Then apply the code</p>\n\n<pre><code>$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as &#39;{md5}3be1da4923fb910f1102a233b77e982e&#39;\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 &#39;refresh&#39; from 1 events&gt;\n</code></pre>\n\n<p>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. </p>\n\n<h2>Implementation</h2>\n\n<h3>apt::backports</h3>\n\n<p>Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to <code>$lsbdistcodename</code>. Setting this manually can cause undefined behavior (read: universe exploding).</p>\n\n<h2>Limitations</h2>\n\n<p>This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. </p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h2>Contributors</h2>\n\n<p>A lot of great people have contributed to this module. A somewhat current list follows:</p>\n\n<ul>\n<li>Ben Godfrey <a href=\"mailto:ben.godfrey@wonga.com\">ben.godfrey@wonga.com</a></li>\n<li>Branan Purvine-Riley <a href=\"mailto:branan@puppetlabs.com\">branan@puppetlabs.com</a></li>\n<li>Christian G. Warden <a href=\"mailto:cwarden@xerus.org\">cwarden@xerus.org</a><br></li>\n<li>Dan Bode <a href=\"mailto:bodepd@gmail.com\">bodepd@gmail.com</a> <a href=\"mailto:dan@puppetlabs.com\">dan@puppetlabs.com</a><br></li>\n<li>Garrett Honeycutt <a href=\"mailto:github@garretthoneycutt.com\">github@garretthoneycutt.com</a><br></li>\n<li>Jeff Wallace <a href=\"mailto:jeff@evolvingweb.ca\">jeff@evolvingweb.ca</a> <a href=\"mailto:jeff@tjwallace.ca\">jeff@tjwallace.ca</a><br></li>\n<li>Ken Barber <a href=\"mailto:ken@bob.sh\">ken@bob.sh</a><br></li>\n<li>Matthaus Litteken <a href=\"mailto:matthaus@puppetlabs.com\">matthaus@puppetlabs.com</a> <a href=\"mailto:mlitteken@gmail.com\">mlitteken@gmail.com</a><br></li>\n<li>Matthias Pigulla <a href=\"mailto:mp@webfactory.de\">mp@webfactory.de</a><br></li>\n<li>Monty Taylor <a href=\"mailto:mordred@inaugust.com\">mordred@inaugust.com</a><br></li>\n<li>Peter Drake <a href=\"mailto:pdrake@allplayers.com\">pdrake@allplayers.com</a><br></li>\n<li>Reid Vandewiele <a href=\"mailto:marut@cat.pdx.edu\">marut@cat.pdx.edu</a><br></li>\n<li>Robert Navarro <a href=\"mailto:rnavarro@phiivo.com\">rnavarro@phiivo.com</a><br></li>\n<li>Ryan Coleman <a href=\"mailto:ryan@puppetlabs.com\">ryan@puppetlabs.com</a><br></li>\n<li>Scott McLeod <a href=\"mailto:scott.mcleod@theice.com\">scott.mcleod@theice.com</a><br></li>\n<li>Spencer Krum <a href=\"mailto:spencer@puppetlabs.com\">spencer@puppetlabs.com</a><br></li>\n<li>William Van Hevelingen <a href=\"mailto:blkperl@cat.pdx.edu\">blkperl@cat.pdx.edu</a> <a href=\"mailto:wvan13@gmail.com\">wvan13@gmail.com</a><br></li>\n<li>Zach Leslie <a href=\"mailto:zach@puppetlabs.com\">zach@puppetlabs.com</a><br></li>\n</ul>\n</section>",
553
553
  "changelog": "<section class=\"plaintext\"><pre>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&#x27;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 &lt;info@puppetlabs.com&gt; - 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 &lt;info@puppetlabs.com&gt; - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support &#x27;ensure =&gt; absent&#x27; 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 &lt;info@puppetlabs.com&gt; - 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 &amp; 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 &lt;info@puppetlabs.com&gt; - 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 =&gt; 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 &quot;repositories&quot;\n1be7457 Fix (#10451) - apt::ppa fails to &quot;apt-get update&quot; 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</pre></section>",
554
554
  "license": "<section class=\"plaintext\"><pre>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 &quot;Software&quot;), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and&#x2F;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 &quot;AS IS&quot;, 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</pre></section>",
555
555
  "created_at": "2013-10-15 11:06:03 -0700",
@@ -934,8 +934,8 @@
934
934
  "file_size": 51834,
935
935
  "file_md5": "7862ef0aa64d9a4b87152ef27302c9e4",
936
936
  "downloads": 53034,
937
- "readme": "<section class=\"markdown\"><h1>firewall</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-firewall\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-firewall.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Firewall module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Firewall</a>\n\n<ul>\n<li><a href=\"#what-firewall-affects\">What Firewall affects</a></li>\n<li><a href=\"#setup-requirements\">Setup Requirements</a></li>\n<li><a href=\"#beginning-with-firewall\">Beginning with Firewall</a></li>\n<li><a href=\"#upgrading\">Upgrading</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - Configuration and customization options</a>\n\n<ul>\n<li><a href=\"#default-rules\">Default rules - Setting up general configurations for all firewalls</a></li>\n<li><a href=\"#application-specific-rules\">Application-specific rules - Options for configuring and managing firewalls across applications</a></li>\n<li><a href=\"#other-rules\">Other Rules</a></li>\n</ul></li>\n<li><a href=\"#reference\">Reference - An under-the-hood peek at what the module is doing</a></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a>\n\n<ul>\n<li><a href=\"#tests\">Tests - Testing your configuration</a></li>\n</ul></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Firewall module lets you manage firewall rules with Puppet.</p>\n\n<h2>Module Description</h2>\n\n<p>PuppetLabs&#39; Firewall introduces the resource <code>firewall</code>, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables.</p>\n\n<p>The module also introduces the resource <code>firewallchain</code>, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported.</p>\n\n<h2>Setup</h2>\n\n<h3>What Firewall affects:</h3>\n\n<ul>\n<li>every node running a firewall</li>\n<li>system&#39;s firewall settings</li>\n<li>connection settings for managed nodes</li>\n<li>unmanaged resources (get purged)</li>\n<li>site.pp</li>\n</ul>\n\n<h3>Setup Requirements</h3>\n\n<p>Firewall uses Ruby-based providers, so you must have <a href=\"http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync\">pluginsync enabled</a>.</p>\n\n<h3>Beginning with Firewall</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>In your <code>site.pp</code> (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.</p>\n\n<pre><code>resources { &quot;firewall&quot;:\n purge =&gt; true\n}\n</code></pre>\n\n<p>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.</p>\n\n<pre><code>Firewall {\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\n</code></pre>\n\n<p>You also need to declare the <code>my_fw::pre</code> &amp; <code>my_fw::post</code> classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following</p>\n\n<pre><code>class { [&#39;my_fw::pre&#39;, &#39;my_fw::post&#39;]: }\n</code></pre>\n\n<p>Finally, you should include the <code>firewall</code> class to ensure the correct packages are installed.</p>\n\n<pre><code>class { &#39;firewall&#39;: }\n</code></pre>\n\n<p>Now to create the <code>my_fw::pre</code> and <code>my_fw::post</code> 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 whitelist setup, so you can define what rules you want and everything else is ignored rather than removed.</p>\n\n<p>The <code>pre</code> class should be located in <code>my_fw/manifests/pre.pp</code> and should contain any default rules to be applied first.</p>\n\n<pre><code>class my_fw::pre {\n Firewall {\n require =&gt; undef,\n }\n\n # Default firewall rules\n firewall { &#39;000 accept all icmp&#39;:\n proto =&gt; &#39;icmp&#39;,\n action =&gt; &#39;accept&#39;,\n }-&gt;\n firewall { &#39;001 accept all to lo interface&#39;:\n proto =&gt; &#39;all&#39;,\n iniface =&gt; &#39;lo&#39;,\n action =&gt; &#39;accept&#39;,\n }-&gt;\n firewall { &#39;002 accept related established rules&#39;:\n proto =&gt; &#39;all&#39;,\n state =&gt; [&#39;RELATED&#39;, &#39;ESTABLISHED&#39;],\n action =&gt; &#39;accept&#39;,\n }\n}\n</code></pre>\n\n<p>The rules in <code>pre</code> should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed.</p>\n\n<p>The <code>post</code> class should be located in <code>my_fw/manifests/post.pp</code> and include any default rules to be applied last.</p>\n\n<pre><code>class my_fw::post {\n firewall { &#39;999 drop all&#39;:\n proto =&gt; &#39;all&#39;,\n action =&gt; &#39;drop&#39;,\n before =&gt; undef,\n }\n}\n</code></pre>\n\n<p>To put it all together: the <code>before</code> parameter in <code>Firewall {}</code> ensures <code>my_fw::post</code> is run before any other rules and the the <code>require</code> parameter ensures <code>my_fw::pre</code> is run after any other rules. So the run order is:</p>\n\n<ul>\n<li>run the rules in <code>my_fw::pre</code></li>\n<li>run your rules (defined in code)</li>\n<li>run the rules in <code>my_fw::post</code></li>\n</ul>\n\n<h3>Upgrading</h3>\n\n<h4>Upgrading from version 0.2.0 and newer</h4>\n\n<p>Upgrade the module with the puppet module tool as normal:</p>\n\n<pre><code>puppet module upgrade puppetlabs/firewall\n</code></pre>\n\n<h4>Upgrading from version 0.1.1 and older</h4>\n\n<p>Start by upgrading the module using the puppet module tool:</p>\n\n<pre><code>puppet module upgrade puppetlabs/firewall\n</code></pre>\n\n<p>Previously, you would have required the following in your <code>site.pp</code> (or some other global location):</p>\n\n<pre><code># Always persist firewall rules\nexec { &#39;persist-firewall&#39;:\n command =&gt; $operatingsystem ? {\n &#39;debian&#39; =&gt; &#39;/sbin/iptables-save &gt; /etc/iptables/rules.v4&#39;,\n /(RedHat|CentOS)/ =&gt; &#39;/sbin/iptables-save &gt; /etc/sysconfig/iptables&#39;,\n },\n refreshonly =&gt; true,\n}\nFirewall {\n notify =&gt; Exec[&#39;persist-firewall&#39;],\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\nFirewallchain {\n notify =&gt; Exec[&#39;persist-firewall&#39;],\n}\nresources { &quot;firewall&quot;:\n purge =&gt; true\n}\n</code></pre>\n\n<p>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 &amp; post rules.</p>\n\n<pre><code>resources { &quot;firewall&quot;:\n purge =&gt; true\n}\nFirewall {\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\nclass { [&#39;my_fw::pre&#39;, &#39;my_fw::post&#39;]: }\nclass { &#39;firewall&#39;: }\n</code></pre>\n\n<p>Consult the the documentation below for more details around the classes <code>my_fw::pre</code> and <code>my_fw::post</code>.</p>\n\n<h2>Usage</h2>\n\n<p>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.</p>\n\n<p>All rules employ a numbering system in the resource&#39;s title that is used for ordering. When titling your rules, make sure you prefix the rule with a number.</p>\n\n<pre><code> 000 this runs first\n 999 this runs last\n</code></pre>\n\n<h3>Default rules</h3>\n\n<p>You can place default rules in either <code>my_fw::pre</code> or <code>my_fw::post</code>, depending on when you would like them to run. Rules placed in the <code>pre</code> class will run first, rules in the <code>post</code> class, last.</p>\n\n<p>Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match <code>/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/</code>.</p>\n\n<h4>Examples of default rules</h4>\n\n<p>Basic accept ICMP request example:</p>\n\n<pre><code>firewall { &quot;000 accept all icmp requests&quot;:\n proto =&gt; &quot;icmp&quot;,\n action =&gt; &quot;accept&quot;,\n}\n</code></pre>\n\n<p>Drop all:</p>\n\n<pre><code>firewall { &quot;999 drop all other requests&quot;:\n action =&gt; &quot;drop&quot;,\n}\n</code></pre>\n\n<h3>Application-specific rules</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>For example, if you have an Apache module, you could declare the class as below</p>\n\n<pre><code>class apache {\n firewall { &#39;100 allow http and https access&#39;:\n port =&gt; [80, 443],\n proto =&gt; tcp,\n action =&gt; accept,\n }\n # ... the rest of your code ...\n}\n</code></pre>\n\n<p>When someone uses the class, firewalling is provided automatically.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<h3>Other rules</h3>\n\n<p>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.</p>\n\n<pre><code>node &#39;foo.bar.com&#39; {\n firewall { &#39;111 open port 111&#39;:\n dport =&gt; 111\n }\n}\n</code></pre>\n\n<p>You can also do more complex things with the <code>firewall</code> resource. Here we are doing some NAT configuration.</p>\n\n<pre><code>firewall { &#39;100 snat for network foo2&#39;:\n chain =&gt; &#39;POSTROUTING&#39;,\n jump =&gt; &#39;MASQUERADE&#39;,\n proto =&gt; &#39;all&#39;,\n outiface =&gt; &quot;eth0&quot;,\n source =&gt; &#39;10.1.2.0/24&#39;,\n table =&gt; &#39;nat&#39;,\n}\n</code></pre>\n\n<p>In the below example, we are creating a new chain and forwarding any port 5000 access to it.</p>\n\n<pre><code>firewall { &#39;100 forward to MY_CHAIN&#39;:\n chain =&gt; &#39;INPUT&#39;,\n jump =&gt; &#39;MY_CHAIN&#39;,\n}\n# The namevar here is in the format chain_name:table:protocol\nfirewallchain { &#39;MY_CHAIN:filter:IPv4&#39;:\n ensure =&gt; present,\n}\nfirewall { &#39;100 my rule&#39;:\n chain =&gt; &#39;MY_CHAIN&#39;,\n action =&gt; &#39;accept&#39;,\n proto =&gt; &#39;tcp&#39;,\n dport =&gt; 5000,\n}\n</code></pre>\n\n<h3>Additional Information</h3>\n\n<p>You can access the inline documentation:</p>\n\n<pre><code>puppet describe firewall\n</code></pre>\n\n<p>Or</p>\n\n<pre><code>puppet doc -r type\n(and search for firewall)\n</code></pre>\n\n<h2>Reference</h2>\n\n<p>Classes:</p>\n\n<ul>\n<li><a href=\"#class-firewall\">firewall</a></li>\n</ul>\n\n<p>Types:</p>\n\n<ul>\n<li><a href=\"#type-firewall\">firewall</a></li>\n<li><a href=\"#type-firewallchain\">firewallchain</a></li>\n</ul>\n\n<p>Facts:</p>\n\n<ul>\n<li><a href=\"#fact-ip6tablesversion\">ip6tables_version</a></li>\n<li><a href=\"#fact-iptablesversion\">iptables_version</a></li>\n<li><a href=\"#fact-iptablespersistentversion\">iptables_persistent_version</a></li>\n</ul>\n\n<h3>Class: firewall</h3>\n\n<p>This class is provided to do the basic setup tasks required for using the firewall resources.</p>\n\n<p>At the moment this takes care of:</p>\n\n<ul>\n<li>iptables-persistent package installation</li>\n</ul>\n\n<p>You should include the class for nodes that need to use the resources in this module. For example</p>\n\n<pre><code>class { &#39;firewall&#39;: }\n</code></pre>\n\n<h4><code>ensure</code></h4>\n\n<p>Indicates the state of <code>iptables</code> on your system, allowing you to disable <code>iptables</code> if desired.</p>\n\n<p>Can either be <code>running</code> or <code>stopped</code>. Default to <code>running</code>.</p>\n\n<h3>Type: firewall</h3>\n\n<p>This type provides the capability to manage firewall rules within puppet.</p>\n\n<p>For more documentation on the type, access the &#39;Types&#39; tab on the Puppet Labs Forge:</p>\n\n<p><a href=\"http://forge.puppetlabs.com/puppetlabs/firewall#types\">http://forge.puppetlabs.com/puppetlabs/firewall#types</a></p>\n\n<h3>Type:: firewallchain</h3>\n\n<p>This type provides the capability to manage rule chains for firewalls.</p>\n\n<p>For more documentation on the type, access the &#39;Types&#39; tab on the Puppet Labs Forge:</p>\n\n<p><a href=\"http://forge.puppetlabs.com/puppetlabs/firewall#types\">http://forge.puppetlabs.com/puppetlabs/firewall#types</a></p>\n\n<h3>Fact: ip6tables_version</h3>\n\n<p>The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution.</p>\n\n<h3>Fact: iptables_version</h3>\n\n<p>The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution.</p>\n\n<h3>Fact: iptables_persistent_version</h3>\n\n<p>Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact.</p>\n\n<h2>Limitations</h2>\n\n<p>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.</p>\n\n<p>Please note, we only aim support for the following distributions and versions - that is, we actually do ongoing system tests on these platforms:</p>\n\n<ul>\n<li>Redhat 5.9 and 6.4</li>\n<li>Debian 6.0 and 7.0</li>\n<li>Ubuntu 10.04 and 12.04</li>\n</ul>\n\n<p>If you want a new distribution supported feel free to raise a ticket and we&#39;ll consider it. If you want an older revision supported we&#39;ll also consider it, but don&#39;t get insulted if we reject it. Specifically, we will not consider Redhat 4.x support - its just too old.</p>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>Bugs can be reported using Github Issues:</p>\n\n<p><a href=\"http://github.com/puppetlabs/puppetlabs-firewall/issues\">http://github.com/puppetlabs/puppetlabs-firewall/issues</a></p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<p>For this particular module, please also read CONTRIBUTING.md before contributing.</p>\n\n<p>Currently we support:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n<li>ebtables (chains only)</li>\n</ul>\n\n<p>But plans are to support lots of other firewall implementations:</p>\n\n<ul>\n<li>FreeBSD (ipf)</li>\n<li>Mac OS X (ipfw)</li>\n<li>OpenBSD (pf)</li>\n<li>Cisco (ASA and basic access lists)</li>\n</ul>\n\n<p>If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.</p>\n\n<h3>Testing</h3>\n\n<p>Make sure you have:</p>\n\n<ul>\n<li>rake</li>\n<li>bundler</li>\n</ul>\n\n<p>Install the necessary gems:</p>\n\n<pre><code>bundle install\n</code></pre>\n\n<p>And run the tests from the root of the source code:</p>\n\n<pre><code>rake test\n</code></pre>\n\n<p>If you have a copy of Vagrant 1.1.0 you can also run the system tests:</p>\n\n<pre><code>RSPEC_SET=debian-606-x64 rake spec:system\nRSPEC_SET=centos-58-x64 rake spec:system\n</code></pre>\n\n<p><em>Note:</em> system testing is fairly alpha at this point, your mileage may vary.</p>\n</section>",
938
- "changelog": "<section class=\"plaintext\"><pre>## 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&#x2F;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&#x2F;errors (Wolf Noble)\n\n---------------------------------------\n\n#### 0.3.1 - 2013&#x2F;6&#x2F;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 &#x27;hasstatus =&gt; true&#x27; 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&#x27;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&#x2F;4&#x2F;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&#x2F;3&#x2F;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&#x2F;3&#x2F;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 { &#x27;persist-firewall&#x27;:\n command =&gt; $operatingsystem ? {\n &#x27;debian&#x27; =&gt; &#x27;&#x2F;sbin&#x2F;iptables-save &gt; &#x2F;etc&#x2F;iptables&#x2F;rules.v4&#x27;,\n &#x2F;(RedHat|CentOS)&#x2F; =&gt; &#x27;&#x2F;sbin&#x2F;iptables-save &gt; &#x2F;etc&#x2F;sysconfig&#x2F;iptables&#x27;,\n },\n refreshonly =&gt; true,\n }\n Firewall {\n notify =&gt; Exec[&#x27;persist-firewall&#x27;],\n before =&gt; Class[&#x27;my_fw::post&#x27;],\n require =&gt; Class[&#x27;my_fw::pre&#x27;],\n }\n Firewallchain {\n notify =&gt; Exec[&#x27;persist-firewall&#x27;],\n }\n resources { &quot;firewall&quot;:\n purge =&gt; true\n }\n\nYou only need:\n\n class { &#x27;firewall&#x27;: }\n Firewall {\n before =&gt; Class[&#x27;my_fw::post&#x27;],\n require =&gt; Class[&#x27;my_fw::pre&#x27;],\n }\n\nTo install pre-requisites and to create dependencies on your pre &amp; 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&#x2F;2&#x2F;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&#x2F;2&#x2F;24\n\nThis release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won&#x27;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=&gt;LOG for log params (Daniel Black)\n* Reject and document icmp =&gt; &quot;any&quot; (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 &quot;.&quot;) (Johan Huysmans)\n* Add tests for VLAN support for iniface&#x2F;outiface (Ken Barber)\n* Add the table when deleting rules (Johan Huysmans)\n* Fix tests since we are now prefixing -t)\n* Changed &#x27;jump&#x27; to &#x27;action&#x27;, commands to lower case (Jason Short)\n* Support interface names containing &quot;+&quot; (Simon Deziel)\n* Fix for when iptables-save spews out &quot;FATAL&quot; 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&#x2F;12&#x2F;05\n\nThis release adds two new parameters, &#x27;uid&#x27; and &#x27;gid&#x27;. 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 { &#x27;497 match uid&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;mangle&#x27;,\n chain =&gt; &#x27;OUTPUT&#x27;,\n action =&gt; &#x27;drop&#x27;\n uid =&gt; &#x27;123&#x27;\n }\n\nThis release also adds value munging for the &#x27;log_level&#x27;, &#x27;source&#x27;, and &#x27;destination&#x27; parameters. The &#x27;source&#x27; and &#x27;destination&#x27; now support hostnames:\n\n firewall { &#x27;498 accept from puppetlabs.com&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;tcp&#x27;,\n source =&gt; &#x27;puppetlabs.com&#x27;,\n action =&gt; &#x27;accept&#x27;\n }\n\n\nThe &#x27;log_level&#x27; parameter now supports using log level names, such as &#x27;warn&#x27;, &#x27;debug&#x27;, and &#x27;panic&#x27;:\n\n firewall { &#x27;499 logging&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;udp&#x27;,\n log_level =&gt; &#x27;debug&#x27;,\n action =&gt; &#x27;drop&#x27;\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&#x2F;11&#x2F;12\n\nThis release introduces a new parameter &#x27;port&#x27; which allows you to set both\nsource and destination ports for a match:\n\n firewall { &quot;500 allow NTP requests&quot;:\n port =&gt; &quot;123&quot;,\n proto =&gt; &quot;udp&quot;,\n action =&gt; &quot;accept&quot;,\n }\n\nWe also have the limit parameter finally working:\n\n firewall { &quot;500 limit HTTP requests&quot;:\n dport =&gt; 80,\n proto =&gt; tcp,\n limit =&gt; &quot;60&#x2F;sec&quot;,\n burst =&gt; 30,\n action =&gt; 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 &#x27;limit&#x27; 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&#x2F;10&#x2F;26\n\nThis is largely a maintanence and cleanup release, but includes the ability to\nspecify ranges of ports in the sport&#x2F;dport parameter:\n\n firewall { &quot;500 allow port range&quot;:\n dport =&gt; [&quot;3000-3030&quot;,&quot;5000-5050&quot;],\n sport =&gt; [&quot;1024-65535&quot;],\n action =&gt; &quot;accept&quot;,\n }\n\n##### Changes\n\n* (#10295) Work around bug #4248 whereby the puppet&#x2F;util paths are not being loaded correctly on the puppetmaster\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&#x2F;10&#x2F;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</pre></section>",
937
+ "readme": "<section class=\"markdown\"><h1>firewall</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-firewall\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-firewall.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Firewall module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Firewall</a>\n\n<ul>\n<li><a href=\"#what-firewall-affects\">What Firewall affects</a></li>\n<li><a href=\"#setup-requirements\">Setup Requirements</a></li>\n<li><a href=\"#beginning-with-firewall\">Beginning with Firewall</a></li>\n<li><a href=\"#upgrading\">Upgrading</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - Configuration and customization options</a>\n\n<ul>\n<li><a href=\"#default-rules\">Default rules - Setting up general configurations for all firewalls</a></li>\n<li><a href=\"#application-specific-rules\">Application-specific rules - Options for configuring and managing firewalls across applications</a></li>\n<li><a href=\"#other-rules\">Other Rules</a></li>\n</ul></li>\n<li><a href=\"#reference\">Reference - An under-the-hood peek at what the module is doing</a></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a>\n\n<ul>\n<li><a href=\"#tests\">Tests - Testing your configuration</a></li>\n</ul></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Firewall module lets you manage firewall rules with Puppet.</p>\n\n<h2>Module Description</h2>\n\n<p>PuppetLabs&#39; Firewall introduces the resource <code>firewall</code>, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables.</p>\n\n<p>The module also introduces the resource <code>firewallchain</code>, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported.</p>\n\n<h2>Setup</h2>\n\n<h3>What Firewall affects:</h3>\n\n<ul>\n<li>every node running a firewall</li>\n<li>system&#39;s firewall settings</li>\n<li>connection settings for managed nodes</li>\n<li>unmanaged resources (get purged)</li>\n<li>site.pp</li>\n</ul>\n\n<h3>Setup Requirements</h3>\n\n<p>Firewall uses Ruby-based providers, so you must have <a href=\"http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync\">pluginsync enabled</a>.</p>\n\n<h3>Beginning with Firewall</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>In your <code>site.pp</code> (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.</p>\n\n<pre><code>resources { &quot;firewall&quot;:\n purge =&gt; true\n}\n</code></pre>\n\n<p>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.</p>\n\n<pre><code>Firewall {\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\n</code></pre>\n\n<p>You also need to declare the <code>my_fw::pre</code> &amp; <code>my_fw::post</code> classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following</p>\n\n<pre><code>class { [&#39;my_fw::pre&#39;, &#39;my_fw::post&#39;]: }\n</code></pre>\n\n<p>Finally, you should include the <code>firewall</code> class to ensure the correct packages are installed.</p>\n\n<pre><code>class { &#39;firewall&#39;: }\n</code></pre>\n\n<p>Now to create the <code>my_fw::pre</code> and <code>my_fw::post</code> 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.</p>\n\n<p>The <code>pre</code> class should be located in <code>my_fw/manifests/pre.pp</code> and should contain any default rules to be applied first.</p>\n\n<pre><code>class my_fw::pre {\n Firewall {\n require =&gt; undef,\n }\n\n # Default firewall rules\n firewall { &#39;000 accept all icmp&#39;:\n proto =&gt; &#39;icmp&#39;,\n action =&gt; &#39;accept&#39;,\n }-&gt;\n firewall { &#39;001 accept all to lo interface&#39;:\n proto =&gt; &#39;all&#39;,\n iniface =&gt; &#39;lo&#39;,\n action =&gt; &#39;accept&#39;,\n }-&gt;\n firewall { &#39;002 accept related established rules&#39;:\n proto =&gt; &#39;all&#39;,\n state =&gt; [&#39;RELATED&#39;, &#39;ESTABLISHED&#39;],\n action =&gt; &#39;accept&#39;,\n }\n}\n</code></pre>\n\n<p>The rules in <code>pre</code> should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed.</p>\n\n<p>The <code>post</code> class should be located in <code>my_fw/manifests/post.pp</code> and include any default rules to be applied last.</p>\n\n<pre><code>class my_fw::post {\n firewall { &#39;999 drop all&#39;:\n proto =&gt; &#39;all&#39;,\n action =&gt; &#39;drop&#39;,\n before =&gt; undef,\n }\n}\n</code></pre>\n\n<p>To put it all together: the <code>before</code> parameter in <code>Firewall {}</code> ensures <code>my_fw::post</code> is run before any other rules and the the <code>require</code> parameter ensures <code>my_fw::pre</code> is run after any other rules. So the run order is:</p>\n\n<ul>\n<li>run the rules in <code>my_fw::pre</code></li>\n<li>run your rules (defined in code)</li>\n<li>run the rules in <code>my_fw::post</code></li>\n</ul>\n\n<h3>Upgrading</h3>\n\n<h4>Upgrading from version 0.2.0 and newer</h4>\n\n<p>Upgrade the module with the puppet module tool as normal:</p>\n\n<pre><code>puppet module upgrade puppetlabs/firewall\n</code></pre>\n\n<h4>Upgrading from version 0.1.1 and older</h4>\n\n<p>Start by upgrading the module using the puppet module tool:</p>\n\n<pre><code>puppet module upgrade puppetlabs/firewall\n</code></pre>\n\n<p>Previously, you would have required the following in your <code>site.pp</code> (or some other global location):</p>\n\n<pre><code># Always persist firewall rules\nexec { &#39;persist-firewall&#39;:\n command =&gt; $operatingsystem ? {\n &#39;debian&#39; =&gt; &#39;/sbin/iptables-save &gt; /etc/iptables/rules.v4&#39;,\n /(RedHat|CentOS)/ =&gt; &#39;/sbin/iptables-save &gt; /etc/sysconfig/iptables&#39;,\n },\n refreshonly =&gt; true,\n}\nFirewall {\n notify =&gt; Exec[&#39;persist-firewall&#39;],\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\nFirewallchain {\n notify =&gt; Exec[&#39;persist-firewall&#39;],\n}\nresources { &quot;firewall&quot;:\n purge =&gt; true\n}\n</code></pre>\n\n<p>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 &amp; post rules.</p>\n\n<pre><code>resources { &quot;firewall&quot;:\n purge =&gt; true\n}\nFirewall {\n before =&gt; Class[&#39;my_fw::post&#39;],\n require =&gt; Class[&#39;my_fw::pre&#39;],\n}\nclass { [&#39;my_fw::pre&#39;, &#39;my_fw::post&#39;]: }\nclass { &#39;firewall&#39;: }\n</code></pre>\n\n<p>Consult the the documentation below for more details around the classes <code>my_fw::pre</code> and <code>my_fw::post</code>.</p>\n\n<h2>Usage</h2>\n\n<p>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.</p>\n\n<p>All rules employ a numbering system in the resource&#39;s title that is used for ordering. When titling your rules, make sure you prefix the rule with a number.</p>\n\n<pre><code> 000 this runs first\n 999 this runs last\n</code></pre>\n\n<h3>Default rules</h3>\n\n<p>You can place default rules in either <code>my_fw::pre</code> or <code>my_fw::post</code>, depending on when you would like them to run. Rules placed in the <code>pre</code> class will run first, rules in the <code>post</code> class, last.</p>\n\n<p>Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match <code>/^\\d+[[:alpha:][:digit:][:punct:][:space:]]+$/</code>.</p>\n\n<h4>Examples of default rules</h4>\n\n<p>Basic accept ICMP request example:</p>\n\n<pre><code>firewall { &quot;000 accept all icmp requests&quot;:\n proto =&gt; &quot;icmp&quot;,\n action =&gt; &quot;accept&quot;,\n}\n</code></pre>\n\n<p>Drop all:</p>\n\n<pre><code>firewall { &quot;999 drop all other requests&quot;:\n action =&gt; &quot;drop&quot;,\n}\n</code></pre>\n\n<h3>Application-specific rules</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>For example, if you have an Apache module, you could declare the class as below</p>\n\n<pre><code>class apache {\n firewall { &#39;100 allow http and https access&#39;:\n port =&gt; [80, 443],\n proto =&gt; tcp,\n action =&gt; accept,\n }\n # ... the rest of your code ...\n}\n</code></pre>\n\n<p>When someone uses the class, firewalling is provided automatically.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<h3>Other rules</h3>\n\n<p>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.</p>\n\n<pre><code>node &#39;foo.bar.com&#39; {\n firewall { &#39;111 open port 111&#39;:\n dport =&gt; 111\n }\n}\n</code></pre>\n\n<p>You can also do more complex things with the <code>firewall</code> resource. Here we are doing some NAT configuration.</p>\n\n<pre><code>firewall { &#39;100 snat for network foo2&#39;:\n chain =&gt; &#39;POSTROUTING&#39;,\n jump =&gt; &#39;MASQUERADE&#39;,\n proto =&gt; &#39;all&#39;,\n outiface =&gt; &quot;eth0&quot;,\n source =&gt; &#39;10.1.2.0/24&#39;,\n table =&gt; &#39;nat&#39;,\n}\n</code></pre>\n\n<p>In the below example, we are creating a new chain and forwarding any port 5000 access to it.</p>\n\n<pre><code>firewall { &#39;100 forward to MY_CHAIN&#39;:\n chain =&gt; &#39;INPUT&#39;,\n jump =&gt; &#39;MY_CHAIN&#39;,\n}\n# The namevar here is in the format chain_name:table:protocol\nfirewallchain { &#39;MY_CHAIN:filter:IPv4&#39;:\n ensure =&gt; present,\n}\nfirewall { &#39;100 my rule&#39;:\n chain =&gt; &#39;MY_CHAIN&#39;,\n action =&gt; &#39;accept&#39;,\n proto =&gt; &#39;tcp&#39;,\n dport =&gt; 5000,\n}\n</code></pre>\n\n<h3>Additional Information</h3>\n\n<p>You can access the inline documentation:</p>\n\n<pre><code>puppet describe firewall\n</code></pre>\n\n<p>Or</p>\n\n<pre><code>puppet doc -r type\n(and search for firewall)\n</code></pre>\n\n<h2>Reference</h2>\n\n<p>Classes:</p>\n\n<ul>\n<li><a href=\"#class-firewall\">firewall</a></li>\n</ul>\n\n<p>Types:</p>\n\n<ul>\n<li><a href=\"#type-firewall\">firewall</a></li>\n<li><a href=\"#type-firewallchain\">firewallchain</a></li>\n</ul>\n\n<p>Facts:</p>\n\n<ul>\n<li><a href=\"#fact-ip6tablesversion\">ip6tables_version</a></li>\n<li><a href=\"#fact-iptablesversion\">iptables_version</a></li>\n<li><a href=\"#fact-iptablespersistentversion\">iptables_persistent_version</a></li>\n</ul>\n\n<h3>Class: firewall</h3>\n\n<p>This class is provided to do the basic setup tasks required for using the firewall resources.</p>\n\n<p>At the moment this takes care of:</p>\n\n<ul>\n<li>iptables-persistent package installation</li>\n</ul>\n\n<p>You should include the class for nodes that need to use the resources in this module. For example</p>\n\n<pre><code>class { &#39;firewall&#39;: }\n</code></pre>\n\n<h4><code>ensure</code></h4>\n\n<p>Indicates the state of <code>iptables</code> on your system, allowing you to disable <code>iptables</code> if desired.</p>\n\n<p>Can either be <code>running</code> or <code>stopped</code>. Default to <code>running</code>.</p>\n\n<h3>Type: firewall</h3>\n\n<p>This type provides the capability to manage firewall rules within puppet.</p>\n\n<p>For more documentation on the type, access the &#39;Types&#39; tab on the Puppet Labs Forge:</p>\n\n<p><a href=\"http://forge.puppetlabs.com/puppetlabs/firewall#types\">http://forge.puppetlabs.com/puppetlabs/firewall#types</a></p>\n\n<h3>Type:: firewallchain</h3>\n\n<p>This type provides the capability to manage rule chains for firewalls.</p>\n\n<p>For more documentation on the type, access the &#39;Types&#39; tab on the Puppet Labs Forge:</p>\n\n<p><a href=\"http://forge.puppetlabs.com/puppetlabs/firewall#types\">http://forge.puppetlabs.com/puppetlabs/firewall#types</a></p>\n\n<h3>Fact: ip6tables_version</h3>\n\n<p>The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution.</p>\n\n<h3>Fact: iptables_version</h3>\n\n<p>The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution.</p>\n\n<h3>Fact: iptables_persistent_version</h3>\n\n<p>Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact.</p>\n\n<h2>Limitations</h2>\n\n<p>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.</p>\n\n<p>Please note, we only aim support for the following distributions and versions - that is, we actually do ongoing system tests on these platforms:</p>\n\n<ul>\n<li>Redhat 5.9 and 6.4</li>\n<li>Debian 6.0 and 7.0</li>\n<li>Ubuntu 10.04 and 12.04</li>\n</ul>\n\n<p>If you want a new distribution supported feel free to raise a ticket and we&#39;ll consider it. If you want an older revision supported we&#39;ll also consider it, but don&#39;t get insulted if we reject it. Specifically, we will not consider Redhat 4.x support - its just too old.</p>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>Bugs can be reported using Github Issues:</p>\n\n<p><a href=\"http://github.com/puppetlabs/puppetlabs-firewall/issues\">http://github.com/puppetlabs/puppetlabs-firewall/issues</a></p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<p>For this particular module, please also read CONTRIBUTING.md before contributing.</p>\n\n<p>Currently we support:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n<li>ebtables (chains only)</li>\n</ul>\n\n<p>But plans are to support lots of other firewall implementations:</p>\n\n<ul>\n<li>FreeBSD (ipf)</li>\n<li>Mac OS X (ipfw)</li>\n<li>OpenBSD (pf)</li>\n<li>Cisco (ASA and basic access lists)</li>\n</ul>\n\n<p>If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help.</p>\n\n<h3>Testing</h3>\n\n<p>Make sure you have:</p>\n\n<ul>\n<li>rake</li>\n<li>bundler</li>\n</ul>\n\n<p>Install the necessary gems:</p>\n\n<pre><code>bundle install\n</code></pre>\n\n<p>And run the tests from the root of the source code:</p>\n\n<pre><code>rake test\n</code></pre>\n\n<p>If you have a copy of Vagrant 1.1.0 you can also run the system tests:</p>\n\n<pre><code>RSPEC_SET=debian-606-x64 rake spec:system\nRSPEC_SET=centos-58-x64 rake spec:system\n</code></pre>\n\n<p><em>Note:</em> system testing is fairly alpha at this point, your mileage may vary.</p>\n</section>",
938
+ "changelog": "<section class=\"plaintext\"><pre>## 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&#x2F;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&#x2F;errors (Wolf Noble)\n\n---------------------------------------\n\n#### 0.3.1 - 2013&#x2F;6&#x2F;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 &#x27;hasstatus =&gt; true&#x27; 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&#x27;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&#x2F;4&#x2F;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&#x2F;3&#x2F;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&#x2F;3&#x2F;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 { &#x27;persist-firewall&#x27;:\n command =&gt; $operatingsystem ? {\n &#x27;debian&#x27; =&gt; &#x27;&#x2F;sbin&#x2F;iptables-save &gt; &#x2F;etc&#x2F;iptables&#x2F;rules.v4&#x27;,\n &#x2F;(RedHat|CentOS)&#x2F; =&gt; &#x27;&#x2F;sbin&#x2F;iptables-save &gt; &#x2F;etc&#x2F;sysconfig&#x2F;iptables&#x27;,\n },\n refreshonly =&gt; true,\n }\n Firewall {\n notify =&gt; Exec[&#x27;persist-firewall&#x27;],\n before =&gt; Class[&#x27;my_fw::post&#x27;],\n require =&gt; Class[&#x27;my_fw::pre&#x27;],\n }\n Firewallchain {\n notify =&gt; Exec[&#x27;persist-firewall&#x27;],\n }\n resources { &quot;firewall&quot;:\n purge =&gt; true\n }\n\nYou only need:\n\n class { &#x27;firewall&#x27;: }\n Firewall {\n before =&gt; Class[&#x27;my_fw::post&#x27;],\n require =&gt; Class[&#x27;my_fw::pre&#x27;],\n }\n\nTo install pre-requisites and to create dependencies on your pre &amp; 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&#x2F;2&#x2F;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&#x2F;2&#x2F;24\n\nThis release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won&#x27;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=&gt;LOG for log params (Daniel Black)\n* Reject and document icmp =&gt; &quot;any&quot; (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 &quot;.&quot;) (Johan Huysmans)\n* Add tests for VLAN support for iniface&#x2F;outiface (Ken Barber)\n* Add the table when deleting rules (Johan Huysmans)\n* Fix tests since we are now prefixing -t)\n* Changed &#x27;jump&#x27; to &#x27;action&#x27;, commands to lower case (Jason Short)\n* Support interface names containing &quot;+&quot; (Simon Deziel)\n* Fix for when iptables-save spews out &quot;FATAL&quot; 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&#x2F;12&#x2F;05\n\nThis release adds two new parameters, &#x27;uid&#x27; and &#x27;gid&#x27;. 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 { &#x27;497 match uid&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;mangle&#x27;,\n chain =&gt; &#x27;OUTPUT&#x27;,\n action =&gt; &#x27;drop&#x27;\n uid =&gt; &#x27;123&#x27;\n }\n\nThis release also adds value munging for the &#x27;log_level&#x27;, &#x27;source&#x27;, and &#x27;destination&#x27; parameters. The &#x27;source&#x27; and &#x27;destination&#x27; now support hostnames:\n\n firewall { &#x27;498 accept from puppetlabs.com&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;tcp&#x27;,\n source =&gt; &#x27;puppetlabs.com&#x27;,\n action =&gt; &#x27;accept&#x27;\n }\n\n\nThe &#x27;log_level&#x27; parameter now supports using log level names, such as &#x27;warn&#x27;, &#x27;debug&#x27;, and &#x27;panic&#x27;:\n\n firewall { &#x27;499 logging&#x27;:\n port =&gt; &#x27;123&#x27;,\n proto =&gt; &#x27;udp&#x27;,\n log_level =&gt; &#x27;debug&#x27;,\n action =&gt; &#x27;drop&#x27;\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&#x2F;11&#x2F;12\n\nThis release introduces a new parameter &#x27;port&#x27; which allows you to set both\nsource and destination ports for a match:\n\n firewall { &quot;500 allow NTP requests&quot;:\n port =&gt; &quot;123&quot;,\n proto =&gt; &quot;udp&quot;,\n action =&gt; &quot;accept&quot;,\n }\n\nWe also have the limit parameter finally working:\n\n firewall { &quot;500 limit HTTP requests&quot;:\n dport =&gt; 80,\n proto =&gt; tcp,\n limit =&gt; &quot;60&#x2F;sec&quot;,\n burst =&gt; 30,\n action =&gt; 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 &#x27;limit&#x27; 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&#x2F;10&#x2F;26\n\nThis is largely a maintanence and cleanup release, but includes the ability to\nspecify ranges of ports in the sport&#x2F;dport parameter:\n\n firewall { &quot;500 allow port range&quot;:\n dport =&gt; [&quot;3000-3030&quot;,&quot;5000-5050&quot;],\n sport =&gt; [&quot;1024-65535&quot;],\n action =&gt; &quot;accept&quot;,\n }\n\n##### Changes\n\n* (#10295) Work around bug #4248 whereby the puppet&#x2F;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&#x2F;10&#x2F;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</pre></section>",
939
939
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
940
940
  "created_at": "2013-09-10 13:27:07 -0700",
941
941
  "updated_at": "2013-09-10 13:27:07 -0700",
@@ -1208,8 +1208,8 @@
1208
1208
  "file_size": 55678,
1209
1209
  "file_md5": "aeef7a080c7367728dcb47239cddb5ef",
1210
1210
  "downloads": 51733,
1211
- "readme": "<section class=\"markdown\"><h1>Puppet Labs Standard Library</h1>\n\n<p>This module provides a &quot;standard library&quot; of resources for developing Puppet\nModules. This modules will include the following additions to Puppet</p>\n\n<ul>\n<li>Stages</li>\n<li>Facts</li>\n<li>Functions</li>\n<li>Defined resource types</li>\n<li>Types</li>\n<li>Providers</li>\n</ul>\n\n<p>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.</p>\n\n<p>To report or research a bug with any part of this module, please go to\n<a href=\"http://projects.puppetlabs.com/projects/stdlib\">http://projects.puppetlabs.com/projects/stdlib</a></p>\n\n<h1>Versions</h1>\n\n<p>This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of <a href=\"http://puppetlabs.com/puppet/puppet-enterprise/\">Puppet\nEnterprise</a> and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically &quot;merged up&quot; into master. The current\nlist of integration branches are:</p>\n\n<ul>\n<li>v2.1.x (v2.1.1 released in PE 1.2, 1.2.1, 1.2.3, 1.2.4)</li>\n<li>v2.2.x (Never released as part of PE, only to the Forge)</li>\n<li>v2.3.x (Released in PE 2.5.x)</li>\n<li>master (mainline development branch)</li>\n</ul>\n\n<p>The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.</p>\n\n<h1>Compatibility</h1>\n\n<p>The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.</p>\n\n<h2>stdlib 2.x</h2>\n\n<p>All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.</p>\n\n<h2>stdlib 3.x</h2>\n\n<p>The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2.7.</p>\n\n<h1>Functions</h1>\n\n<h2>abs</h2>\n\n<p>Returns the absolute value of a number, for example -34.56 becomes 34.56. Takes\na single integer and float value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>bool2num</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>capitalize</h2>\n\n<p>Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chomp</h2>\n\n<p>Removes the record separator from the end of a string or an array of strings,\nfor example <code>hello\\n</code> becomes <code>hello</code>. Requires a single string or array as an\ninput.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chop</h2>\n\n<p>Returns a new string with the last character removed. If the string ends\nwith <code>\\r\\n</code>, 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 <code>chomp</code> function.\nRequires a string or array of strings as input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>defined_with_params</h2>\n\n<p>Takes a resource reference and an optional hash of attributes.</p>\n\n<p>Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n\nif ! defined_with_params(User[dan], {&#39;ensure&#39; =&gt; &#39;present&#39; }) {\n user { &#39;dan&#39;: ensure =&gt; present, }\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete</h2>\n\n<p>Deletes a selected element from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete_at</h2>\n\n<p>Deletes a determined indexed value from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 1)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>downcase</h2>\n\n<p>Converts the case of a string or all strings in an array to lower case.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>empty</h2>\n\n<p>Returns true if the variable is empty.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>ensure_resource</h2>\n\n<p>Takes a resource type, title, and a list of attributes that describe a\nresource.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>This example only creates the resource if it does not already exist:</p>\n\n<pre><code>ensure_resource(&#39;user, &#39;dan&#39;, {&#39;ensure&#39; =&gt; &#39;present&#39; })\n</code></pre>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>flatten</h2>\n\n<p>This function flattens any deeply nested arrays and returns a single flat array\nas a result.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>flatten([&#39;a&#39;, [&#39;b&#39;, [&#39;c&#39;]]])\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;b&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>fqdn_rotate</h2>\n\n<p>Rotates an array a random number of times based on a nodes fqdn.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>get_module_path</h2>\n\n<p>Returns the absolute path of the specified module for the current\nenvironment.</p>\n\n<p>Example:\n $module_path = get_module_path(&#39;stdlib&#39;)</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getvar</h2>\n\n<p>Lookup a variable in a remote namespace.</p>\n\n<p>For example:</p>\n\n<pre><code>$foo = getvar(&#39;site::data::foo&#39;)\n# Equivalent to $foo = $site::data::foo\n</code></pre>\n\n<p>This is useful if the namespace itself is stored in a string:</p>\n\n<pre><code>$datalocation = &#39;site::data&#39;\n$bar = getvar(&quot;${datalocation}::bar&quot;)\n# Equivalent to $bar = $site::data::bar\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>grep</h2>\n\n<p>This function searches through an array and returns any elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>grep([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;aaa&#39;,&#39;aaaddd&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_key</h2>\n\n<p>Determine if a hash has a certain key value.</p>\n\n<p>Example:</p>\n\n<pre><code>$my_hash = {&#39;key_one&#39; =&gt; &#39;value_one&#39;}\nif has_key($my_hash, &#39;key_two&#39;) {\n notice(&#39;we will not reach here&#39;)\n}\nif has_key($my_hash, &#39;key_one&#39;) {\n notice(&#39;this will be printed&#39;)\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>hash</h2>\n\n<p>This function converts and array into a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>hash([&#39;a&#39;,1,&#39;b&#39;,2,&#39;c&#39;,3])\n</code></pre>\n\n<p>Would return: {&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_array</h2>\n\n<p>Returns true if the variable passed to this function is an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_domain_name</h2>\n\n<p>Returns true if the string passed to this function is a syntactically correct domain name.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_float</h2>\n\n<p>Returns true if the variable passed to this function is a float.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_hash</h2>\n\n<p>Returns true if the variable passed to this function is a hash.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_integer</h2>\n\n<p>Returns true if the variable returned to this string is an integer.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_ip_address</h2>\n\n<p>Returns true if the string passed to this function is a valid IP address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_mac_address</h2>\n\n<p>Returns true if the string passed to this function is a valid mac address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_numeric</h2>\n\n<p>Returns true if the variable passed to this function is a number.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_string</h2>\n\n<p>Returns true if the variable passed to this function is a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join</h2>\n\n<p>This function joins an array into a string using a seperator.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &quot;,&quot;)\n</code></pre>\n\n<p>Would result in: &quot;a,b,c&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>keys</h2>\n\n<p>Returns the keys of a hash as an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>loadyaml</h2>\n\n<p>Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.</p>\n\n<p>For example:</p>\n\n<pre><code>$myhash = loadyaml(&#39;/etc/puppet/data/myhash.yaml&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>lstrip</h2>\n\n<p>Strips leading spaces to the left of a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>member</h2>\n\n<p>This function determines if a variable is a member of an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: true</p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;c&#39;)\n</code></pre>\n\n<p>Would return: false</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>merge</h2>\n\n<p>Merges two or more hashes together and returns the resulting hash.</p>\n\n<p>For example:</p>\n\n<pre><code>$hash1 = {&#39;one&#39; =&gt; 1, &#39;two&#39;, =&gt; 2}\n$hash2 = {&#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39;, =&gt; &#39;tres&#39;}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash = {&#39;one&#39; =&gt; 1, &#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39; =&gt; &#39;tres&#39;}\n</code></pre>\n\n<p>When there is a duplicate key, the key in the rightmost hash will &quot;win.&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>num2bool</h2>\n\n<p>This function converts a number into a true boolean. Zero becomes false. Numbers\nhigher then 0 become true.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parsejson</h2>\n\n<p>This function accepts JSON as a string and converts into the correct Puppet\nstructure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parseyaml</h2>\n\n<p>This function accepts YAML as a string and converts it into the correct\nPuppet structure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>prefix</h2>\n\n<p>This function applies a prefix to all elements in an array.</p>\n\n<p><em>Examles:</em></p>\n\n<pre><code>prefix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;pa&#39;,&#39;pb&#39;,&#39;pc&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>range</h2>\n\n<p>When given range in the form of (start, stop) it will extrapolate a range as\nan array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>range(&quot;0&quot;, &quot;9&quot;)\n</code></pre>\n\n<p>Will return: [0,1,2,3,4,5,6,7,8,9]</p>\n\n<pre><code>range(&quot;00&quot;, &quot;09&quot;)\n</code></pre>\n\n<p>Will return: <a href=\"Zero%20padded%20strings%20are%20converted%20to%0Aintegers%20automatically\">0,1,2,3,4,5,6,7,8,9</a></p>\n\n<pre><code>range(&quot;a&quot;, &quot;c&quot;)\n</code></pre>\n\n<p>Will return: [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]</p>\n\n<pre><code>range(&quot;host01&quot;, &quot;host10&quot;)\n</code></pre>\n\n<p>Will return: [&quot;host01&quot;, &quot;host02&quot;, ..., &quot;host09&quot;, &quot;host10&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reverse</h2>\n\n<p>Reverses the order of a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>rstrip</h2>\n\n<p>Strips leading spaces to the right of the string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>shuffle</h2>\n\n<p>Randomizes the order of a string or array elements.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>size</h2>\n\n<p>Returns the number of elements in a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>sort</h2>\n\n<p>Sorts strings and arrays lexically.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>squeeze</h2>\n\n<p>Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2bool</h2>\n\n<p>This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to &#39;true&#39; and strings that contain things\nlike: 0, f, n, false, no to &#39;false&#39;.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2saltedsha512</h2>\n\n<p>This converts a string to a salted-SHA512 password hash (which is used for OS X\nversions &gt;= 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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strftime</h2>\n\n<p>This function returns formatted time.</p>\n\n<p><em>Examples:</em></p>\n\n<p>To return the time since epoch:</p>\n\n<pre><code>strftime(&quot;%s&quot;)\n</code></pre>\n\n<p>To return the date:</p>\n\n<pre><code>strftime(&quot;%Y-%m-%d&quot;)\n</code></pre>\n\n<p><em>Format meaning:</em></p>\n\n<pre><code>%a - The abbreviated weekday name (``Sun&#39;&#39;)\n%A - The full weekday name (``Sunday&#39;&#39;)\n%b - The abbreviated month name (``Jan&#39;&#39;)\n%B - The full month name (``January&#39;&#39;)\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</code></pre>\n\n<p>)\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 (<code>AM&#39;&#39; or</code>PM&#39;&#39;)\n %P - Meridian indicator (<code>am&#39;&#39; or</code>pm&#39;&#39;)\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 ``%&#39;&#39; character</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strip</h2>\n\n<p>This function removes leading and trailing whitespace from a string or from\nevery string inside an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>strip(&quot; aaa &quot;)\n</code></pre>\n\n<p>Would result in: &quot;aaa&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>swapcase</h2>\n\n<p>This function will swap the existing case of a string.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>swapcase(&quot;aBcD&quot;)\n</code></pre>\n\n<p>Would result in: &quot;AbCd&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>time</h2>\n\n<p>This function will return the current time since epoch as an integer.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>time()\n</code></pre>\n\n<p>Will return something like: 1311972653</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>to_bytes</h2>\n\n<p>Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>type</h2>\n\n<p>Returns the type when passed a variable. Type can be one of:</p>\n\n<ul>\n<li>string</li>\n<li>array</li>\n<li>hash</li>\n<li>float</li>\n<li>integer</li>\n<li><p>boolean</p></li>\n<li><p><em>Type</em>: rvalue</p></li>\n</ul>\n\n<h2>unique</h2>\n\n<p>This function will remove duplicates from strings and arrays.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>unique(&quot;aabbcc&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>abc\n</code></pre>\n\n<p>You can also use this with arrays:</p>\n\n<pre><code>unique([&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;c&quot;])\n</code></pre>\n\n<p>This returns:</p>\n\n<pre><code>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>upcase</h2>\n\n<p>Converts a string or an array of strings to uppercase.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>upcase(&quot;abcd&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>ABCD\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>validate_absolute_path</h2>\n\n<p>Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_path = &quot;C:/Program Files (x86)/Puppet Labs/Puppet&quot;\nvalidate_absolute_path($my_path)\n$my_path2 = &quot;/var/lib/puppet&quot;\nvalidate_absolute_path($my_path2)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_absolute_path(true)\nvalidate_absolute_path([ &#39;var/lib/puppet&#39;, &#39;/var/foo&#39; ])\nvalidate_absolute_path([ &#39;/var/lib/puppet&#39;, &#39;var/foo&#39; ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_array</h2>\n\n<p>Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_array = [ &#39;one&#39;, &#39;two&#39; ]\nvalidate_array($my_array)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_array(true)\nvalidate_array(&#39;some_string&#39;)\n$undefined = undef\nvalidate_array($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_bool</h2>\n\n<p>Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>$some_array = [ true ]\nvalidate_bool(&quot;false&quot;)\nvalidate_bool(&quot;true&quot;)\nvalidate_bool($some_array)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_hash</h2>\n\n<p>Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_hash = { &#39;one&#39; =&gt; &#39;two&#39; }\nvalidate_hash($my_hash)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_hash(true)\nvalidate_hash(&#39;some_string&#39;)\n$undefined = undef\nvalidate_hash($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_re</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>The following strings will validate against the regular expressions:</p>\n\n<pre><code>validate_re(&#39;one&#39;, &#39;^one$&#39;)\nvalidate_re(&#39;one&#39;, [ &#39;^one&#39;, &#39;^two&#39; ])\n</code></pre>\n\n<p>The following strings will fail to validate, causing compilation to abort:</p>\n\n<pre><code>validate_re(&#39;one&#39;, [ &#39;^two&#39;, &#39;^three&#39; ])\n</code></pre>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_re($::puppetversion, &#39;^2.7&#39;, &#39;The $puppetversion fact value does not match 2.7&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_slength</h2>\n\n<p>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.</p>\n\n<p>The following values will pass:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,17)\n validate_slength([&quot;discombobulate&quot;,&quot;moo&quot;],17)</p>\n\n<p>The following valueis will not:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,1)\n validate_slength([&quot;discombobulate&quot;,&quot;thermometer&quot;],5)</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_string</h2>\n\n<p>Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_string = &quot;one two&quot;\nvalidate_string($my_string, &#39;three&#39;)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_string(true)\nvalidate_string([ &#39;some&#39;, &#39;array&#39; ])\n$undefined = undef\nvalidate_string($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>values</h2>\n\n<p>When given a hash this function will return the values of that hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>$hash = {\n &#39;a&#39; =&gt; 1,\n &#39;b&#39; =&gt; 2,\n &#39;c&#39; =&gt; 3,\n}\nvalues($hash)\n</code></pre>\n\n<p>This example would return:</p>\n\n<pre><code>[1,2,3]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>values_at</h2>\n\n<p>Finds value inside an array based on location.</p>\n\n<p>The first argument is the array you want to analyze, and the second element can\nbe a combination of:</p>\n\n<ul>\n<li>A single numeric index</li>\n<li>A range in the form of &#39;start-stop&#39; (eg. 4-9)</li>\n<li>An array combining the above</li>\n</ul>\n\n<p><em>Examples</em>:</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 2)\n</code></pre>\n\n<p>Would return [&#39;c&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], [&quot;0-1&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;b&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;d&#39;,&#39;e&#39;], [0, &quot;2-3&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;c&#39;,&#39;d&#39;].</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>zip</h2>\n\n<p>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.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>zip([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<pre><code>[&quot;1&quot;, &quot;4&quot;], [&quot;2&quot;, &quot;5&quot;], [&quot;3&quot;, &quot;6&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n</section>",
1212
- "changelog": "<section class=\"plaintext\"><pre>2012-11-28 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * Add reject() function (a79b2cd)\n\n2012-09-18 - Chad Metcalf &lt;chad@wibidata.com&gt; - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén &lt;dalen@spotify.com&gt; - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * (#14670) autorequire a file_line resource&#x27;s path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza &lt;gary@puppetlabs.com&gt; - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley &lt;wcooley@pdx.edu&gt; - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;dan@puppetlabs.com&gt; - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price &lt;chris@puppetlabs.com&gt; - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price &lt;chris@puppetlabs.com&gt; - 2.4.0\n * Add support for a &#x27;match&#x27; parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén &lt;dalen@spotify.com&gt; - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen &lt;steve.traylen@cern.ch&gt; - 2.4.0\n * (#13205) Rotate array&#x2F;string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs &lt;support@puppetlabs.com&gt; - 2.3.2\n * Make file_line default to ensure =&gt; 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 master (82194ca)\n * (#13494) Specify the behavior of zero padded strings (61891bb)\n\n2012-03-29 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* &#x2F;etc&#x2F;facter&#x2F;facts.d\n* &#x2F;etc&#x2F;puppetlabs&#x2F;facter&#x2F;facts.d\n\n2011-08-17 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.0\n* Add R.I. Pienaar&#x27;s facts.d custom facter fact\n* facts defined in &#x2F;etc&#x2F;facts.d and &#x2F;etc&#x2F;puppetlabs&#x2F;facts.d are\n automatically loaded now.\n\n2011-08-04 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add stdlib::stages class with a standard set of stages\n</pre></section>",
1211
+ "readme": "<section class=\"markdown\"><h1>Puppet Labs Standard Library</h1>\n\n<p>This module provides a &quot;standard library&quot; of resources for developing Puppet\nModules. This modules will include the following additions to Puppet</p>\n\n<ul>\n<li>Stages</li>\n<li>Facts</li>\n<li>Functions</li>\n<li>Defined resource types</li>\n<li>Types</li>\n<li>Providers</li>\n</ul>\n\n<p>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.</p>\n\n<p>To report or research a bug with any part of this module, please go to\n<a href=\"http://projects.puppetlabs.com/projects/stdlib\">http://projects.puppetlabs.com/projects/stdlib</a></p>\n\n<h1>Versions</h1>\n\n<p>This module follows semver.org (v1.0.0) versioning guidelines. The standard\nlibrary module is released as part of <a href=\"http://puppetlabs.com/puppet/puppet-enterprise/\">Puppet\nEnterprise</a> and as a result\nolder versions of Puppet Enterprise that Puppet Labs still supports will have\nbugfix maintenance branches periodically &quot;merged up&quot; into main. The current\nlist of integration branches are:</p>\n\n<ul>\n<li>v2.1.x (v2.1.1 released in PE 1.2, 1.2.1, 1.2.3, 1.2.4)</li>\n<li>v2.2.x (Never released as part of PE, only to the Forge)</li>\n<li>v2.3.x (Released in PE 2.5.x)</li>\n<li>main (mainline development branch)</li>\n</ul>\n\n<p>The first Puppet Enterprise version including the stdlib module is Puppet\nEnterprise 1.2.</p>\n\n<h1>Compatibility</h1>\n\n<p>The stdlib module does not work with Puppet versions released prior to Puppet\n2.6.0.</p>\n\n<h2>stdlib 2.x</h2>\n\n<p>All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.</p>\n\n<h2>stdlib 3.x</h2>\n\n<p>The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x\nsupports Puppet 2.7.</p>\n\n<h1>Functions</h1>\n\n<h2>abs</h2>\n\n<p>Returns the absolute value of a number, for example -34.56 becomes 34.56. Takes\na single integer and float value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>bool2num</h2>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>capitalize</h2>\n\n<p>Capitalizes the first letter of a string or array of strings.\nRequires either a single string or an array as an input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chomp</h2>\n\n<p>Removes the record separator from the end of a string or an array of strings,\nfor example <code>hello\\n</code> becomes <code>hello</code>. Requires a single string or array as an\ninput.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>chop</h2>\n\n<p>Returns a new string with the last character removed. If the string ends\nwith <code>\\r\\n</code>, 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 <code>chomp</code> function.\nRequires a string or array of strings as input.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>defined_with_params</h2>\n\n<p>Takes a resource reference and an optional hash of attributes.</p>\n\n<p>Returns true if a resource with the specified attributes has already been added\nto the catalog, and false otherwise.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n\nif ! defined_with_params(User[dan], {&#39;ensure&#39; =&gt; &#39;present&#39; }) {\n user { &#39;dan&#39;: ensure =&gt; present, }\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete</h2>\n\n<p>Deletes a selected element from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>delete_at</h2>\n\n<p>Deletes a determined indexed value from an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>delete_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 1)\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>downcase</h2>\n\n<p>Converts the case of a string or all strings in an array to lower case.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>empty</h2>\n\n<p>Returns true if the variable is empty.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>ensure_resource</h2>\n\n<p>Takes a resource type, title, and a list of attributes that describe a\nresource.</p>\n\n<pre><code>user { &#39;dan&#39;:\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>This example only creates the resource if it does not already exist:</p>\n\n<pre><code>ensure_resource(&#39;user, &#39;dan&#39;, {&#39;ensure&#39; =&gt; &#39;present&#39; })\n</code></pre>\n\n<p>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.</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>flatten</h2>\n\n<p>This function flattens any deeply nested arrays and returns a single flat array\nas a result.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>flatten([&#39;a&#39;, [&#39;b&#39;, [&#39;c&#39;]]])\n</code></pre>\n\n<p>Would return: [&#39;a&#39;,&#39;b&#39;,&#39;c&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>fqdn_rotate</h2>\n\n<p>Rotates an array a random number of times based on a nodes fqdn.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>get_module_path</h2>\n\n<p>Returns the absolute path of the specified module for the current\nenvironment.</p>\n\n<p>Example:\n $module_path = get_module_path(&#39;stdlib&#39;)</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>getvar</h2>\n\n<p>Lookup a variable in a remote namespace.</p>\n\n<p>For example:</p>\n\n<pre><code>$foo = getvar(&#39;site::data::foo&#39;)\n# Equivalent to $foo = $site::data::foo\n</code></pre>\n\n<p>This is useful if the namespace itself is stored in a string:</p>\n\n<pre><code>$datalocation = &#39;site::data&#39;\n$bar = getvar(&quot;${datalocation}::bar&quot;)\n# Equivalent to $bar = $site::data::bar\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>grep</h2>\n\n<p>This function searches through an array and returns any elements that match\nthe provided regular expression.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>grep([&#39;aaa&#39;,&#39;bbb&#39;,&#39;ccc&#39;,&#39;aaaddd&#39;], &#39;aaa&#39;)\n</code></pre>\n\n<p>Would return:</p>\n\n<pre><code>[&#39;aaa&#39;,&#39;aaaddd&#39;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>has_key</h2>\n\n<p>Determine if a hash has a certain key value.</p>\n\n<p>Example:</p>\n\n<pre><code>$my_hash = {&#39;key_one&#39; =&gt; &#39;value_one&#39;}\nif has_key($my_hash, &#39;key_two&#39;) {\n notice(&#39;we will not reach here&#39;)\n}\nif has_key($my_hash, &#39;key_one&#39;) {\n notice(&#39;this will be printed&#39;)\n}\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>hash</h2>\n\n<p>This function converts and array into a hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>hash([&#39;a&#39;,1,&#39;b&#39;,2,&#39;c&#39;,3])\n</code></pre>\n\n<p>Would return: {&#39;a&#39;=&gt;1,&#39;b&#39;=&gt;2,&#39;c&#39;=&gt;3}</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_array</h2>\n\n<p>Returns true if the variable passed to this function is an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_domain_name</h2>\n\n<p>Returns true if the string passed to this function is a syntactically correct domain name.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_float</h2>\n\n<p>Returns true if the variable passed to this function is a float.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_hash</h2>\n\n<p>Returns true if the variable passed to this function is a hash.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_integer</h2>\n\n<p>Returns true if the variable returned to this string is an integer.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_ip_address</h2>\n\n<p>Returns true if the string passed to this function is a valid IP address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_mac_address</h2>\n\n<p>Returns true if the string passed to this function is a valid mac address.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_numeric</h2>\n\n<p>Returns true if the variable passed to this function is a number.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>is_string</h2>\n\n<p>Returns true if the variable passed to this function is a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>join</h2>\n\n<p>This function joins an array into a string using a seperator.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>join([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &quot;,&quot;)\n</code></pre>\n\n<p>Would result in: &quot;a,b,c&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>keys</h2>\n\n<p>Returns the keys of a hash as an array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>loadyaml</h2>\n\n<p>Load a YAML file containing an array, string, or hash, and return the data\nin the corresponding native data type.</p>\n\n<p>For example:</p>\n\n<pre><code>$myhash = loadyaml(&#39;/etc/puppet/data/myhash.yaml&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>lstrip</h2>\n\n<p>Strips leading spaces to the left of a string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>member</h2>\n\n<p>This function determines if a variable is a member of an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;b&#39;)\n</code></pre>\n\n<p>Would return: true</p>\n\n<pre><code>member([&#39;a&#39;,&#39;b&#39;], &#39;c&#39;)\n</code></pre>\n\n<p>Would return: false</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>merge</h2>\n\n<p>Merges two or more hashes together and returns the resulting hash.</p>\n\n<p>For example:</p>\n\n<pre><code>$hash1 = {&#39;one&#39; =&gt; 1, &#39;two&#39;, =&gt; 2}\n$hash2 = {&#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39;, =&gt; &#39;tres&#39;}\n$merged_hash = merge($hash1, $hash2)\n# The resulting hash is equivalent to:\n# $merged_hash = {&#39;one&#39; =&gt; 1, &#39;two&#39; =&gt; &#39;dos&#39;, &#39;three&#39; =&gt; &#39;tres&#39;}\n</code></pre>\n\n<p>When there is a duplicate key, the key in the rightmost hash will &quot;win.&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>num2bool</h2>\n\n<p>This function converts a number into a true boolean. Zero becomes false. Numbers\nhigher then 0 become true.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parsejson</h2>\n\n<p>This function accepts JSON as a string and converts into the correct Puppet\nstructure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>parseyaml</h2>\n\n<p>This function accepts YAML as a string and converts it into the correct\nPuppet structure.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>prefix</h2>\n\n<p>This function applies a prefix to all elements in an array.</p>\n\n<p><em>Examles:</em></p>\n\n<pre><code>prefix([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], &#39;p&#39;)\n</code></pre>\n\n<p>Will return: [&#39;pa&#39;,&#39;pb&#39;,&#39;pc&#39;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>range</h2>\n\n<p>When given range in the form of (start, stop) it will extrapolate a range as\nan array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>range(&quot;0&quot;, &quot;9&quot;)\n</code></pre>\n\n<p>Will return: [0,1,2,3,4,5,6,7,8,9]</p>\n\n<pre><code>range(&quot;00&quot;, &quot;09&quot;)\n</code></pre>\n\n<p>Will return: <a href=\"Zero%20padded%20strings%20are%20converted%20to%0Aintegers%20automatically\">0,1,2,3,4,5,6,7,8,9</a></p>\n\n<pre><code>range(&quot;a&quot;, &quot;c&quot;)\n</code></pre>\n\n<p>Will return: [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]</p>\n\n<pre><code>range(&quot;host01&quot;, &quot;host10&quot;)\n</code></pre>\n\n<p>Will return: [&quot;host01&quot;, &quot;host02&quot;, ..., &quot;host09&quot;, &quot;host10&quot;]</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>reverse</h2>\n\n<p>Reverses the order of a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>rstrip</h2>\n\n<p>Strips leading spaces to the right of the string.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>shuffle</h2>\n\n<p>Randomizes the order of a string or array elements.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>size</h2>\n\n<p>Returns the number of elements in a string or array.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>sort</h2>\n\n<p>Sorts strings and arrays lexically.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>squeeze</h2>\n\n<p>Returns a new string where runs of the same character that occur in this set\nare replaced by a single character.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2bool</h2>\n\n<p>This converts a string to a boolean. This attempt to convert strings that\ncontain things like: y, 1, t, true to &#39;true&#39; and strings that contain things\nlike: 0, f, n, false, no to &#39;false&#39;.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>str2saltedsha512</h2>\n\n<p>This converts a string to a salted-SHA512 password hash (which is used for OS X\nversions &gt;= 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.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strftime</h2>\n\n<p>This function returns formatted time.</p>\n\n<p><em>Examples:</em></p>\n\n<p>To return the time since epoch:</p>\n\n<pre><code>strftime(&quot;%s&quot;)\n</code></pre>\n\n<p>To return the date:</p>\n\n<pre><code>strftime(&quot;%Y-%m-%d&quot;)\n</code></pre>\n\n<p><em>Format meaning:</em></p>\n\n<pre><code>%a - The abbreviated weekday name (``Sun&#39;&#39;)\n%A - The full weekday name (``Sunday&#39;&#39;)\n%b - The abbreviated month name (``Jan&#39;&#39;)\n%B - The full month name (``January&#39;&#39;)\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</code></pre>\n\n<p>)\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 (<code>AM&#39;&#39; or</code>PM&#39;&#39;)\n %P - Meridian indicator (<code>am&#39;&#39; or</code>pm&#39;&#39;)\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 ``%&#39;&#39; character</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>strip</h2>\n\n<p>This function removes leading and trailing whitespace from a string or from\nevery string inside an array.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>strip(&quot; aaa &quot;)\n</code></pre>\n\n<p>Would result in: &quot;aaa&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>swapcase</h2>\n\n<p>This function will swap the existing case of a string.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>swapcase(&quot;aBcD&quot;)\n</code></pre>\n\n<p>Would result in: &quot;AbCd&quot;</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>time</h2>\n\n<p>This function will return the current time since epoch as an integer.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>time()\n</code></pre>\n\n<p>Will return something like: 1311972653</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>to_bytes</h2>\n\n<p>Converts the argument into bytes, for example 4 kB becomes 4096.\nTakes a single string value as an argument.</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>type</h2>\n\n<p>Returns the type when passed a variable. Type can be one of:</p>\n\n<ul>\n<li>string</li>\n<li>array</li>\n<li>hash</li>\n<li>float</li>\n<li>integer</li>\n<li><p>boolean</p></li>\n<li><p><em>Type</em>: rvalue</p></li>\n</ul>\n\n<h2>unique</h2>\n\n<p>This function will remove duplicates from strings and arrays.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>unique(&quot;aabbcc&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>abc\n</code></pre>\n\n<p>You can also use this with arrays:</p>\n\n<pre><code>unique([&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;c&quot;])\n</code></pre>\n\n<p>This returns:</p>\n\n<pre><code>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>upcase</h2>\n\n<p>Converts a string or an array of strings to uppercase.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>upcase(&quot;abcd&quot;)\n</code></pre>\n\n<p>Will return:</p>\n\n<pre><code>ABCD\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>validate_absolute_path</h2>\n\n<p>Validate the string represents an absolute path in the filesystem. This function works\nfor windows and unix style paths.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_path = &quot;C:/Program Files (x86)/Puppet Labs/Puppet&quot;\nvalidate_absolute_path($my_path)\n$my_path2 = &quot;/var/lib/puppet&quot;\nvalidate_absolute_path($my_path2)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_absolute_path(true)\nvalidate_absolute_path([ &#39;var/lib/puppet&#39;, &#39;/var/foo&#39; ])\nvalidate_absolute_path([ &#39;/var/lib/puppet&#39;, &#39;var/foo&#39; ])\n$undefined = undef\nvalidate_absolute_path($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_array</h2>\n\n<p>Validate that all passed values are array data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_array = [ &#39;one&#39;, &#39;two&#39; ]\nvalidate_array($my_array)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_array(true)\nvalidate_array(&#39;some_string&#39;)\n$undefined = undef\nvalidate_array($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_bool</h2>\n\n<p>Validate that all passed values are either true or false. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$iamtrue = true\nvalidate_bool(true)\nvalidate_bool(true, true, false, $iamtrue)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>$some_array = [ true ]\nvalidate_bool(&quot;false&quot;)\nvalidate_bool(&quot;true&quot;)\nvalidate_bool($some_array)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_hash</h2>\n\n<p>Validate that all passed values are hash data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_hash = { &#39;one&#39; =&gt; &#39;two&#39; }\nvalidate_hash($my_hash)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_hash(true)\nvalidate_hash(&#39;some_string&#39;)\n$undefined = undef\nvalidate_hash($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_re</h2>\n\n<p>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.</p>\n\n<p>If a third argument is specified, this will be the error message raised and\nseen by the user.</p>\n\n<p>The following strings will validate against the regular expressions:</p>\n\n<pre><code>validate_re(&#39;one&#39;, &#39;^one$&#39;)\nvalidate_re(&#39;one&#39;, [ &#39;^one&#39;, &#39;^two&#39; ])\n</code></pre>\n\n<p>The following strings will fail to validate, causing compilation to abort:</p>\n\n<pre><code>validate_re(&#39;one&#39;, [ &#39;^two&#39;, &#39;^three&#39; ])\n</code></pre>\n\n<p>A helpful error message can be returned like this:</p>\n\n<pre><code>validate_re($::puppetversion, &#39;^2.7&#39;, &#39;The $puppetversion fact value does not match 2.7&#39;)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_slength</h2>\n\n<p>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.</p>\n\n<p>The following values will pass:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,17)\n validate_slength([&quot;discombobulate&quot;,&quot;moo&quot;],17)</p>\n\n<p>The following valueis will not:</p>\n\n<p>validate_slength(&quot;discombobulate&quot;,1)\n validate_slength([&quot;discombobulate&quot;,&quot;thermometer&quot;],5)</p>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>validate_string</h2>\n\n<p>Validate that all passed values are string data structures. Abort catalog\ncompilation if any value fails this check.</p>\n\n<p>The following values will pass:</p>\n\n<pre><code>$my_string = &quot;one two&quot;\nvalidate_string($my_string, &#39;three&#39;)\n</code></pre>\n\n<p>The following values will fail, causing compilation to abort:</p>\n\n<pre><code>validate_string(true)\nvalidate_string([ &#39;some&#39;, &#39;array&#39; ])\n$undefined = undef\nvalidate_string($undefined)\n</code></pre>\n\n<ul>\n<li><em>Type</em>: statement</li>\n</ul>\n\n<h2>values</h2>\n\n<p>When given a hash this function will return the values of that hash.</p>\n\n<p><em>Examples:</em></p>\n\n<pre><code>$hash = {\n &#39;a&#39; =&gt; 1,\n &#39;b&#39; =&gt; 2,\n &#39;c&#39; =&gt; 3,\n}\nvalues($hash)\n</code></pre>\n\n<p>This example would return:</p>\n\n<pre><code>[1,2,3]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>values_at</h2>\n\n<p>Finds value inside an array based on location.</p>\n\n<p>The first argument is the array you want to analyze, and the second element can\nbe a combination of:</p>\n\n<ul>\n<li>A single numeric index</li>\n<li>A range in the form of &#39;start-stop&#39; (eg. 4-9)</li>\n<li>An array combining the above</li>\n</ul>\n\n<p><em>Examples</em>:</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], 2)\n</code></pre>\n\n<p>Would return [&#39;c&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;], [&quot;0-1&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;b&#39;].</p>\n\n<pre><code>values_at([&#39;a&#39;,&#39;b&#39;,&#39;c&#39;,&#39;d&#39;,&#39;e&#39;], [0, &quot;2-3&quot;])\n</code></pre>\n\n<p>Would return [&#39;a&#39;,&#39;c&#39;,&#39;d&#39;].</p>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n\n<h2>zip</h2>\n\n<p>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.</p>\n\n<p><em>Example:</em></p>\n\n<pre><code>zip([&#39;1&#39;,&#39;2&#39;,&#39;3&#39;],[&#39;4&#39;,&#39;5&#39;,&#39;6&#39;])\n</code></pre>\n\n<p>Would result in:</p>\n\n<pre><code>[&quot;1&quot;, &quot;4&quot;], [&quot;2&quot;, &quot;5&quot;], [&quot;3&quot;, &quot;6&quot;]\n</code></pre>\n\n<ul>\n<li><em>Type</em>: rvalue</li>\n</ul>\n</section>",
1212
+ "changelog": "<section class=\"plaintext\"><pre>2012-11-28 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * Add reject() function (a79b2cd)\n\n2012-09-18 - Chad Metcalf &lt;chad@wibidata.com&gt; - 3.2.0\n * Add an ensure_packages function. (8a8c09e)\n\n2012-11-23 - Erik Dalén &lt;dalen@spotify.com&gt; - 3.2.0\n * (#17797) min() and max() functions (9954133)\n\n2012-05-23 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 3.2.0\n * (#14670) autorequire a file_line resource&#x27;s path (dfcee63)\n\n2012-11-19 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Add join_keys_to_values function (ee0f2b3)\n\n2012-11-17 - Joshua Harlan Lifton &lt;lifton@puppetlabs.com&gt; - 3.2.0\n * Extend delete function for strings and hashes (7322e4d)\n\n2012-08-03 - Gary Larizza &lt;gary@puppetlabs.com&gt; - 3.2.0\n * Add the pick() function (ba6dd13)\n\n2012-03-20 - Wil Cooley &lt;wcooley@pdx.edu&gt; - 3.2.0\n * (#13974) Add predicate functions for interface facts (f819417)\n\n2012-11-06 - Joe Julian &lt;me@joejulian.name&gt; - 3.2.0\n * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.1.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 3.1.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 3.0.1\n * Fix accidental removal of facts_dot_d.rb in 3.0.0 release\n\n2012-08-16 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 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 &lt;dan@puppetlabs.com&gt; - 3.0.0\n * Add function ensure_resource and defined_with_params (ba789de)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 3.0.0\n * (#2157) Remove facter_dot_d for compatibility with external facts (f92574f)\n\n2012-04-10 - Chris Price &lt;chris@puppetlabs.com&gt; - 3.0.0\n * (#13693) moving logic from local spec_helper to puppetlabs_spec_helper (85f96df)\n\n2012-10-25 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.1\n * (maint) Fix spec failures resulting from Facter API changes (97f836f)\n\n2012-10-23 - Matthaus Owens &lt;matthaus@puppetlabs.com&gt; - 2.5.0\n * Add PE facts to stdlib (cdf3b05)\n\n2012-08-15 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Explicitly load functions used by ensure_resource (9fc3063)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add better docs about duplicate resource failures (97d327a)\n\n2012-08-13 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Handle undef for parameter argument (4f8b133)\n\n2012-08-07 - Dan Bode &lt;dan@puppetlabs.com&gt; - 2.5.0\n * Add function ensure_resource and defined_with_params (a0cb8cd)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Disable tests that fail on 2.6.x due to #15912 (c81496e)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * (Maint) Fix mis-use of rvalue functions as statements (4492913)\n\n2012-08-20 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.5.0\n * Add .rspec file to repo root (88789e8)\n\n2012-06-07 - Chris Price &lt;chris@puppetlabs.com&gt; - 2.4.0\n * Add support for a &#x27;match&#x27; parameter to file_line (a06c0d8)\n\n2012-08-07 - Erik Dalén &lt;dalen@spotify.com&gt; - 2.4.0\n * (#15872) Add to_bytes function (247b69c)\n\n2012-07-19 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.4.0\n * (Maint) use PuppetlabsSpec::PuppetInternals.scope (main) (deafe88)\n\n2012-07-10 - Hailee Kenney &lt;hailee@puppetlabs.com&gt; - 2.4.0\n * (#2157) Make facts_dot_d compatible with external facts (5fb0ddc)\n\n2012-03-16 - Steve Traylen &lt;steve.traylen@cern.ch&gt; - 2.4.0\n * (#13205) Rotate array&#x2F;string randomley based on fqdn, fqdn_rotate() (fef247b)\n\n2012-05-22 - Peter Meier &lt;peter.meier@immerda.ch&gt; - 2.3.3\n * fix regression in #11017 properly (f0a62c7)\n\n2012-05-10 - Jeff McCune &lt;jeff@puppetlabs.com&gt; - 2.3.3\n * Fix spec tests using the new spec_helper (7d34333)\n\n2012-05-10 - Puppet Labs &lt;support@puppetlabs.com&gt; - 2.3.2\n * Make file_line default to ensure =&gt; 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.3.1\n* (#13091) Fix LoadError bug with puppet apply and puppet_vardir fact\n\n2012-03-12 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.2.1\n* Documentation only release for the Forge\n\n2011-12-30 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.2\n* Documentation only release for PE 2.0.x\n\n2011-11-08 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 2.1.1\n* Change facts.d paths to match Facter 2.0 paths.\n* &#x2F;etc&#x2F;facter&#x2F;facts.d\n* &#x2F;etc&#x2F;puppetlabs&#x2F;facter&#x2F;facts.d\n\n2011-08-17 Puppet Labs &lt;support@puppetlabs.com&gt; - 2.1.0\n* Add R.I. Pienaar&#x27;s facts.d custom facter fact\n* facts defined in &#x2F;etc&#x2F;facts.d and &#x2F;etc&#x2F;puppetlabs&#x2F;facts.d are\n automatically loaded now.\n\n2011-08-04 Puppet Labs &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;support@puppetlabs.com&gt; - 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 &lt;jeff@puppetlabs.com&gt; - 0.1.7\n* Add validate_hash() and getvar() functions\n\n2011-06-15 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.6\n* Add anchor resource type to provide containment for composite classes\n\n2011-06-03 Jeff McCune &lt;jeff@puppetlabs.com&gt; - 0.1.5\n* Add validate_bool() function to stdlib\n\n0.1.4 2011-05-26 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Move most stages after main\n\n0.1.3 2011-05-25 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add validate_re() function\n\n0.1.2 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Update to add annotated tag\n\n0.1.1 2011-05-24 Jeff McCune &lt;jeff@puppetlabs.com&gt;\n* Add stdlib::stages class with a standard set of stages\n</pre></section>",
1213
1213
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1214
1214
  "created_at": "2012-11-28 14:53:03 -0800",
1215
1215
  "updated_at": "2012-11-28 14:53:03 -0800",
@@ -1316,7 +1316,7 @@
1316
1316
  "file_size": 21622,
1317
1317
  "file_md5": "8bb36e43b8755bbed80dc6ab58f7dba4",
1318
1318
  "downloads": 38345,
1319
- "readme": "<section class=\"markdown\"><h1>apt</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apt\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h2>Description</h2>\n\n<h1>Provides helpful definitions for dealing with Apt.</h1>\n\n<h2>Overview</h2>\n\n<p>The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. </p>\n\n<h2>Module Description</h2>\n\n<p>APT automates obtaining and installing software packages on *nix systems. </p>\n\n<h2>Setup</h2>\n\n<p><strong>What APT affects:</strong></p>\n\n<ul>\n<li>package/service/configuration files for APT </li>\n<li>your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory\n\n<ul>\n<li>NOTE: Setting the <code>purge_sources_list</code> and <code>purge_sources_list_d</code> parameters to &#39;true&#39; will destroy any existing content that was not declared with Puppet. The default for these parameters is &#39;false&#39;.</li>\n</ul></li>\n<li>system repositories</li>\n<li>authentication keys</li>\n<li>wget (optional)</li>\n</ul>\n\n<h3>Beginning with APT</h3>\n\n<p>To begin using the APT module with default parameters, declare the class</p>\n\n<pre><code>class { &#39;apt&#39;: }\n</code></pre>\n\n<p>Puppet code that uses anything from the APT module requires that the core apt class be declared. </p>\n\n<h2>Usage</h2>\n\n<p>Using the APT module consists predominantly in declaring classes that provide desired functionality and features. </p>\n\n<h3>apt</h3>\n\n<p><code>apt</code> 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.</p>\n\n<p>The parameters for <code>apt</code> are not required in general and are predominantly for development environment use-cases.</p>\n\n<pre><code>class { &#39;apt&#39;:\n always_apt_update =&gt; false,\n disable_keys =&gt; undef,\n proxy_host =&gt; false,\n proxy_port =&gt; &#39;8080&#39;,\n purge_sources_list =&gt; false,\n purge_sources_list_d =&gt; false,\n purge_preferences_d =&gt; false\n}\n</code></pre>\n\n<p>Puppet will manage your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory but will do its best to respect existing content. </p>\n\n<p>If you declare your apt class with <code>purge_sources_list</code> and <code>purge_sources_list_d</code> set to &#39;true&#39;, Puppet will unapologetically purge any existing content it finds that wasn&#39;t declared with Puppet. </p>\n\n<h3>apt::builddep</h3>\n\n<p>Installs the build depends of a specified package.</p>\n\n<pre><code>apt::builddep { &#39;glusterfs-server&#39;: }\n</code></pre>\n\n<h3>apt::force</h3>\n\n<p>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.</p>\n\n<pre><code>apt::force { &#39;glusterfs-server&#39;:\n release =&gt; &#39;unstable&#39;,\n version =&gt; &#39;3.0.3&#39;,\n require =&gt; Apt::Source[&#39;debian_unstable&#39;],\n}\n</code></pre>\n\n<h3>apt::key</h3>\n\n<p>Adds a key to the list of keys used by APT to authenticate packages.</p>\n\n<pre><code>apt::key { &#39;puppetlabs&#39;:\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n\napt::key { &#39;jenkins&#39;:\n key =&gt; &#39;D50582E6&#39;,\n key_source =&gt; &#39;http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key&#39;,\n}\n</code></pre>\n\n<p>Note that use of <code>key_source</code> requires wget to be installed and working.</p>\n\n<h3>apt::pin</h3>\n\n<p>Adds an apt pin for a certain release.</p>\n\n<pre><code>apt::pin { &#39;karmic&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-updates&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-security&#39;: priority =&gt; 700 }\n</code></pre>\n\n<p>Note you can also specifying more complex pins using distribution properties.</p>\n\n<pre><code>apt::pin { &#39;stable&#39;:\n priority =&gt; -10,\n originator =&gt; &#39;Debian&#39;,\n release_version =&gt; &#39;3.0&#39;,\n component =&gt; &#39;main&#39;,\n label =&gt; &#39;Debian&#39;\n}\n</code></pre>\n\n<h3>apt::ppa</h3>\n\n<p>Adds a ppa repository using <code>add-apt-repository</code>.</p>\n\n<pre><code>apt::ppa { &#39;ppa:drizzle-developers/ppa&#39;: }\n</code></pre>\n\n<h3>apt::release</h3>\n\n<p>Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.</p>\n\n<pre><code>class { &#39;apt::release&#39;:\n release_id =&gt; &#39;precise&#39;,\n}\n</code></pre>\n\n<h3>apt::source</h3>\n\n<p>Adds an apt source to <code>/etc/apt/sources.list.d/</code>.</p>\n\n<pre><code>apt::source { &#39;debian_unstable&#39;:\n location =&gt; &#39;http://debian.mirror.iweb.ca/debian/&#39;,\n release =&gt; &#39;unstable&#39;,\n repos =&gt; &#39;main contrib non-free&#39;,\n required_packages =&gt; &#39;debian-keyring debian-archive-keyring&#39;,\n key =&gt; &#39;55BE302B&#39;,\n key_server =&gt; &#39;subkeys.pgp.net&#39;,\n pin =&gt; &#39;-10&#39;,\n include_src =&gt; true\n}\n</code></pre>\n\n<p>If you would like to configure your system so the source is the Puppet Labs APT repository</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<h3>Testing</h3>\n\n<p>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.</p>\n\n<h4>Example Test</h4>\n\n<p>This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module&#39;s test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<p>This resource creates an apt source named puppetlabs and gives Puppet information about the repository&#39;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.</p>\n\n<p>Check your smoke test for syntax errors</p>\n\n<pre><code>$ puppet parser validate tests/puppetlabs-apt.pp\n</code></pre>\n\n<p>If you receive no output from that command, it means nothing is wrong. Then apply the code</p>\n\n<pre><code>$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as &#39;{md5}3be1da4923fb910f1102a233b77e982e&#39;\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 &#39;refresh&#39; from 1 events&gt;\n</code></pre>\n\n<p>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. </p>\n\n<h2>Implementation</h2>\n\n<h3>apt::backports</h3>\n\n<p>Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to <code>$lsbdistcodename</code>. Setting this manually can cause undefined behavior (read: universe exploding).</p>\n\n<h2>Limitations</h2>\n\n<p>This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. </p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h2>Contributors</h2>\n\n<p>A lot of great people have contributed to this module. A somewhat current list follows:</p>\n\n<ul>\n<li>Ben Godfrey <a href=\"mailto:ben.godfrey@wonga.com\">ben.godfrey@wonga.com</a></li>\n<li>Branan Purvine-Riley <a href=\"mailto:branan@puppetlabs.com\">branan@puppetlabs.com</a></li>\n<li>Christian G. Warden <a href=\"mailto:cwarden@xerus.org\">cwarden@xerus.org</a><br></li>\n<li>Dan Bode <a href=\"mailto:bodepd@gmail.com\">bodepd@gmail.com</a> <a href=\"mailto:dan@puppetlabs.com\">dan@puppetlabs.com</a><br></li>\n<li>Garrett Honeycutt <a href=\"mailto:github@garretthoneycutt.com\">github@garretthoneycutt.com</a><br></li>\n<li>Jeff Wallace <a href=\"mailto:jeff@evolvingweb.ca\">jeff@evolvingweb.ca</a> <a href=\"mailto:jeff@tjwallace.ca\">jeff@tjwallace.ca</a><br></li>\n<li>Ken Barber <a href=\"mailto:ken@bob.sh\">ken@bob.sh</a><br></li>\n<li>Matthaus Litteken <a href=\"mailto:matthaus@puppetlabs.com\">matthaus@puppetlabs.com</a> <a href=\"mailto:mlitteken@gmail.com\">mlitteken@gmail.com</a><br></li>\n<li>Matthias Pigulla <a href=\"mailto:mp@webfactory.de\">mp@webfactory.de</a><br></li>\n<li>Monty Taylor <a href=\"mailto:mordred@inaugust.com\">mordred@inaugust.com</a><br></li>\n<li>Peter Drake <a href=\"mailto:pdrake@allplayers.com\">pdrake@allplayers.com</a><br></li>\n<li>Reid Vandewiele <a href=\"mailto:marut@cat.pdx.edu\">marut@cat.pdx.edu</a><br></li>\n<li>Robert Navarro <a href=\"mailto:rnavarro@phiivo.com\">rnavarro@phiivo.com</a><br></li>\n<li>Ryan Coleman <a href=\"mailto:ryan@puppetlabs.com\">ryan@puppetlabs.com</a><br></li>\n<li>Scott McLeod <a href=\"mailto:scott.mcleod@theice.com\">scott.mcleod@theice.com</a><br></li>\n<li>Spencer Krum <a href=\"mailto:spencer@puppetlabs.com\">spencer@puppetlabs.com</a><br></li>\n<li>William Van Hevelingen <a href=\"mailto:blkperl@cat.pdx.edu\">blkperl@cat.pdx.edu</a> <a href=\"mailto:wvan13@gmail.com\">wvan13@gmail.com</a><br></li>\n<li>Zach Leslie <a href=\"mailto:zach@puppetlabs.com\">zach@puppetlabs.com</a><br></li>\n</ul>\n</section>",
1319
+ "readme": "<section class=\"markdown\"><h1>apt</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apt\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h2>Description</h2>\n\n<h1>Provides helpful definitions for dealing with Apt.</h1>\n\n<h2>Overview</h2>\n\n<p>The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. </p>\n\n<h2>Module Description</h2>\n\n<p>APT automates obtaining and installing software packages on *nix systems. </p>\n\n<h2>Setup</h2>\n\n<p><strong>What APT affects:</strong></p>\n\n<ul>\n<li>package/service/configuration files for APT </li>\n<li>your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory\n\n<ul>\n<li>NOTE: Setting the <code>purge_sources_list</code> and <code>purge_sources_list_d</code> parameters to &#39;true&#39; will destroy any existing content that was not declared with Puppet. The default for these parameters is &#39;false&#39;.</li>\n</ul></li>\n<li>system repositories</li>\n<li>authentication keys</li>\n<li>wget (optional)</li>\n</ul>\n\n<h3>Beginning with APT</h3>\n\n<p>To begin using the APT module with default parameters, declare the class</p>\n\n<pre><code>class { &#39;apt&#39;: }\n</code></pre>\n\n<p>Puppet code that uses anything from the APT module requires that the core apt class be declared. </p>\n\n<h2>Usage</h2>\n\n<p>Using the APT module consists predominantly in declaring classes that provide desired functionality and features. </p>\n\n<h3>apt</h3>\n\n<p><code>apt</code> 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.</p>\n\n<p>The parameters for <code>apt</code> are not required in general and are predominantly for development environment use-cases.</p>\n\n<pre><code>class { &#39;apt&#39;:\n always_apt_update =&gt; false,\n disable_keys =&gt; undef,\n proxy_host =&gt; false,\n proxy_port =&gt; &#39;8080&#39;,\n purge_sources_list =&gt; false,\n purge_sources_list_d =&gt; false,\n purge_preferences_d =&gt; false\n}\n</code></pre>\n\n<p>Puppet will manage your system&#39;s <code>sources.list</code> file and <code>sources.list.d</code> directory but will do its best to respect existing content. </p>\n\n<p>If you declare your apt class with <code>purge_sources_list</code> and <code>purge_sources_list_d</code> set to &#39;true&#39;, Puppet will unapologetically purge any existing content it finds that wasn&#39;t declared with Puppet. </p>\n\n<h3>apt::builddep</h3>\n\n<p>Installs the build depends of a specified package.</p>\n\n<pre><code>apt::builddep { &#39;glusterfs-server&#39;: }\n</code></pre>\n\n<h3>apt::force</h3>\n\n<p>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.</p>\n\n<pre><code>apt::force { &#39;glusterfs-server&#39;:\n release =&gt; &#39;unstable&#39;,\n version =&gt; &#39;3.0.3&#39;,\n require =&gt; Apt::Source[&#39;debian_unstable&#39;],\n}\n</code></pre>\n\n<h3>apt::key</h3>\n\n<p>Adds a key to the list of keys used by APT to authenticate packages.</p>\n\n<pre><code>apt::key { &#39;puppetlabs&#39;:\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n\napt::key { &#39;jenkins&#39;:\n key =&gt; &#39;D50582E6&#39;,\n key_source =&gt; &#39;http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key&#39;,\n}\n</code></pre>\n\n<p>Note that use of <code>key_source</code> requires wget to be installed and working.</p>\n\n<h3>apt::pin</h3>\n\n<p>Adds an apt pin for a certain release.</p>\n\n<pre><code>apt::pin { &#39;karmic&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-updates&#39;: priority =&gt; 700 }\napt::pin { &#39;karmic-security&#39;: priority =&gt; 700 }\n</code></pre>\n\n<p>Note you can also specifying more complex pins using distribution properties.</p>\n\n<pre><code>apt::pin { &#39;stable&#39;:\n priority =&gt; -10,\n originator =&gt; &#39;Debian&#39;,\n release_version =&gt; &#39;3.0&#39;,\n component =&gt; &#39;main&#39;,\n label =&gt; &#39;Debian&#39;\n}\n</code></pre>\n\n<h3>apt::ppa</h3>\n\n<p>Adds a ppa repository using <code>add-apt-repository</code>.</p>\n\n<pre><code>apt::ppa { &#39;ppa:drizzle-developers/ppa&#39;: }\n</code></pre>\n\n<h3>apt::release</h3>\n\n<p>Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu.</p>\n\n<pre><code>class { &#39;apt::release&#39;:\n release_id =&gt; &#39;precise&#39;,\n}\n</code></pre>\n\n<h3>apt::source</h3>\n\n<p>Adds an apt source to <code>/etc/apt/sources.list.d/</code>.</p>\n\n<pre><code>apt::source { &#39;debian_unstable&#39;:\n location =&gt; &#39;http://debian.mirror.iweb.ca/debian/&#39;,\n release =&gt; &#39;unstable&#39;,\n repos =&gt; &#39;main contrib non-free&#39;,\n required_packages =&gt; &#39;debian-keyring debian-archive-keyring&#39;,\n key =&gt; &#39;55BE302B&#39;,\n key_server =&gt; &#39;subkeys.pgp.net&#39;,\n pin =&gt; &#39;-10&#39;,\n include_src =&gt; true\n}\n</code></pre>\n\n<p>If you would like to configure your system so the source is the Puppet Labs APT repository</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<h3>Testing</h3>\n\n<p>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.</p>\n\n<h4>Example Test</h4>\n\n<p>This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module&#39;s test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key</p>\n\n<pre><code>apt::source { &#39;puppetlabs&#39;:\n location =&gt; &#39;http://apt.puppetlabs.com&#39;,\n repos =&gt; &#39;main&#39;,\n key =&gt; &#39;4BD6EC30&#39;,\n key_server =&gt; &#39;pgp.mit.edu&#39;,\n}\n</code></pre>\n\n<p>This resource creates an apt source named puppetlabs and gives Puppet information about the repository&#39;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.</p>\n\n<p>Check your smoke test for syntax errors</p>\n\n<pre><code>$ puppet parser validate tests/puppetlabs-apt.pp\n</code></pre>\n\n<p>If you receive no output from that command, it means nothing is wrong. Then apply the code</p>\n\n<pre><code>$ puppet apply --verbose tests/puppetlabs-apt.pp\nnotice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as &#39;{md5}3be1da4923fb910f1102a233b77e982e&#39;\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 &#39;refresh&#39; from 1 events&gt;\n</code></pre>\n\n<p>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. </p>\n\n<h2>Implementation</h2>\n\n<h3>apt::backports</h3>\n\n<p>Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to <code>$lsbdistcodename</code>. Setting this manually can cause undefined behavior (read: universe exploding).</p>\n\n<h2>Limitations</h2>\n\n<p>This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. </p>\n\n<h2>Development</h2>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h2>Contributors</h2>\n\n<p>A lot of great people have contributed to this module. A somewhat current list follows:</p>\n\n<ul>\n<li>Ben Godfrey <a href=\"mailto:ben.godfrey@wonga.com\">ben.godfrey@wonga.com</a></li>\n<li>Branan Purvine-Riley <a href=\"mailto:branan@puppetlabs.com\">branan@puppetlabs.com</a></li>\n<li>Christian G. Warden <a href=\"mailto:cwarden@xerus.org\">cwarden@xerus.org</a><br></li>\n<li>Dan Bode <a href=\"mailto:bodepd@gmail.com\">bodepd@gmail.com</a> <a href=\"mailto:dan@puppetlabs.com\">dan@puppetlabs.com</a><br></li>\n<li>Garrett Honeycutt <a href=\"mailto:github@garretthoneycutt.com\">github@garretthoneycutt.com</a><br></li>\n<li>Jeff Wallace <a href=\"mailto:jeff@evolvingweb.ca\">jeff@evolvingweb.ca</a> <a href=\"mailto:jeff@tjwallace.ca\">jeff@tjwallace.ca</a><br></li>\n<li>Ken Barber <a href=\"mailto:ken@bob.sh\">ken@bob.sh</a><br></li>\n<li>Matthaus Litteken <a href=\"mailto:matthaus@puppetlabs.com\">matthaus@puppetlabs.com</a> <a href=\"mailto:mlitteken@gmail.com\">mlitteken@gmail.com</a><br></li>\n<li>Matthias Pigulla <a href=\"mailto:mp@webfactory.de\">mp@webfactory.de</a><br></li>\n<li>Monty Taylor <a href=\"mailto:mordred@inaugust.com\">mordred@inaugust.com</a><br></li>\n<li>Peter Drake <a href=\"mailto:pdrake@allplayers.com\">pdrake@allplayers.com</a><br></li>\n<li>Reid Vandewiele <a href=\"mailto:marut@cat.pdx.edu\">marut@cat.pdx.edu</a><br></li>\n<li>Robert Navarro <a href=\"mailto:rnavarro@phiivo.com\">rnavarro@phiivo.com</a><br></li>\n<li>Ryan Coleman <a href=\"mailto:ryan@puppetlabs.com\">ryan@puppetlabs.com</a><br></li>\n<li>Scott McLeod <a href=\"mailto:scott.mcleod@theice.com\">scott.mcleod@theice.com</a><br></li>\n<li>Spencer Krum <a href=\"mailto:spencer@puppetlabs.com\">spencer@puppetlabs.com</a><br></li>\n<li>William Van Hevelingen <a href=\"mailto:blkperl@cat.pdx.edu\">blkperl@cat.pdx.edu</a> <a href=\"mailto:wvan13@gmail.com\">wvan13@gmail.com</a><br></li>\n<li>Zach Leslie <a href=\"mailto:zach@puppetlabs.com\">zach@puppetlabs.com</a><br></li>\n</ul>\n</section>",
1320
1320
  "changelog": "<section class=\"plaintext\"><pre>## 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 &lt;info@puppetlabs.com&gt; - 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 &lt;info@puppetlabs.com&gt; - 0.0.3\n * only invoke apt-get update once\n * only install python-software-properties if a ppa is added\n * support &#x27;ensure =&gt; absent&#x27; 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 &lt;info@puppetlabs.com&gt; - 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 &amp; 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 &lt;info@puppetlabs.com&gt; - 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 =&gt; 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 &quot;repositories&quot;\n1be7457 Fix (#10451) - apt::ppa fails to &quot;apt-get update&quot; 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</pre></section>",
1321
1321
  "license": "<section class=\"plaintext\"><pre>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 &quot;Software&quot;), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and&#x2F;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 &quot;AS IS&quot;, 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</pre></section>",
1322
1322
  "created_at": "2013-07-05 10:27:35 -0700",
@@ -1547,7 +1547,7 @@
1547
1547
  "file_size": 31302,
1548
1548
  "file_md5": "89fa11aef710c060e0bf9f9ff2cae455",
1549
1549
  "downloads": 25919,
1550
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1550
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1551
1551
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
1552
1552
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1553
1553
  "created_at": "2013-03-28 15:44:52 -0700",
@@ -1810,7 +1810,7 @@
1810
1810
  "file_size": 29805,
1811
1811
  "file_md5": "2556a9f30a3d817dc5f486a7eec7a9be",
1812
1812
  "downloads": 21894,
1813
- "readme": "<section class=\"markdown\"><h2>puppetlabs-firewall module</h2>\n\n<h2>User Guide</h2>\n\n<h3>Overview</h3>\n\n<p>This type provides the capability to manage firewall rules within \npuppet.</p>\n\n<p>Current support includes:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n</ul>\n\n<h3>Disclaimer</h3>\n\n<p>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.</p>\n\n<p>Please see the included Apache Software License for more legal details\nregarding warranty.</p>\n\n<p>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.</p>\n\n<h3>Downloading</h3>\n\n<p>If you are intending to use this module it is recommended you obtain this from the\nforge and not Github:</p>\n\n<pre><code>http://forge.puppetlabs.com/puppetlabs/firewall\n</code></pre>\n\n<p>The forge releases are vetted releases. Using code from Github means you are\naccessing a development version or early release of the code.</p>\n\n<h3>Installation</h3>\n\n<p>Using the puppet-module gem, you can install it into your Puppet&#39;s \nmodule path. If you are not sure where your module path is try \nthis command:</p>\n\n<pre><code>puppet --configprint modulepath\n</code></pre>\n\n<p>Firstly change into that directory. For example:</p>\n\n<pre><code>cd /etc/puppet/modules\n</code></pre>\n\n<p>Then run the module tool:</p>\n\n<pre><code>puppet-module install puppetlabs-firewall\n</code></pre>\n\n<p>This module uses both Ruby based providers so your Puppet configuration\n(ie. puppet.conf) must include the following items:</p>\n\n<pre><code>[agent]\npluginsync = true\n</code></pre>\n\n<p>The module will not operate normally without these features enabled for the\nclient.</p>\n\n<p>If you are using environments or with certain versions of Puppet you may\nneed to run Puppet on the master first:</p>\n\n<pre><code>puppet agent -t --pluginsync --environment production\n</code></pre>\n\n<p>You may also need to restart Apache, although this shouldn&#39;t always be the\ncase.</p>\n\n<h3>Examples</h3>\n\n<p>Basic accept ICMP request example:</p>\n\n<pre><code>firewall { &quot;000 accept all icmp requests&quot;:\n proto =&gt; &quot;icmp&quot;,\n action =&gt; &quot;accept&quot;,\n}\n</code></pre>\n\n<p>Drop all:</p>\n\n<pre><code>firewall { &quot;999 drop all other requests&quot;:\n action =&gt; &quot;drop&quot;,\n}\n</code></pre>\n\n<p>Source NAT example (perfect for a virtualization host):</p>\n\n<pre><code>firewall { &#39;100 snat for network foo2&#39;:\n chain =&gt; &#39;POSTROUTING&#39;,\n jump =&gt; &#39;MASQUERADE&#39;,\n proto =&gt; &#39;all&#39;,\n outiface =&gt; &quot;eth0&quot;,\n source =&gt; [&#39;10.1.2.0/24&#39;],\n table =&gt; &#39;nat&#39;,\n}\n</code></pre>\n\n<p>You can make firewall rules persistent with the following iptables example:</p>\n\n<pre><code>exec { &quot;persist-firewall&quot;:\n command =&gt; $operatingsystem ? {\n &quot;debian&quot; =&gt; &quot;/sbin/iptables-save &gt; /etc/iptables/rules.v4&quot;,\n /(RedHat|CentOS)/ =&gt; &quot;/sbin/iptables-save &gt; /etc/sysconfig/iptables&quot;,\n }\n refreshonly =&gt; true,\n}\nFirewall {\n notify =&gt; Exec[&quot;persist-firewall&quot;]\n}\n</code></pre>\n\n<p>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.</p>\n\n<pre><code>class my_fw::drop {\n iptables { &quot;999 drop all&quot;:\n action =&gt; &quot;drop&quot;\n }\n}\n\nstage { pre: before =&gt; Stage[main] }\nstage { post: require =&gt; Stage[main] }\n\nclass { &quot;my_fw::drop&quot;: stage =&gt; &quot;post&quot; }\n</code></pre>\n\n<p>By placing the &#39;my_fw::drop&#39; class in the post stage it will always be inserted\nlast thereby avoiding locking you out before the accept rules are inserted.</p>\n\n<h3>Further documentation</h3>\n\n<p>More documentation is available from the forge for each release:</p>\n\n<pre><code>&lt;http://forge.puppetlabs.com/puppetlabs/firewall&gt;\n</code></pre>\n\n<p>Or you can access the inline documentation:</p>\n\n<pre><code>puppet describe firewall\n</code></pre>\n\n<p>Or:</p>\n\n<pre><code>puppet doc -r type\n</code></pre>\n\n<p>(and search for firewall).</p>\n\n<h3>Bugs</h3>\n\n<p>Bugs can be reported in the Puppetlabs Redmine project:</p>\n\n<pre><code>&lt;http://projects.puppetlabs.com/projects/modules/&gt;\n</code></pre>\n\n<h2>Developer Guide</h2>\n\n<h3>Contributing</h3>\n\n<p>Make sure you read CONTRIBUTING.md before contributing.</p>\n\n<p>Currently we support:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n</ul>\n\n<p>But plans are to support lots of other firewall implementations:</p>\n\n<ul>\n<li>FreeBSD (ipf)</li>\n<li>Mac OS X (ipfw)</li>\n<li>OpenBSD (pf)</li>\n<li>Cisco (ASA and basic access lists)</li>\n</ul>\n\n<p>If you have knowledge in these technology, know how to code and wish to contribute \nto this project we would welcome the help.</p>\n\n<h3>Testing</h3>\n\n<p>Make sure you have:</p>\n\n<pre><code>rake\n</code></pre>\n\n<p>Install the necessary gems:</p>\n\n<pre><code>gem install rspec\n</code></pre>\n\n<p>And run the tests from the root of the source code:</p>\n\n<pre><code>rake test\n</code></pre>\n</section>",
1813
+ "readme": "<section class=\"markdown\"><h2>puppetlabs-firewall module</h2>\n\n<h2>User Guide</h2>\n\n<h3>Overview</h3>\n\n<p>This type provides the capability to manage firewall rules within \npuppet.</p>\n\n<p>Current support includes:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n</ul>\n\n<h3>Disclaimer</h3>\n\n<p>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.</p>\n\n<p>Please see the included Apache Software License for more legal details\nregarding warranty.</p>\n\n<p>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.</p>\n\n<h3>Downloading</h3>\n\n<p>If you are intending to use this module it is recommended you obtain this from the\nforge and not Github:</p>\n\n<pre><code>http://forge.puppetlabs.com/puppetlabs/firewall\n</code></pre>\n\n<p>The forge releases are vetted releases. Using code from Github means you are\naccessing a development version or early release of the code.</p>\n\n<h3>Installation</h3>\n\n<p>Using the puppet-module gem, you can install it into your Puppet&#39;s \nmodule path. If you are not sure where your module path is try \nthis command:</p>\n\n<pre><code>puppet --configprint modulepath\n</code></pre>\n\n<p>Firstly change into that directory. For example:</p>\n\n<pre><code>cd /etc/puppet/modules\n</code></pre>\n\n<p>Then run the module tool:</p>\n\n<pre><code>puppet-module install puppetlabs-firewall\n</code></pre>\n\n<p>This module uses both Ruby based providers so your Puppet configuration\n(ie. puppet.conf) must include the following items:</p>\n\n<pre><code>[agent]\npluginsync = true\n</code></pre>\n\n<p>The module will not operate normally without these features enabled for the\nclient.</p>\n\n<p>If you are using environments or with certain versions of Puppet you may\nneed to run Puppet on the primary Puppet server first:</p>\n\n<pre><code>puppet agent -t --pluginsync --environment production\n</code></pre>\n\n<p>You may also need to restart Apache, although this shouldn&#39;t always be the\ncase.</p>\n\n<h3>Examples</h3>\n\n<p>Basic accept ICMP request example:</p>\n\n<pre><code>firewall { &quot;000 accept all icmp requests&quot;:\n proto =&gt; &quot;icmp&quot;,\n action =&gt; &quot;accept&quot;,\n}\n</code></pre>\n\n<p>Drop all:</p>\n\n<pre><code>firewall { &quot;999 drop all other requests&quot;:\n action =&gt; &quot;drop&quot;,\n}\n</code></pre>\n\n<p>Source NAT example (perfect for a virtualization host):</p>\n\n<pre><code>firewall { &#39;100 snat for network foo2&#39;:\n chain =&gt; &#39;POSTROUTING&#39;,\n jump =&gt; &#39;MASQUERADE&#39;,\n proto =&gt; &#39;all&#39;,\n outiface =&gt; &quot;eth0&quot;,\n source =&gt; [&#39;10.1.2.0/24&#39;],\n table =&gt; &#39;nat&#39;,\n}\n</code></pre>\n\n<p>You can make firewall rules persistent with the following iptables example:</p>\n\n<pre><code>exec { &quot;persist-firewall&quot;:\n command =&gt; $operatingsystem ? {\n &quot;debian&quot; =&gt; &quot;/sbin/iptables-save &gt; /etc/iptables/rules.v4&quot;,\n /(RedHat|CentOS)/ =&gt; &quot;/sbin/iptables-save &gt; /etc/sysconfig/iptables&quot;,\n }\n refreshonly =&gt; true,\n}\nFirewall {\n notify =&gt; Exec[&quot;persist-firewall&quot;]\n}\n</code></pre>\n\n<p>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.</p>\n\n<pre><code>class my_fw::drop {\n iptables { &quot;999 drop all&quot;:\n action =&gt; &quot;drop&quot;\n }\n}\n\nstage { pre: before =&gt; Stage[main] }\nstage { post: require =&gt; Stage[main] }\n\nclass { &quot;my_fw::drop&quot;: stage =&gt; &quot;post&quot; }\n</code></pre>\n\n<p>By placing the &#39;my_fw::drop&#39; class in the post stage it will always be inserted\nlast thereby avoiding locking you out before the accept rules are inserted.</p>\n\n<h3>Further documentation</h3>\n\n<p>More documentation is available from the forge for each release:</p>\n\n<pre><code>&lt;http://forge.puppetlabs.com/puppetlabs/firewall&gt;\n</code></pre>\n\n<p>Or you can access the inline documentation:</p>\n\n<pre><code>puppet describe firewall\n</code></pre>\n\n<p>Or:</p>\n\n<pre><code>puppet doc -r type\n</code></pre>\n\n<p>(and search for firewall).</p>\n\n<h3>Bugs</h3>\n\n<p>Bugs can be reported in the Puppetlabs Redmine project:</p>\n\n<pre><code>&lt;http://projects.puppetlabs.com/projects/modules/&gt;\n</code></pre>\n\n<h2>Developer Guide</h2>\n\n<h3>Contributing</h3>\n\n<p>Make sure you read CONTRIBUTING.md before contributing.</p>\n\n<p>Currently we support:</p>\n\n<ul>\n<li>iptables</li>\n<li>ip6tables</li>\n</ul>\n\n<p>But plans are to support lots of other firewall implementations:</p>\n\n<ul>\n<li>FreeBSD (ipf)</li>\n<li>Mac OS X (ipfw)</li>\n<li>OpenBSD (pf)</li>\n<li>Cisco (ASA and basic access lists)</li>\n</ul>\n\n<p>If you have knowledge in these technology, know how to code and wish to contribute \nto this project we would welcome the help.</p>\n\n<h3>Testing</h3>\n\n<p>Make sure you have:</p>\n\n<pre><code>rake\n</code></pre>\n\n<p>Install the necessary gems:</p>\n\n<pre><code>gem install rspec\n</code></pre>\n\n<p>And run the tests from the root of the source code:</p>\n\n<pre><code>rake test\n</code></pre>\n</section>",
1814
1814
  "changelog": null,
1815
1815
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1816
1816
  "created_at": "2011-12-05 22:56:20 -0800",
@@ -2735,7 +2735,7 @@
2735
2735
  "file_size": 62433,
2736
2736
  "file_md5": "97ab32e19f65dbe6d7f42b3e5c3ada8e",
2737
2737
  "downloads": 18449,
2738
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2738
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2739
2739
  "changelog": null,
2740
2740
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
2741
2741
  "created_at": "2013-09-06 14:49:24 -0700",
@@ -2902,7 +2902,7 @@
2902
2902
  "file_size": 20568,
2903
2903
  "file_md5": "7cf55f8c280c1f4cb9abb5d40c8f0986",
2904
2904
  "downloads": 18255,
2905
- "readme": "<section class=\"markdown\"><p><a href=\"https://travis-ci.org/cprice-puppet/puppetlabs-inifile\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-inifile.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h1>INI-file module</h1>\n\n<p>This module provides resource types for use in managing INI-style configuration\nfiles. The main resource type is <code>ini_setting</code>, which is used to manage an\nindividual setting in an INI file. Here&#39;s an example usage:</p>\n\n<pre><code>ini_setting { &quot;sample setting&quot;:\n path =&gt; &#39;/tmp/foo.ini&#39;,\n section =&gt; &#39;foo&#39;,\n setting =&gt; &#39;foosetting&#39;,\n value =&gt; &#39;FOO!&#39;,\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>A supplementary resource type is <code>ini_subsetting</code>, which is used to manage\nsettings that consist of several arguments such as</p>\n\n<pre><code>JAVA_ARGS=&quot;-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof &quot;\n\nini_subsetting {&#39;sample subsetting&#39;:\n ensure =&gt; present,\n section =&gt; &#39;&#39;,\n key_val_separator =&gt; &#39;=&#39;,\n path =&gt; &#39;/etc/default/pe-puppetdb&#39;,\n setting =&gt; &#39;JAVA_ARGS&#39;,\n subsetting =&gt; &#39;-Xmx&#39;,\n value =&gt; &#39;512m&#39;,\n}\n</code></pre>\n\n<h2>implementing child providers:</h2>\n\n<p>The ini_setting class can be overridden by child providers in order to implement the management of ini settings for a specific configuration file.</p>\n\n<p>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:</p>\n\n<p>example:</p>\n\n<pre><code>#my_module/lib/puppet/type/glance_api_config.rb\nPuppet::Type.newtype(:glance_api_config) do\n ensurable\n newparam(:name, :namevar =&gt; true) do\n desc &#39;Section/setting name to manage from glance-api.conf&#39;\n # namevar should be of the form section/setting\n newvalues(/\\S+\\/\\S+/)\n end\n newproperty(:value) do\n desc &#39;The value of the setting to be defined.&#39;\n munge do |v|\n v.to_s.strip\n end\n end\nend\n</code></pre>\n\n<p>This type also must have a provider that utilizes the ini_setting provider as its parent:</p>\n\n<p>example:</p>\n\n<pre><code># 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 =&gt; 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(&#39;/&#39;, 2).first\n end\n def setting\n # implement setting as the second part of the namevar\n resource[:name].split(&#39;/&#39;, 2).last\n end\n # hard code the file path (this allows purging)\n def self.file_path\n &#39;/etc/glance/glance-api.conf&#39;\n end\nend\n</code></pre>\n\n<p>Now, the individual settings of the /etc/glance/glance-api.conf file can be managed as individual resources:</p>\n\n<pre><code>glance_api_config { &#39;HEADER/important_config&#39;:\n value =&gt; &#39;secret_value&#39;,\n}\n</code></pre>\n\n<p>Provided that self.file_path has been implemented, you can purge with the following puppet syntax:</p>\n\n<pre><code>resources { &#39;glance_api_config&#39;\n purge =&gt; true,\n}\n</code></pre>\n\n<p>If the above code is added, then the resulting configured file will only contain lines implemented as Puppet resources</p>\n\n<h2>A few noteworthy features:</h2>\n\n<ul>\n<li>The module tries <em>hard</em> 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.</li>\n<li>Supports comments starting with either &#39;#&#39; or &#39;;&#39;.</li>\n<li>Will add missing sections if they don&#39;t exist.</li>\n<li>Supports a &quot;global&quot; section (settings that go at the beginning of the file,\nbefore any named sections) by specifying a section name of &quot;&quot;.</li>\n</ul>\n</section>",
2905
+ "readme": "<section class=\"markdown\"><p><a href=\"https://travis-ci.org/cprice-puppet/puppetlabs-inifile\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-inifile.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h1>INI-file module</h1>\n\n<p>This module provides resource types for use in managing INI-style configuration\nfiles. The main resource type is <code>ini_setting</code>, which is used to manage an\nindividual setting in an INI file. Here&#39;s an example usage:</p>\n\n<pre><code>ini_setting { &quot;sample setting&quot;:\n path =&gt; &#39;/tmp/foo.ini&#39;,\n section =&gt; &#39;foo&#39;,\n setting =&gt; &#39;foosetting&#39;,\n value =&gt; &#39;FOO!&#39;,\n ensure =&gt; present,\n}\n</code></pre>\n\n<p>A supplementary resource type is <code>ini_subsetting</code>, which is used to manage\nsettings that consist of several arguments such as</p>\n\n<pre><code>JAVA_ARGS=&quot;-Xmx192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/pe-puppetdb/puppetdb-oom.hprof &quot;\n\nini_subsetting {&#39;sample subsetting&#39;:\n ensure =&gt; present,\n section =&gt; &#39;&#39;,\n key_val_separator =&gt; &#39;=&#39;,\n path =&gt; &#39;/etc/default/pe-puppetdb&#39;,\n setting =&gt; &#39;JAVA_ARGS&#39;,\n subsetting =&gt; &#39;-Xmx&#39;,\n value =&gt; &#39;512m&#39;,\n}\n</code></pre>\n\n<h2>implementing child providers:</h2>\n\n<p>The ini_setting class can be overridden by child providers in order to implement the management of ini settings for a specific configuration file.</p>\n\n<p>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:</p>\n\n<p>example:</p>\n\n<pre><code>#my_module/lib/puppet/type/glance_api_config.rb\nPuppet::Type.newtype(:glance_api_config) do\n ensurable\n newparam(:name, :namevar =&gt; true) do\n desc &#39;Section/setting name to manage from glance-api.conf&#39;\n # namevar should be of the form section/setting\n newvalues(/\\S+\\/\\S+/)\n end\n newproperty(:value) do\n desc &#39;The value of the setting to be defined.&#39;\n munge do |v|\n v.to_s.strip\n end\n end\nend\n</code></pre>\n\n<p>This type also must have a provider that utilizes the ini_setting provider as its parent:</p>\n\n<p>example:</p>\n\n<pre><code># 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 =&gt; 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(&#39;/&#39;, 2).first\n end\n def setting\n # implement setting as the second part of the namevar\n resource[:name].split(&#39;/&#39;, 2).last\n end\n # hard code the file path (this allows purging)\n def self.file_path\n &#39;/etc/glance/glance-api.conf&#39;\n end\nend\n</code></pre>\n\n<p>Now, the individual settings of the /etc/glance/glance-api.conf file can be managed as individual resources:</p>\n\n<pre><code>glance_api_config { &#39;HEADER/important_config&#39;:\n value =&gt; &#39;secret_value&#39;,\n}\n</code></pre>\n\n<p>Provided that self.file_path has been implemented, you can purge with the following puppet syntax:</p>\n\n<pre><code>resources { &#39;glance_api_config&#39;\n purge =&gt; true,\n}\n</code></pre>\n\n<p>If the above code is added, then the resulting configured file will only contain lines implemented as Puppet resources</p>\n\n<h2>A few noteworthy features:</h2>\n\n<ul>\n<li>The module tries <em>hard</em> 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.</li>\n<li>Supports comments starting with either &#39;#&#39; or &#39;;&#39;.</li>\n<li>Will add missing sections if they don&#39;t exist.</li>\n<li>Supports a &quot;global&quot; section (settings that go at the beginning of the file,\nbefore any named sections) by specifying a section name of &quot;&quot;.</li>\n</ul>\n</section>",
2906
2906
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;chris@puppetlabs.com&gt; - 0.10.3\n * Fix bug in subsetting handling for new settings (cbea5dc)\n\n2013-05-22 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.10.2\n * Better handling of quotes for subsettings (1aa7e60)\n\n2013-05-21 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.10.1\n * Change constants to class variables to avoid ruby warnings (6b19864)\n\n2013-04-10 - Erik Dalén &lt;dalen@spotify.com&gt; - 0.10.1\n * Style fixes (c4af8c3)\n\n2013-04-02 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.10.1\n * Add travisfile and Gemfile (c2052b3)\n\n2013-04-02 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.10.1\n * Update README.markdown (ad38a08)\n\n2013-02-15 - Karel Brezina &lt;karel.brezina@gmail.com&gt; - 0.10.0\n * Added &#x27;ini_subsetting&#x27; custom resource type (4351d8b)\n\n2013-03-11 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.10.0\n * guard against nil indentation values (5f71d7f)\n\n2013-01-07 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.10.0\n * Add purging support to ini file (2f22483)\n\n2013-02-05 - James Sweeny &lt;james.sweeny@puppetlabs.com&gt; - 0.10.0\n * Fix test to use correct key_val_parameter (b1aff63)\n\n2012-11-06 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.10.0\n * Added license file w&#x2F;Apache 2.0 license (5e1d203)\n\n2012-11-02 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Version 0.9.0 released\n\n2012-10-26 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Add detection for commented versions of settings (a45ab65)\n\n2012-10-20 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Refactor to clarify implementation of `save` (f0d443f)\n\n2012-10-20 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Add example for `ensure=absent` (e517148)\n\n2012-10-20 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Better handling of whitespace lines at ends of sections (845fa70)\n\n2012-10-20 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Respect indentation &#x2F; spacing for existing sections and settings (c2c26de)\n\n2012-10-17 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.9.0\n * Minor tweaks to handling of removing settings (cda30a6)\n\n2012-10-10 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.9.0\n * Add support for removing lines (1106d70)\n\n2012-10-02 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.9.0\n * Make value a property (cbc90d3)\n\n2012-10-02 - Dan Bode &lt;dan@puppetlabs.com&gt; - 0.9.0\n * Make ruby provider a better parent. (1564c47)\n\n2012-09-29 - Reid Vandewiele &lt;reid@puppetlabs.com&gt; - 0.9.0\n * Allow values with spaces to be parsed and set (3829e20)\n\n2012-09-24 - Chris Price &lt;chris@pupppetlabs.com&gt; - 0.0.3\n * Version 0.0.3 released\n\n2012-09-20 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.0.3\n * Add validation for key_val_separator (e527908)\n\n2012-09-19 - Chris Price &lt;chris@puppetlabs.com&gt; - 0.0.3\n * Allow overriding separator string between key&#x2F;val pairs (8d1fdc5)\n\n2012-08-20 - Chris Price &lt;chris@pupppetlabs.com&gt; - 0.0.2\n * Version 0.0.2 released\n\n2012-08-17 - Chris Price &lt;chris@pupppetlabs.com&gt; - 0.0.2\n * Add support for &quot;global&quot; section at beginning of file (c57dab4)\n</pre></section>",
2907
2907
  "license": "<section class=\"plaintext\"><pre> Apache License\n Version 2.0, January 2004\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n &quot;License&quot; shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n &quot;Licensor&quot; shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n &quot;Legal Entity&quot; 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 &quot;control&quot; 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 &quot;You&quot; (or &quot;Your&quot;) shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n &quot;Source&quot; 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 &quot;Object&quot; 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 &quot;Work&quot; 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 &quot;Derivative Works&quot; 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 &quot;Contribution&quot; 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, &quot;submitted&quot;\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 &quot;Not a Contribution.&quot;\n\n &quot;Contributor&quot; 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 &quot;NOTICE&quot; 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 &quot;AS IS&quot; 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&#x2F;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 &quot;[]&quot;\n replaced with your own identifying information. (Don&#x27;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 &quot;printed page&quot; 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 &quot;License&quot;);\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:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;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 &quot;AS IS&quot; 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</pre></section>",
2908
2908
  "created_at": "2013-07-17 05:26:51 -0700",
@@ -3069,4 +3069,4 @@
3069
3069
  "deleted_at": null
3070
3070
  }
3071
3071
  ]
3072
- }
3072
+ }
@@ -131,10 +131,10 @@
131
131
  "file_size": 13280,
132
132
  "file_md5": "b00db93a5ee05c20207bbadcf85af2d6",
133
133
  "downloads": 308,
134
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
134
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
135
135
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
136
136
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
137
137
  "created_at": "2012-08-08 00:23:44 -0700",
138
138
  "updated_at": "2012-08-08 00:23:44 -0700",
139
139
  "deleted_at": null
140
- }
140
+ }
@@ -181,7 +181,7 @@
181
181
  "file_size": 31302,
182
182
  "file_md5": "89fa11aef710c060e0bf9f9ff2cae455",
183
183
  "downloads": 25919,
184
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
184
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
185
185
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
186
186
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
187
187
  "created_at": "2013-03-28 15:44:52 -0700",
@@ -454,7 +454,7 @@
454
454
  "file_size": 62433,
455
455
  "file_md5": "97ab32e19f65dbe6d7f42b3e5c3ada8e",
456
456
  "downloads": 18449,
457
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
457
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
458
458
  "changelog": null,
459
459
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
460
460
  "created_at": "2013-09-06 14:49:24 -0700",
@@ -706,7 +706,7 @@
706
706
  "file_size": 52306,
707
707
  "file_md5": "debec531e3b92b356b6d01dbb9a8d6d4",
708
708
  "downloads": 6639,
709
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
709
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
710
710
  "changelog": "<section class=\"plaintext\"><pre>2013-07-26 Release 0.8.1\nBugfixes:\n- Update `apache::mpm_module` detection for worker&#x2F;prefork\n- Update `apache::mod::cgi` and `apache::mod::cgid` detection for\nworker&#x2F;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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
711
711
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
712
712
  "created_at": "2013-07-26 10:57:40 -0700",
@@ -1012,7 +1012,7 @@
1012
1012
  "file_size": 85004,
1013
1013
  "file_md5": "4036f35903264c9b6e3289455cfee225",
1014
1014
  "downloads": 6389,
1015
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>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.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>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.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>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.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>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..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>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.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1015
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>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.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>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.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>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.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>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.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>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..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>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.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1016
1016
  "changelog": "<section class=\"markdown\"><h2>2013-12-05 Release 0.10.0</h2>\n\n<h3>Summary:</h3>\n\n<p>This release adds FreeBSD osfamily support and various other improvements to some mods.</p>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add suPHP_UserGroup directive to directory context</li>\n<li>Add support for ScriptAliasMatch directives</li>\n<li>Set SSLOptions StdEnvVars in server context</li>\n<li>No implicit <Directory> entry for ScriptAlias path</li>\n<li>Add support for overriding ErrorDocument</li>\n<li>Add support for AliasMatch directives</li>\n<li>Disable default &quot;allow from all&quot; in vhost-directories</li>\n<li>Add WSGIPythonPath as an optional parameter to mod_wsgi. </li>\n<li>Add mod_rpaf support</li>\n<li>Add directives: IndexOptions, IndexOrderDefault</li>\n<li>Add ability to include additional external configurations in vhost</li>\n<li>need to use the provider variable not the provider key value from the directory hash for matches</li>\n<li>Support for FreeBSD and few other features</li>\n<li>Add new params to apache::mod::mime class</li>\n<li>Allow apache::mod to specify module id and path</li>\n<li>added $server_root parameter</li>\n<li>Add Allow and ExtendedStatus support to mod_status</li>\n<li>Expand vhost/_directories.pp directive support</li>\n<li>Add initial support for nss module (no directives in vhost template yet)</li>\n<li>added peruser and event mpms</li>\n<li>added $service_name parameter</li>\n<li>add parameter for TraceEnable</li>\n<li>Make LogLevel configurable for server and vhost</li>\n<li>Add documentation about $ip</li>\n<li>Add ability to pass ip (instead of wildcard) in default vhost files</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Don&#39;t listen on port or set NameVirtualHost for non-existent vhost</li>\n<li>only apply Directory defaults when provider is a directory</li>\n<li>Working mod_authnz_ldap support on Debian/Ubuntu</li>\n</ul>\n\n<h2>2013-09-06 Release 0.9.0</h2>\n\n<h3>Summary:</h3>\n\n<p>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.</p>\n\n<h3>Backwards-incompatible Changes:</h3>\n\n<ul>\n<li>Remove many default mods that are not normally needed.</li>\n<li>Remove <code>rewrite_base</code> <code>apache::vhost</code> parameter; did not work anyway.</li>\n<li>Specify dependencies on stdlib &gt;=2.4.0 (this was already the case, but\nmaking explicit)</li>\n<li>Deprecate <code>a2mod</code> in favor of the <code>apache::mod::*</code> classes and <code>apache::mod</code>\ndefined resource.</li>\n</ul>\n\n<h3>Features:</h3>\n\n<ul>\n<li><code>apache</code> class\n\n<ul>\n<li>Add <code>httpd_dir</code> parameter to change the location of the configuration\nfiles.</li>\n<li>Add <code>logroot</code> parameter to change the logroot</li>\n<li>Add <code>ports_file</code> parameter to changes the <code>ports.conf</code> file location</li>\n<li>Add <code>keepalive</code> parameter to enable persistent connections</li>\n<li>Add <code>keepalive_timeout</code> parameter to change the timeout</li>\n<li>Update <code>default_mods</code> to be able to take an array of mods to enable.</li>\n</ul></li>\n<li><code>apache::vhost</code>\n\n<ul>\n<li>Add <code>wsgi_daemon_process</code>, <code>wsgi_daemon_process_options</code>,\n<code>wsgi_process_group</code>, and <code>wsgi_script_aliases</code> parameters for per-vhost\nWSGI configuration.</li>\n<li>Add <code>access_log_syslog</code> parameter to enable syslogging.</li>\n<li>Add <code>error_log_syslog</code> parameter to enable syslogging of errors.</li>\n<li>Add <code>directories</code> hash parameter. Please see README for documentation.</li>\n<li>Add <code>sslproxyengine</code> parameter to enable SSLProxyEngine</li>\n<li>Add <code>suphp_addhandler</code>, <code>suphp_engine</code>, and <code>suphp_configpath</code> for\nconfiguring SuPHP.</li>\n<li>Add <code>custom_fragment</code> parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)</li>\n</ul></li>\n<li>Add <code>apache::mod::suphp</code> class for configuring SuPHP.</li>\n<li>Add <code>apache::mod::itk</code> class for configuring ITK mpm module.</li>\n<li>Update <code>apache::mod::wsgi</code> class for global WSGI configuration with\n<code>wsgi_socket_prefix</code> and <code>wsgi_python_home</code> parameters.</li>\n<li>Add README.passenger.md to document the <code>apache::mod::passenger</code> usage.\nAdded <code>passenger_high_performance</code>, <code>passenger_pool_idle_time</code>,\n<code>passenger_max_requests</code>, <code>passenger_stat_throttle_rate</code>, <code>rack_autodetect</code>,\nand <code>rails_autodetect</code> parameters.</li>\n<li>Separate the httpd service resource into a new <code>apache::service</code> class for\ndependency chaining of <code>Class[&#39;apache&#39;] -&gt; &lt;resource&gt; ~&gt;\nClass[&#39;apache::service&#39;]</code></li>\n<li>Added <code>apache::mod::proxy_balancer</code> class for <code>apache::balancer</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Change dependency to puppetlabs-concat</li>\n<li>Fix ruby 1.9 bug for <code>a2mod</code></li>\n<li>Change servername to be <code>$::hostname</code> if there is no <code>$::fqdn</code></li>\n<li>Make <code>/etc/ssl/certs</code> the default ssl certs directory for RedHat non-5.</li>\n<li>Make <code>php</code> the default php package for RedHat non-5.</li>\n<li>Made <code>aliases</code> able to take a single alias hash instead of requiring an\narray.</li>\n</ul>\n\n<h2>2013-07-26 Release 0.8.1</h2>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Update <code>apache::mpm_module</code> detection for worker/prefork</li>\n<li>Update <code>apache::mod::cgi</code> and <code>apache::mod::cgid</code> detection for\nworker/prefork</li>\n</ul>\n\n<h2>2013-07-16 Release 0.8.0</h2>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add <code>servername</code> parameter to <code>apache</code> class</li>\n<li>Add <code>proxy_set</code> parameter to <code>apache::balancer</code> define</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix ordering for multiple <code>apache::balancer</code> clusters</li>\n<li>Fix symlinking for sites-available on Debian-based OSs</li>\n<li>Fix dependency ordering for recursive confdir management</li>\n<li>Fix <code>apache::mod::*</code> to notify the service on config change</li>\n<li>Documentation updates</li>\n</ul>\n\n<h2>2013-07-09 Release 0.7.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li>Essentially rewrite the module -- too many to list</li>\n<li><code>apache::vhost</code> has many abilities -- see README.md for details</li>\n<li><code>apache::mod::*</code> classes provide httpd mod-loading capabilities</li>\n<li><code>apache</code> base class is much more configurable</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Many. And many more to come</li>\n</ul>\n\n<h2>2013-03-2 Release 0.6.0</h2>\n\n<ul>\n<li>update travis tests (add more supported versions)</li>\n<li>add access log_parameter</li>\n<li>make purging of vhost dir configurable</li>\n</ul>\n\n<h2>2012-08-24 Release 0.4.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li><code>include apache</code> is now required when using <code>apache::mod::*</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix syntax for validate_re</li>\n<li>Fix formatting in vhost template</li>\n<li><p>Fix spec tests such that they pass</p>\n\n<p>2012-05-08 Puppet Labs <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a> - 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 =&gt; path for file resources in order to name namevar by it&#39;s name\n72e13de One end too much\n0739641 style guide fixes: &#39;true&#39; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#39;httpd&#39;]\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</p></li>\n</ul>\n</section>",
1017
1017
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1018
1018
  "created_at": "2013-12-05 15:29:14 -0800",
@@ -1310,7 +1310,7 @@
1310
1310
  "file_size": 27860,
1311
1311
  "file_md5": "996659ad952e1729f286524e4dba4c04",
1312
1312
  "downloads": 6232,
1313
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1313
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1314
1314
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
1315
1315
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1316
1316
  "created_at": "2012-11-06 00:26:27 -0800",
@@ -1488,7 +1488,7 @@
1488
1488
  "file_size": 28866,
1489
1489
  "file_md5": "f62139bda531ac4c8f55ecf09f77d0e9",
1490
1490
  "downloads": 6125,
1491
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1491
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1492
1492
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
1493
1493
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1494
1494
  "created_at": "2012-12-01 10:53:30 -0800",
@@ -1739,7 +1739,7 @@
1739
1739
  "file_size": 52540,
1740
1740
  "file_md5": "d77e65d987d670d5dac2538e2c98c0b5",
1741
1741
  "downloads": 1586,
1742
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1742
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1743
1743
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
1744
1744
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1745
1745
  "created_at": "2013-07-17 07:37:53 -0700",
@@ -1989,7 +1989,7 @@
1989
1989
  "file_size": 51129,
1990
1990
  "file_md5": "c8ab994e2dcee7681acda5538ba4ce0b",
1991
1991
  "downloads": 1228,
1992
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. Each hash should be of the form of:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; } ],\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ]\n} ]\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"ruby\"><code> directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }]\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1992
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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.</p>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>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</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> 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.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>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.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>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 &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>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.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> 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 <code>apache</code> 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).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. Each hash should be of the form of:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; } ],\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> 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:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ]\n} ]\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"ruby\"><code> directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }]\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>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 &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>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.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>redirect_dest</code>. If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>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 <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>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</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>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 <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>apache::mod</code> 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.</p>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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.</p>\n\n<p>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.</p>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
1993
1993
  "changelog": "<section class=\"plaintext\"><pre>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 &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
1994
1994
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
1995
1995
  "created_at": "2013-07-09 12:47:10 -0700",
@@ -2315,7 +2315,7 @@
2315
2315
  "file_size": 13280,
2316
2316
  "file_md5": "b00db93a5ee05c20207bbadcf85af2d6",
2317
2317
  "downloads": 308,
2318
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2318
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2319
2319
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
2320
2320
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
2321
2321
  "created_at": "2012-08-08 00:23:44 -0700",
@@ -2484,7 +2484,7 @@
2484
2484
  "file_size": 27385,
2485
2485
  "file_md5": "1f95ea71528835d562c99366cea3d649",
2486
2486
  "downloads": 248,
2487
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2487
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2488
2488
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
2489
2489
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
2490
2490
  "created_at": "2012-08-16 01:03:41 -0700",
@@ -2653,7 +2653,7 @@
2653
2653
  "file_size": 27387,
2654
2654
  "file_md5": "e7edaffc2d96a3d0ac629006ec12b117",
2655
2655
  "downloads": 233,
2656
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2656
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
2657
2657
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
2658
2658
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
2659
2659
  "created_at": "2012-08-13 18:22:45 -0700",
@@ -3014,7 +3014,7 @@
3014
3014
  "file_size": 740331,
3015
3015
  "file_md5": "306d26a53b2ee31a1c51a9ee801aa3c8",
3016
3016
  "downloads": 216,
3017
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
3017
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
3018
3018
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
3019
3019
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
3020
3020
  "created_at": "2012-08-22 18:24:38 -0700",
@@ -3276,7 +3276,7 @@
3276
3276
  "file_size": 27389,
3277
3277
  "file_md5": "8c8f4d98653673a2563372c3f8e5dfcb",
3278
3278
  "downloads": 159,
3279
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
3279
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>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 <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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.</p>\n</section>",
3280
3280
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 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 =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\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</pre></section>",
3281
3281
  "license": "<section class=\"plaintext\"><pre>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 &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; 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</pre></section>",
3282
3282
  "created_at": "2012-08-16 00:25:44 -0700",
@@ -3284,4 +3284,4 @@
3284
3284
  "deleted_at": null
3285
3285
  }
3286
3286
  ]
3287
- }
3287
+ }
data/spec/spec_helper.rb CHANGED
@@ -15,8 +15,7 @@ module StubbingFaraday
15
15
  def stub_api_for(klass, base_url = "http://api.example.com")
16
16
  allow(klass).to receive(:conn) do
17
17
  Faraday.new :url => base_url do |builder|
18
- builder.use PuppetForge::Middleware::SymbolifyJson
19
- builder.response(:json, :content_type => /\bjson$/)
18
+ builder.response(:json, :content_type => /\bjson$/, :parser_options => { :symbolize_names => true })
20
19
  builder.response(:raise_error)
21
20
  builder.use(:connection_failure)
22
21
 
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe PuppetForge::Connection do
4
4
  before(:each) do
5
- PuppetForge.host = "https://forgeapi.puppetlabs.com"
5
+ PuppetForge.host = "https://forgeapi.puppet.com"
6
6
  end
7
7
 
8
8
  let(:test_conn) do
@@ -88,16 +88,45 @@ describe PuppetForge::Connection do
88
88
 
89
89
  expect {
90
90
  subject.get('/error')
91
- }.to raise_error(Faraday::ClientError, "the server responded with status 503")
91
+ }.to raise_error(Faraday::ServerError, "the server responded with status 503")
92
92
  end
93
93
 
94
94
  context 'when an authorization value is provided' do
95
- before(:each) do
96
- allow(described_class).to receive(:authorization).and_return("auth-test value")
95
+ let(:key) { "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" }
96
+ let(:prepended_key) { "Bearer #{key}" }
97
+
98
+ context 'when the key already includes the Bearer prefix as expected' do
99
+ before(:each) do
100
+ allow(described_class).to receive(:authorization).and_return(prepended_key)
101
+ end
102
+
103
+ it 'does not prepend it again' do
104
+ expect(subject.headers).to include(:authorization => prepended_key)
105
+ end
97
106
  end
98
107
 
99
- it 'sets authorization header on requests' do
100
- expect(subject.headers).to include(:authorization => "auth-test value")
108
+ context 'when the key does not includ the Bearer prefix' do
109
+ context 'when the value looks like a Forge API key' do
110
+ before(:each) do
111
+ allow(described_class).to receive(:authorization).and_return(key)
112
+ end
113
+
114
+ it 'prepends "Bearer"' do
115
+ expect(subject.headers).to include(:authorization => prepended_key)
116
+ end
117
+ end
118
+
119
+ context 'when the value does not look like a Forge API key' do
120
+ let(:key) { "auth-test value" }
121
+
122
+ before(:each) do
123
+ allow(described_class).to receive(:authorization).and_return(key)
124
+ end
125
+
126
+ it 'does not alter the value' do
127
+ expect(subject.headers).to include(:authorization => key)
128
+ end
129
+ end
101
130
  end
102
131
  end
103
132
 
@@ -115,7 +144,7 @@ describe PuppetForge::Connection do
115
144
  describe 'creating a default connection' do
116
145
  it 'creates a connection with the PuppetForge host' do
117
146
  conn = test_conn.default_connection
118
- expect(conn.url_prefix.to_s).to eq 'https://forgeapi.puppetlabs.com/'
147
+ expect(conn.url_prefix.to_s).to eq 'https://forgeapi.puppet.com/'
119
148
  end
120
149
  end
121
150
  end
@@ -168,14 +168,6 @@ describe PuppetForge::Metadata do
168
168
 
169
169
  end
170
170
 
171
- context "with a valid dependency", :pending => "dependency resolution is not yet in scope" do
172
- let(:data) { {'dependencies' => [{'name' => 'puppetlabs-goodmodule'}] }}
173
-
174
- it "adds the dependency" do
175
- expect(subject.dependencies.size).to eq(1)
176
- end
177
- end
178
-
179
171
  context "with a invalid dependency name" do
180
172
  let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule'}] }}
181
173
 
@@ -184,14 +176,6 @@ describe PuppetForge::Metadata do
184
176
  end
185
177
  end
186
178
 
187
- context "with a valid dependency version range", :pending => "dependency resolution is not yet in scope" do
188
- let(:data) { {'dependencies' => [{'name' => 'puppetlabs-badmodule', 'version_requirement' => '>= 2.0.0'}] }}
189
-
190
- it "adds the dependency" do
191
- expect(subject.dependencies.size).to eq(1)
192
- end
193
- end
194
-
195
179
  context "with a invalid version range" do
196
180
  let(:data) { {'dependencies' => [{'name' => 'puppetlabsbadmodule', 'version_requirement' => '>= banana'}] }}
197
181
 
@@ -199,30 +183,6 @@ describe PuppetForge::Metadata do
199
183
  expect { subject }.to raise_error(ArgumentError)
200
184
  end
201
185
  end
202
-
203
- context "with duplicate dependencies", :pending => "dependency resolution is not yet in scope" do
204
- let(:data) { {'dependencies' => [{'name' => 'puppetlabs-dupmodule', 'version_requirement' => '1.0.0'},
205
- {'name' => 'puppetlabs-dupmodule', 'version_requirement' => '0.0.1'}] }
206
- }
207
-
208
- it "raises an exception" do
209
- expect { subject }.to raise_error(ArgumentError)
210
- end
211
- end
212
-
213
- context "adding a duplicate dependency", :pending => "dependency resolution is not yet in scope" do
214
- let(:data) { {'dependencies' => [{'name' => 'puppetlabs-origmodule', 'version_requirement' => '1.0.0'}] }}
215
-
216
- it "with a different version raises an exception" do
217
- metadata.add_dependency('puppetlabs-origmodule', '>= 0.0.1')
218
- expect { subject }.to raise_error(ArgumentError)
219
- end
220
-
221
- it "with the same version does not add another dependency" do
222
- metadata.add_dependency('puppetlabs-origmodule', '1.0.0')
223
- expect(subject.dependencies.size).to eq(1)
224
- end
225
- end
226
186
  end
227
187
 
228
188
  describe '#dashed_name' do
metadata CHANGED
@@ -1,61 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_forge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-05 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 0.9.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 0.15.0
23
- - - "!="
17
+ - - "~>"
24
18
  - !ruby/object:Gem::Version
25
- version: 0.13.1
19
+ version: '1.3'
26
20
  type: :runtime
27
21
  prerelease: false
28
22
  version_requirements: !ruby/object:Gem::Requirement
29
23
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.9.0
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 0.15.0
36
- - - "!="
24
+ - - "~>"
37
25
  - !ruby/object:Gem::Version
38
- version: 0.13.1
26
+ version: '1.3'
39
27
  - !ruby/object:Gem::Dependency
40
28
  name: faraday_middleware
41
29
  requirement: !ruby/object:Gem::Requirement
42
30
  requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 0.9.0
46
- - - "<"
31
+ - - "~>"
47
32
  - !ruby/object:Gem::Version
48
- version: 0.14.0
33
+ version: '1.0'
49
34
  type: :runtime
50
35
  prerelease: false
51
36
  version_requirements: !ruby/object:Gem::Requirement
52
37
  requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 0.9.0
56
- - - "<"
38
+ - - "~>"
57
39
  - !ruby/object:Gem::Version
58
- version: 0.14.0
40
+ version: '1.0'
59
41
  - !ruby/object:Gem::Dependency
60
42
  name: semantic_puppet
61
43
  requirement: !ruby/object:Gem::Requirement
@@ -218,7 +200,6 @@ files:
218
200
  - lib/puppet_forge/error.rb
219
201
  - lib/puppet_forge/lazy_accessors.rb
220
202
  - lib/puppet_forge/lazy_relations.rb
221
- - lib/puppet_forge/middleware/symbolify_json.rb
222
203
  - lib/puppet_forge/tar.rb
223
204
  - lib/puppet_forge/tar/mini.rb
224
205
  - lib/puppet_forge/unpacker.rb
@@ -269,7 +250,6 @@ files:
269
250
  - spec/unit/forge/connection_spec.rb
270
251
  - spec/unit/forge/lazy_accessors_spec.rb
271
252
  - spec/unit/forge/lazy_relations_spec.rb
272
- - spec/unit/forge/middleware/symbolify_json_spec.rb
273
253
  - spec/unit/forge/tar/mini_spec.rb
274
254
  - spec/unit/forge/tar_spec.rb
275
255
  - spec/unit/forge/unpacker_spec.rb
@@ -293,15 +273,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
293
273
  requirements:
294
274
  - - ">="
295
275
  - !ruby/object:Gem::Version
296
- version: 1.9.3
276
+ version: 2.4.0
297
277
  required_rubygems_version: !ruby/object:Gem::Requirement
298
278
  requirements:
299
279
  - - ">="
300
280
  - !ruby/object:Gem::Version
301
281
  version: '0'
302
282
  requirements: []
303
- rubyforge_project:
304
- rubygems_version: 2.6.14
283
+ rubygems_version: 3.1.6
305
284
  signing_key:
306
285
  specification_version: 4
307
286
  summary: Access the Puppet Forge API from Ruby for resource information and to download
@@ -343,7 +322,6 @@ test_files:
343
322
  - spec/unit/forge/connection_spec.rb
344
323
  - spec/unit/forge/lazy_accessors_spec.rb
345
324
  - spec/unit/forge/lazy_relations_spec.rb
346
- - spec/unit/forge/middleware/symbolify_json_spec.rb
347
325
  - spec/unit/forge/tar/mini_spec.rb
348
326
  - spec/unit/forge/tar_spec.rb
349
327
  - spec/unit/forge/unpacker_spec.rb