Version information
Start using this module
Add this module to your Puppetfile:
mod 'Aethylred-apaxy', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
apaxy
This Puppet module installs and configures a HTTP file directory with the Apaxy theme.
Usage
Apaxy on the document root
The following puppet code will put Apaxy on the root document of a web server, replacing the default web site.
class{'apache':
default_vhost => false,
default_ssl_vhost => true,
}
include apaxy
apaxy::theme{'default':
manage_vhost => true,
}
Resources
apaxy
The apaxy
class uses git to clone a local repository of Apaxy from a repository. An alternative repository or git revision can be specified by parameters.
Parameters
- install_dir: setting this will change where Apaxy is cloned to. The default is to use
/var/opt/apaxy
- source: setting this will change the source URI used by git to clone Apaxy. The default is to use the Apaxy Github repository
- revision: This can be set to a branch name, tag or commit hash to specify which revision of the Apaxy repository is to be cloned. It defaults to the head of the
master
branch.
apaxy::theme
The apaxy::theme
resource copies the clone from the local repository created by the apaxy
class into a directory of a web site. Currently it applies the apaxy theme by putting a .htaccess
file into the specified directory. These should really be in the site vhost.conf
file, but the Puppetlabs Apache Module is not yet complete enough to do this. Fortunatly, when this changes the module will transparently change this over.
Parameters
- docroot: this is the toplevel root directory where the Apaxy theme is to be installed. The Apaxy theme will apply to this directory and all it's subdirectories. By default it will be applied to the document root specified by the
docroot
of theapache
class from the Puppetlabs Apache Module, which is OS dependent. - header_source: Setting this will replace the default
header.html
template with the file from the specified source. Thissource
parameter is handled as thesource
attribute of the puppetfile
resource. - footer_source: Setting this will replace the default
footer.html
template with the file from the specified source. Thissource
parameter is handled as thesource
attribute of the puppetfile
resource. - manage_vhost: If this is set to true, the
apaxy::theme
resource will create anapaxy::vhost
which will deploy and enable the Apaxy site.
Custom vhost
There must be an AllowOverride all
declaration in an Apaxy site's vhost.conf
to enable the Apaxy theme. This should appear in the <Directory $docroot>
block, where $docroot
matches what's passed as the docroot parameter to apaxy::theme
. This vhost.conf
file should be managed by using the apache::vhost
resource from the Puppetlabs Apache Module. An example apache::vhost
declaration is given below:
class{'apache':
default_vhost => false,
default_ssl_vhost => true,
}
include apaxy
apaxy::theme{'default': }
apache::vhost { 'default':
port => 80,
docroot => $docroot,
access_log_file => 'apaxy_access.log',
directories => [
{
path => $docroot,
allow_override => ['all'],
},
],
priority => '15',
require => Apaxy::Theme['default'],
}
Dependencies
- Puppetlabs Apache Module
- Puppetlabs vcsrepo Module
- Git either install the required packages or use a Git Puppet Module
To Do
- Remove the need for a
.htaccess
file and incorporate the Apaxy configuration directly into the sitevhost.conf
file. NeedsAlias
andAliasMatch
directives to be properly implemented into the Puppetlabs Apache Module, see #483 and it's corresponding pull request.
Attribution
The puppet-apaxy module was written by Aaron Hicks (2013).
Apaxy
Apaxy was written and is maintained by Adam Whitcroft.
puppet-blank
This module is derived from the puppet-blank module by Aaron Hicks (aethylred@gmail.com)
This module has been developed for the use with Open Source Puppet (Apache 2.0 license) for automating server & service deployment.
rspec-puppet-augeas
This module includes the Travis configuration to use rspec-puppet-augeas
to test and verify changes made to files using the augeas
resource available in Puppet. Check the rspec-puppet-augeas
documentation for usage.
This will require a copy of the original input files to spec/fixtures/augeas
using the same filesystem layout that the resource expects:
$ tree spec/fixtures/augeas/
spec/fixtures/augeas/
`-- etc
`-- ssh
`-- sshd_config
Gnu General Public License
This file is part of the apaxy Puppet module.
The apaxy Puppet module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The apaxy Puppet module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the apaxy Puppet module. If not, see http://www.gnu.org/licenses/.
Dependencies
- puppetlabs/apache (>= 0.9.0)
- puppetlabs/vcsrepo (>= 0.2.0)