commit 3b1b23732ea685bba861983530c08e9cefe96362 Author: Ben Roberts Date: Sun Nov 23 19:45:01 2014 +0000 Initial commit diff --git a/.fixtures.yml b/.fixtures.yml new file mode 100644 index 0000000..a3a119c --- /dev/null +++ b/.fixtures.yml @@ -0,0 +1,8 @@ +--- +fixtures: + symlinks: + dokuwiki: "#{source_dir}" + repositories: + webapp_config: "https://github.com/optiz0r/puppet-webapp-config.git" + stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" + diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 0000000..74d69d3 --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1,3 @@ +--no-autoloader_layout-check +--no-class_inherits_from_params_class-check +--no-80chars-check diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..7bd34cd --- /dev/null +++ b/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.3'] +gem 'puppet', puppetversion +gem 'puppetlabs_spec_helper', '>= 0.1.0' +gem 'puppet-lint', '>= 0.3.2' +gem 'facter', '>= 1.7.0' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..720780d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ben Roberts + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..23cb153 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# dokuwiki + +#### Table of Contents + +1. [Overview](#overview) +2. [Module Description - What the module does and why it is useful](#module-description) +3. [Setup - The basics of getting started with dokuwiki](#setup) + * [What dokuwiki affects](#what-dokuwiki-affects) + * [Setup requirements](#setup-requirements) + * [Beginning with dokuwiki](#beginning-with-dokuwiki) +4. [Usage - Configuration options and additional functionality](#usage) +5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) +5. [Limitations - OS compatibility, etc.](#limitations) +6. [Development - Guide for contributing to the module](#development) + +## Overview + +This module installs and configures dokuwiki (https://www.dokuwiki.org/dokuwiki). + +## Module Description + +The dokuwiki module sets up dokuwiki including package installation, configuration +of both the application and apache. + +Under gentoo-based systems it makes use of the `webapp_config` tool. + +## Setup + +### What dokuwiki affects + +* dokiwiki package. +* dokuwiki configuration file. +* apache vhost configuration. + +### Setup Requirements + +This module assumes apache is already configured and that it can just drop a vhost +definition file into an apache configuration directory. + +### Beginning with dokuwiki + +``` +include '::dokuwiki' +``` + +## Usage + +All options and configuration can be done through interacting with the parameters +on the main dokuwiki class. These are documented below + +### dokuwiki class + +``` +class { + '::dokuwiki': + +} +``` + +## Reference + +### Classes + +* dokuwiki: Main class for installation, +* dokuwiki::config: Main class for dokuwiki configuration/management. +* dokuwiki::install: Handles package installation. +* dokuwiki::params: Different configuration data for different systems. + +### Parameters + +## Limitations + +This module has been built on and tested against puppet 3.7 and higher. + +This module has been tested on: +* Sabayon 2014.12 + +### Module dependencies + +To be able to install multiple instances of dokuwiki on a single host +this module makes use of the `webapp_config` tool on Gentoo-based systems. +It makes use of the `optiz0r-webapp_config` module to manage this, and +you will need to arrange to have a copy of this available on your puppet +master using `r10k`, `librarian-puppet`. + +Note, this module is not currently available on the module forge, and can +instead be retrieved from https://github.com/optiz0r/puppet-webapp-config. + +## Development + +This module is opensource and contributions are welcome. Please feel free +to submit a pull request with any enhancements. + +## Authors + +* Ben Roberts + diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..0f710fd --- /dev/null +++ b/Rakefile @@ -0,0 +1,19 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] + +desc "Validate manifests, templates, and ruby files" +task :validate do + Dir['manifests/**/*.pp'].each do |manifest| + sh "puppet parser validate --noop #{manifest}" + end + Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| + sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ + end + Dir['templates/**/*.erb'].each do |template| + sh "erb -P -x -T '-' #{template} | ruby -c" + end +end diff --git a/manifests/config.pp b/manifests/config.pp new file mode 100644 index 0000000..3b8517f --- /dev/null +++ b/manifests/config.pp @@ -0,0 +1,82 @@ +# == Class: dokuwiki::config +# +# See the README.md for documentation +# +class dokuwiki::config ( + $manage_vhost = $dokuwiki::manage_vhost, + $vhost = $dokuwiki::vhost, + $base_path = $dokuwiki::base_path, + $apache_confdir = $dokuwiki::apache_confdir, + $apache_user = $dokuwiki::apache_user, + $apache_group = $dokuwiki::apache_group, + $install_dir = $dokuwiki::install_dir, + $data_dir = $dokuwiki::data_dir, + $local_conf_template = $dokuwiki::local_conf_template, + $protected_conf_template = $dokuwiki::protected_conf_template, + $wiki_title = $dokuwiki::wiki_title, + $userewrite = $dokuwiki::userewrite, + $use_acl = $dokuwiki::use_acl, + $breadcrumbs = $dokuwiki::breadcrumbs, + $youarehere = $dokuwiki::youarehere, + $updatecheck = $dokuwiki::updatecheck, + $content_license = $dokuwiki::content_license, + $locktime = $dokuwiki::locktime, + $auth_type = $dokuwiki::auth_type, + $ldap_version = $dokuwiki::ldap_version, + $ldap_servers = $dokuwiki::ldap_servers, + $ldap_user_tree = $dokuwiki::ldap_user_tree, + $ldap_user_filter = $dokuwiki::ldap_user_filter, + $ldap_user_scope = $dokuwiki::ldap_user_scope, + $ldap_user_account_attr = $dokuwiki::ldap_user_account_attr, + $ldap_group_tree = $dokuwiki::ldap_group_tree, + $ldap_group_filter = $dokuwiki::ldap_group_filter, + $ldap_group_scope = $dokuwiki::ldap_group_scope, + $ldap_starttls = $dokuwiki::ldap_starttls, + $ldap_use_sso = $dokuwiki::ldap_use_sso, + $ldap_recursive_search = $dokuwiki::ldap_recursive_search, + $ldap_binddn = $dokuwiki::ldap_binddn, + $ldap_bindpw = $dokuwiki::ldap_bindpw, + $use_referrals = $dokuwiki::use_referrals, + $ldap_mapping_name = $dokuwiki::ldap_mapping_name, + $ldap_mapping_groups = $dokuwiki::ldap_mapping_groups, +) { + + if $base_path == '' or $base_path =~ /\/$/ { + $base_path_suffix = '' + } else { + $base_path_suffix = '/' + } + + file { + "${install_dir}/${base_path}${base_path_suffix}conf/local.php": + content => template($local_conf_template), + owner => 'root', + group => 'root', + mode => '0444', + replace => false; + + "${install_dir}/${base_path}${base_path_suffix}conf/local.protected.php": + content => template($protected_conf_template), + owner => 'root', + group => 'root', + mode => '0444'; + + $data_dir: + ensure => directory, + owner => $apache_user, + group => $apache_group, + mode => '0664'; + } + + if $manage_vhost { + file { + "${apache_confdir}/${vhost}.conf": + content => template('dokuwiki/vhost.conf.erb'), + owner => 'root', + group => 'root', + mode => '0444'; + } + } + +} + diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..8865d8d --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,80 @@ +# == Class: dokuwiki +# +# See the README.md for documentation +# +class dokuwiki ( + $version = $dokuwiki::params::version, + $package_category = $dokuwiki::params::package_category, + $package_name = $dokuwiki::params::package_name, + $use_webapp_config = $dokuwiki::params::use_webapp_config, + $manage_vhost = $dokuwiki::params::manage_vhost, + $vhost = $dokuwiki::params::vhost, + $base_path = $dokuwiki::params::base_path, + $apache_confdir = $dokuwiki::params::apache_confdir, + $apache_user = $dokuwiki::params::apache_user, + $apache_group = $dokuwiki::params::apache_group, + $vhost_conf_template = $dokuwiki::params::vhost_conf_template, + $install_dir = $dokuwiki::params::install_dir, + $data_dir = $dokuwiki::params::data_dir, + $local_conf_template = $dokuwiki::params::local_conf_template, + $protected_conf_template = $dokuwiki::params::protected_conf_template, + $wiki_title = $dokuwiki::params::wiki_title, + $userewrite = $dokuwiki::params::userewrite, + $use_acl = $dokuwiki::params::use_acl, + $breadcrumbs = $dokuwiki::params::breadcrumbs, + $youarehere = $dokuwiki::params::youarehere, + $updatecheck = $dokuwiki::params::updatecheck, + $content_license = $dokuwiki::params::content_license, + $locktime = $dokuwiki::params::locktime, + $auth_type = $dokuwiki::params::auth_type, + $ldap_version = $dokuwiki::params::ldap_version, + $ldap_servers = $dokuwiki::params::ldap_servers, + $ldap_user_tree = $dokuwiki::params::ldap_user_tree, + $ldap_user_filter = $dokuwiki::params::ldap_user_filter, + $ldap_user_scope = $dokuwiki::params::ldap_user_scope, + $ldap_user_account_attr = $dokuwiki::params::ldap_user_account_attr, + $ldap_group_tree = $dokuwiki::params::ldap_group_tree, + $ldap_group_filter = $dokuwiki::params::ldap_group_filter, + $ldap_group_scope = $dokuwiki::params::ldap_group_scope, + $ldap_starttls = $dokuwiki::params::ldap_starttls, + $ldap_use_sso = $dokuwiki::params::ldap_use_sso, + $ldap_recursive_search = $dokuwiki::params::ldap_recursive_search, + $ldap_binddn = $dokuwiki::params::ldap_binddn, + $ldap_bindpw = $dokuwiki::params::ldap_bindpw, + $use_referrals = $dokuwiki::params::use_referrals, + $ldap_mapping_name = $dokuwiki::params::ldap_mapping_name, + $ldap_mapping_groups = $dokuwiki::params::ldap_mapping_groups, +) inherits dokuwiki::params { + + # Allow a big-endian date format with optional letter suffix + validate_re($version, '^\d{8}[a-z]?$') + validate_string($package_category) + validate_string($package_name) + validate_bool($use_webapp_config) + validate_bool($manage_vhost) + validate_string($vhost) + validate_string($base_path) + validate_string($apache_confdir) + validate_string($vhost_conf_template) + validate_absolute_path($install_dir) + validate_absolute_path($data_dir) + validate_string($local_conf_template) + validate_string($protected_conf_template) + + include '::dokuwiki::install' + include '::dokuwiki::config' + + # Anchor this as per #8040 - this ensures that classes won't float off and + # mess everything up. You can read about this at: + # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues + anchor { + 'dokuwiki::begin': ; + 'dokuwiki::end': ; + } + + Anchor['dokuwiki::begin'] + -> Class['::dokuwiki::install'] + -> Class['::dokuwiki::config'] + -> Anchor['dokuwiki::end'] + +} diff --git a/manifests/install.pp b/manifests/install.pp new file mode 100644 index 0000000..313baa0 --- /dev/null +++ b/manifests/install.pp @@ -0,0 +1,34 @@ +# == Class: dokuwiki::install +# +# See the README.md for documentation +# +class dokuwiki::install ( + $version = $dokuwiki::version, + $package_category = $dokuwiki::package_category, + $package_name = $dokuwiki::package_name, + $use_webapp_config = $dokuwiki::use_webapp_config, + $vhost = $dokuwiki::vhost, + $base_path = $dokuwiki::base_path, +) { + + package { + 'www-apps/dokuwiki': + ensure => $version, + category => $package_category, + name => $package_name; + } + + if $use_webapp_config { + webapp_config { + "dokuwiki-${version}": + action => 'install', + vhost => $vhost, + base => $base_path, + app => 'dokuwiki', + version => $version, + depends => Package['www-apps/dokuwiki']; + } + } + +} + diff --git a/manifests/params.pp b/manifests/params.pp new file mode 100644 index 0000000..63c2665 --- /dev/null +++ b/manifests/params.pp @@ -0,0 +1,61 @@ +# == Class: dokuwiki::params +# +# See the README.md for documentation +# +class dokuwiki::params { + + case $::osfamily { + 'Gentoo': { + $package_category = 'www-apps' + $package_name = 'dokuwiki' + $version = '20140929a' + $use_webapp_config = true + $apache_confdir = '/etc/apache/vhosts.d' + $apache_user = 'apache' + $apache_group = 'apache' + } + + default: { + fail("The ${module_name} module is not supported on an ${::osfamily} based system.") + } + } + + $manage_vhost = true + $vhost = 'dokuwiki.example.com' + $base_path = 'dokuwiki' + $install_dir = '/var/www/localhost/htdocs' + $data_dir = '/var/www/localhost/htdocs/data' + $vhost_conf_template = 'dokuwiki/vhost.conf.erb' + $local_conf_template = 'dokuwiki/local.php.erb' + $protected_conf_template = 'dokuwiki/local.protected.php.erb' + + # Configuration directives + $wiki_title = 'dokuwiki' + $userewrite = true + $use_acl = true + $breadcrumbs = false + $youarehere = true + $updatecheck = false + $content_license = 'CC-BY-SA' + $locktime = 30*60 + $auth_type = 'ldap' + $ldap_version = 3 + $ldap_servers = ['ldap'] + $ldap_user_tree = 'ou=People,dc=local' + $ldap_user_filter = '(&(uid=%{user})(objectClass=posixAccount))' + $ldap_user_scope = 'sub' + $ldap_user_account_attr = 'uid' + $ldap_group_tree = 'ou=Group,dc=local' + $ldap_group_filter = '(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUid=%{user})))' + $ldap_group_scope = 'sub' + $ldap_starttls = true + $ldap_use_sso = true + $ldap_recursive_search = true + $ldap_binddn = 'cn=admin,dc=local' + $ldap_bindpw = 'changeme' + $use_referrals = true + $ldap_mapping_name = 'name' + $ldap_mapping_groups = [] + +} + diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..217afe8 --- /dev/null +++ b/metadata.json @@ -0,0 +1,14 @@ +{ + "name": "optiz0r-dokuwiki", + "version": "0.1.0", + "author": "Ben Roberts", + "summary": "Installs and configures dokuwiki", + "license": "MIT", + "source": "https://gitlab.sihnon.net/ben/puppet-dokuwiki.git", + "project_page": "https://gitlab.sihnon.net/ben/puppet-dokuwiki", + "issues_url": "https://gitlab.sihnon.net/ben/puppet-dokuwiki/issues", + "dependencies": [ + {"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"} + ] +} + diff --git a/spec/classes/config_spec.rb b/spec/classes/config_spec.rb new file mode 100644 index 0000000..d09008a --- /dev/null +++ b/spec/classes/config_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' +describe 'dokuwiki::config' do + + context 'with defaults for all parameters' do + let(:params) {{ + :manage_vhost => true, + :vhost => 'dokuwiki.example.com', + :base_path => 'dokuwiki', + :apache_confdir => '/etc/apache2/vhosts.d', + :install_dir => '/var/www/localhost/htdocs', + :local_conf_template => 'dokuwiki/local.php.erb', + :protected_conf_template => 'dokuwiki/local.protected.php.erb', + :ldap_servers => ['ldap'], + }} + + it { should contain_file('/var/www/localhost/htdocs/dokuwiki/conf/local.php') } + it { + should contain_file('/var/www/localhost/htdocs/dokuwiki/conf/local.protected.php') + .with_content(/Managed by puppet/) + } + end +end + diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb new file mode 100644 index 0000000..f11b1f8 --- /dev/null +++ b/spec/classes/init_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' +describe 'dokuwiki' do + + context 'on unsupported distributions' do + let(:facts) {{ + :osfamily => 'Unsupported', + }} + + it 'we fail' do + expect { subject }.to raise_error(/not supported on an Unsupported/) + end + end + + context 'with defaults for all parameters' do + let(:facts) {{ + :osfamily => 'Gentoo', + }} + + it { should contain_class('dokuwiki') } + it { should contain_class('dokuwiki::install') } + it { should contain_class('dokuwiki::config') } + end +end diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb new file mode 100644 index 0000000..0ad46f6 --- /dev/null +++ b/spec/classes/install_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' +describe 'dokuwiki::install' do + + context 'with defaults for all parameters' do + it { should contain_package('www-apps/dokuwiki') } + end + + context 'on Gentoo' do + let(:params) {{ + :use_webapp_config => true, + :version => '123' + }} + + it { should contain_webapp_config('dokuwiki-123') } + end +end + diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..6735490 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'puppetlabs_spec_helper/module_spec_helper' +require 'hiera' diff --git a/templates/local.php.erb b/templates/local.php.erb new file mode 100644 index 0000000..9bd5f13 --- /dev/null +++ b/templates/local.php.erb @@ -0,0 +1,13 @@ +'; +$conf['savedir'] = '<%= @data_dir %>'; +$conf['useacl'] = <%= @use_acl ? 1 : 0 %>; +$conf['userewrite'] = <%= @use_rewrite ? 1 : 0 %>; + +# Disable use of any standard content licenses, e.g. CC +$conf['license'] = '<%= @content_license %>'; + +# Override the page lock timer +$conf['locktime'] = <%= @locktime %>; # 30*60 + +# User interface tweaks +$conf['breadcrumbs'] = <%= @breadcrumbs ? 1 : 0 %>; +$conf['youarehere'] = <%= @youarehere ? 1 : 0 %>; +$conf['updatecheck'] = <%= @updatecheck ? 1 : 0 %>; + +# Authentication +$conf['openregister'] = +$conf['authtype'] = '<%= @auth_type %>'; +<%- if @auth_type == 'ldap' -%> +$conf['auth']['ldap']['version'] = '<%= @ldap_version %>'; +$conf['auth']['ldap']['server'] = 'ldap://<%= @ldap_servers.join(" ") %>:389'; +$conf['auth']['ldap']['usertree'] = '<%= @ldap_user_tree %>'; +$conf['auth']['ldap']['userfilter'] = '<%= @ldap_user_filter %>'; +$conf['auth']['ldap']['userscope'] = '<%= @ldap_user_scope %>'; +$conf['auth']['ldap']['grouptree'] = '<%= @ldap_group_tree %>'; +$conf['auth']['ldap']['groupfilter'] = '<%= @ldap_group_filter %>'; +$conf['auth']['ldap']['groupscope'] = '<%= @ldap_group_scope %>'; +$conf['auth']['ldap']['starttls'] = <%= @ldap_starttls ? 1 : 0 %>; +$conf['auth']['ldap']['sso'] = <%= @ldap_use_sso ? 1 : 0 %>; +$conf['auth']['ldap']['recursive'] = <%= @ldap_recursive_search ? 1 : 0 %>; +$conf['auth']['ldap']['binddn'] = '<%= @ldap_binddn %>'; +$conf['auth']['ldap']['bindpw'] = '<%= @ldap_bindpw %>'; +$conf['auth']['ldap']['referrals'] = <%= @use_referrals ? 1 : 0 %>; +$conf['auth']['ldap']['mapping']['name'] = '<%= @ldap_mapping_name %>'; +$conf['auth']['ldap']['mapping']['grps'] = array(); +<%- @ldap_mapping_groups.each do |key, value| -%> +$conf['auth']['ldap']['mapping']['grps']['<%= key %>'] = '<%= value %>'; +<%- end -%> +$conf['auth']['ldap']['debug'] = 1; +<%- end -%> + +$conf['manager'] = '<%= @management_group %>'; +$conf['superuser'] = '<%= @management_group %>'; + diff --git a/templates/vhost.conf.erb b/templates/vhost.conf.erb new file mode 100644 index 0000000..79b6854 --- /dev/null +++ b/templates/vhost.conf.erb @@ -0,0 +1,60 @@ + + + ServerName <%= @vhost %> + DocumentRoot <%= @install_dir %>/<%= @base_path %> + + # Permit larger file uploads + php_value upload_max_filesize 20M + # Must be at least as large as upload_max_filesize, plus a bit + # for the form metadata + php_value post_max_size 24M + + /<%= @base_path %><%= @base_path_suffix %>"> + AllowOverride None + Options +FollowSymLinks + Order Allow,Deny + Allow from All + +<%- if @auth_type == 'ldap' -%> + AuthType Basic + AuthName "LDAP Auth" + AuthBasicProvider "ldap" + AuthLDAPUrl "ldap://<%= @ldap_servers.join(" ") %>:389/<%= @ldap_usertree %>?<%= @ldap_user_account_attr %>?<%= @ldap_user_scope %>" + Require valid-user +<%- end -%> + + RewriteEngine on + RewriteBase /<%= @base_path %><%= @base_path_suffix %> + RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] + RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] + RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] + RewriteRule ^$ doku.php [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule (.*) doku.php?id=$1 [QSA,L] + RewriteRule ^index.php$ doku.php + + + # Explicitly deny access to all code and configuration directories + /<%= @base_path %><%= @base_path_suffix %>/inc"> + Order Deny,Allow + Deny from all + + + /<%= @base_path %><%= @base_path_suffix %>/inc/lang"> + Order Deny,Allow + Deny from all + + + /<%= @base_path %><%= @base_path_suffix %>/lib/_fla"> + ## no access to the fla directory + Order allow,deny + Deny from all + + + + Order Deny,Allow + Deny from all + + + diff --git a/tests/init.pp b/tests/init.pp new file mode 100644 index 0000000..ad01491 --- /dev/null +++ b/tests/init.pp @@ -0,0 +1,12 @@ +# The baseline for module testing used by Puppet Labs is that each manifest +# should have a corresponding test manifest that declares that class or defined +# type. +# +# Tests are then run by using puppet apply --noop (to check for compilation +# errors and view a log of events) or by fully applying the test in a virtual +# environment (to compare the resulting system state to the desired state). +# +# Learn more about module testing here: +# http://docs.puppetlabs.com/guides/tests_smoke.html +# +include dokuwiki