update apache puppet module

This commit is contained in:
Z. Cliffe Schreuders
2022-07-29 12:26:38 +01:00
parent d44c8f561a
commit 371d0597bf
337 changed files with 29072 additions and 20178 deletions

View File

@@ -0,0 +1,9 @@
{
"excludes": [
"**/contrib/**",
"**/examples/**",
"**/tests/**",
"**/spec/**",
"**/pkg/**"
]
}

View File

@@ -0,0 +1,84 @@
name: "Auto release"
on:
workflow_dispatch:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
auto_release:
name: "Automatic release prep"
runs-on: ubuntu-20.04
steps:
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
- name: "Honeycomb: start first step"
run: |
echo STEP_ID="auto-release" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
if: ${{ github.repository_owner == 'puppetlabs' }}
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: "PDK Release prep"
uses: docker://puppet/iac_release:ci
with:
args: 'release prep --force'
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Get Version"
if: ${{ github.repository_owner == 'puppetlabs' }}
id: gv
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: "Commit changes"
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
- name: Create Pull Request
id: cpr
uses: puppetlabs/peter-evans-create-pull-request@v3
if: ${{ github.repository_owner == 'puppetlabs' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
branch: "release-prep"
delete-branch: true
title: "Release prep v${{ steps.gv.outputs.ver }}"
body: |
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}.
Please verify before merging:
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
labels: "maintenance"
- name: PR outputs
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: "Honeycomb: Record finish step"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'

View File

@@ -0,0 +1,204 @@
name: "nightly"
on:
schedule:
- cron: '0 0 * * *'
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
- name: "Honeycomb: Start first step"
run: |
echo STEP_ID=setup-environment >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
if: ${{ github.repository_owner == 'puppetlabs' }}
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
if: ${{ github.repository_owner == 'puppetlabs' }}
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Setup Acceptance Test Matrix
id: get-matrix
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
else
echo "::set-output name=matrix::{}"
fi
- name: "Honeycomb: Record Setup Test Matrix time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
needs:
- setup_matrix
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
env:
BUILDEVENT_FILE: '../buildevents.txt'
steps:
- run: |
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
- name: "Honeycomb: start first step"
run: |
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Provision test environment
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
echo ::group::=== REQUEST ===
cat request.json || true
echo
echo ::endgroup::
echo ::group::=== INVENTORY ===
if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
then
FILE='spec/fixtures/litmus_inventory.yaml'
elif [ -f 'inventory.yaml' ];
then
FILE='inventory.yaml'
fi
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
echo ::endgroup::
- name: Install agent
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
- name: Install module
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
- name: "Honeycomb: Record deployment times"
if: ${{ always() }}
run: |
echo ::group::honeycomb step
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: Run acceptance tests
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
- name: "Honeycomb: Record acceptance testing times"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
echo ::group::=== REQUEST ===
cat request.json || true
echo
echo ::endgroup::
fi
- name: "Honeycomb: Record removal times"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
slack-workflow-status:
if: always()
name: Post Workflow Status To Slack
needs:
- Acceptance
runs-on: ubuntu-20.04
steps:
- name: Slack Workflow Notification
uses: puppetlabs/Gamesight-slack-workflow-status@pdk-templates-v1
with:
# Required Input
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
# Optional Input
channel: '#team-ia-bots'
name: 'GABot'

View File

@@ -0,0 +1,184 @@
name: "PR Testing"
on: [pull_request]
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
- name: "Honeycomb: Start first step"
run: |
echo STEP_ID=setup-environment >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
if: ${{ github.repository_owner == 'puppetlabs' }}
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
if: ${{ github.repository_owner == 'puppetlabs' }}
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Setup Acceptance Test Matrix
id: get-matrix
run: |
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
else
echo "::set-output name=matrix::{}"
fi
- name: "Honeycomb: Record Setup Test Matrix time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
env:
BUILDEVENT_FILE: '../buildevents.txt'
steps:
- run: |
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
- name: "Honeycomb: start first step"
run: |
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Provision test environment
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
echo ::group::=== REQUEST ===
cat request.json || true
echo
echo ::endgroup::
echo ::group::=== INVENTORY ===
if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
then
FILE='spec/fixtures/litmus_inventory.yaml'
elif [ -f 'inventory.yaml' ];
then
FILE='inventory.yaml'
fi
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
echo ::endgroup::
- name: Install agent
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
- name: Install module
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
- name: "Honeycomb: Record deployment times"
if: ${{ always() }}
run: |
echo ::group::honeycomb step
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
echo ::endgroup::
- name: Run acceptance tests
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
- name: "Honeycomb: Record acceptance testing times"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
echo ::group::=== REQUEST ===
cat request.json || true
echo
echo ::endgroup::
fi
- name: "Honeycomb: Record removal times"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'

View File

@@ -0,0 +1,47 @@
name: "Publish module"
on:
workflow_dispatch:
jobs:
create-github-release:
name: Deploy GitHub Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
- name: Get Version
id: gv
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.gv.outputs.ver }}"
draft: false
prerelease: false
deploy-forge:
name: Deploy to Forge
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:nightly
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:nightly
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'

View File

@@ -0,0 +1,124 @@
name: "Spec Tests"
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
pull_request:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
spec_matrix: ${{ steps.get-matrix.outputs.spec_matrix }}
steps:
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
- name: "Honeycomb: Start first step"
run: |
echo STEP_ID=setup-environment >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Checkout Source
uses: actions/checkout@v2
if: ${{ github.repository_owner == 'puppetlabs' }}
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
if: ${{ github.repository_owner == 'puppetlabs' }}
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: "Honeycomb: Record Setup Environment time"
if: ${{ github.repository_owner == 'puppetlabs' }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: Setup Acceptance Test Matrix
id: get-matrix
run: |
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
else
echo "::set-output name=spec_matrix::{}"
fi
- name: "Honeycomb: Record Setup Test Matrix time"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
Spec:
name: "Spec Tests (Puppet: ${{matrix.puppet_version}}, Ruby Ver: ${{matrix.ruby_version}})"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.spec_matrix != '{}' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.spec_matrix)}}
env:
BUILDEVENT_FILE: '../buildevents.txt'
PUPPET_GEM_VERSION: ${{ matrix.puppet_version }}
steps:
- run: |
echo "SANITIZED_PUPPET_VERSION=$(echo '${{ matrix.puppet_version }}' | sed 's/~> //g')" >> $GITHUB_ENV
- run: |
echo 'puppet_version=${{ env.SANITIZED_PUPPET_VERSION }}' >> $BUILDEVENT_FILE
- name: "Honeycomb: Start first step"
run: |
echo "STEP_ID=${{ env.SANITIZED_PUPPET_VERSION }}-spec" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}
matrix-key: ${{ env.SANITIZED_PUPPET_VERSION }}
- name: Checkout Source
uses: actions/checkout@v2
- name: "Activate Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby_version}}
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
echo ::endgroup::
- name: Run parallel_spec tests
run: |
buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec

View File

@@ -0,0 +1,18 @@
FROM gitpod/workspace-full
RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \
wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \
sudo dpkg -i puppet6-release-bionic.deb && \
sudo dpkg -i puppet-tools-release-bionic.deb && \
sudo apt-get update && \
sudo apt-get install -y pdk zsh puppet-agent && \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
RUN sudo usermod -s $(which zsh) gitpod && \
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \
echo 'PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin"' >> /home/gitpod/.zshrc && \
sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \
mkdir -p /home/gitpod/.config/puppet && \
/opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml
RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb
ENTRYPOINT /usr/bin/zsh

View File

@@ -0,0 +1,9 @@
image:
file: .gitpod.Dockerfile
tasks:
- init: pdk bundle install
vscode:
extensions:
- puppet.puppet-vscode@1.2.0:f5iEPbmOj6FoFTOV6q8LTg==

View File

@@ -0,0 +1,31 @@
---
default_set: 'centos-64-x64'
sets:
'centos-59-x64':
nodes:
"main.foo.vm":
prefab: 'centos-59-x64'
'centos-64-x64':
nodes:
"main.foo.vm":
prefab: 'centos-64-x64'
'fedora-18-x64':
nodes:
"main.foo.vm":
prefab: 'fedora-18-x64'
'debian-607-x64':
nodes:
"main.foo.vm":
prefab: 'debian-607-x64'
'debian-70rc1-x64':
nodes:
"main.foo.vm":
prefab: 'debian-70rc1-x64'
'ubuntu-server-10044-x64':
nodes:
"main.foo.vm":
prefab: 'ubuntu-server-10044-x64'
'ubuntu-server-12042-x64':
nodes:
"main.foo.vm":
prefab: 'ubuntu-server-12042-x64'

View File

@@ -0,0 +1,18 @@
Style/GlobalVars:
Enabled: false
RSpec/InstanceVariable:
Enabled: false
RSpec/RepeatedExample:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/NamedSubject:
Enabled: false
RSpec/VoidExpect:
Enabled: false
RSpec/AnyInstance:
Enabled: false
RSpec/FilePath:
Enabled: false
RSpec/EmptyExampleGroup:
Enabled: false

View File

@@ -1,7 +1,572 @@
# Change log
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org).
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
## [v7.0.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v7.0.0) (2021-10-11)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.5.1...v7.0.0)
### Changed
- Drop Debian \< 8 and Ubuntu \< 14.04 code [\#2189](https://github.com/puppetlabs/puppetlabs-apache/pull/2189) ([ekohl](https://github.com/ekohl))
- Drop support and compatibility for Debian \< 9 and Ubuntu \< 16.04 [\#2123](https://github.com/puppetlabs/puppetlabs-apache/pull/2123) ([ekohl](https://github.com/ekohl))
### Added
- pdksync - \(IAC-1751\) - Add Support for Rocky 8 [\#2196](https://github.com/puppetlabs/puppetlabs-apache/pull/2196) ([david22swan](https://github.com/david22swan))
- Allow `docroot` with `mod_vhost_alias` `virtual_docroot` [\#2195](https://github.com/puppetlabs/puppetlabs-apache/pull/2195) ([yakatz](https://github.com/yakatz))
### Fixed
- Restore Ubuntu 14.04 support in suphp [\#2193](https://github.com/puppetlabs/puppetlabs-apache/pull/2193) ([ekohl](https://github.com/ekohl))
- add double quote on scope parameter [\#2191](https://github.com/puppetlabs/puppetlabs-apache/pull/2191) ([aba-rechsteiner](https://github.com/aba-rechsteiner))
- Debian 11: fix typo in `versioncmp()` / set default php to 7.4 [\#2186](https://github.com/puppetlabs/puppetlabs-apache/pull/2186) ([bastelfreak](https://github.com/bastelfreak))
## [v6.5.1](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.5.1) (2021-08-25)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.5.0...v6.5.1)
### Fixed
- \(maint\) Allow stdlib 8.0.0 [\#2184](https://github.com/puppetlabs/puppetlabs-apache/pull/2184) ([smortex](https://github.com/smortex))
## [v6.5.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.5.0) (2021-08-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.4.0...v6.5.0)
### Added
- pdksync - \(IAC-1709\) - Add Support for Debian 11 [\#2180](https://github.com/puppetlabs/puppetlabs-apache/pull/2180) ([david22swan](https://github.com/david22swan))
## [v6.4.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.4.0) (2021-08-02)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.3.1...v6.4.0)
### Added
- \(MODULES-11075\) Improve future version handling for RHEL [\#2174](https://github.com/puppetlabs/puppetlabs-apache/pull/2174) ([mwhahaha](https://github.com/mwhahaha))
- Allow custom userdir directives [\#2164](https://github.com/puppetlabs/puppetlabs-apache/pull/2164) ([hunner](https://github.com/hunner))
- Add feature to reload apache service when content of ssl files has changed [\#2157](https://github.com/puppetlabs/puppetlabs-apache/pull/2157) ([timdeluxe](https://github.com/timdeluxe))
## [v6.3.1](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.3.1) (2021-07-22)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.3.0...v6.3.1)
### Fixed
- \(MODULES-10899\) Load php module with the right libphp file [\#2166](https://github.com/puppetlabs/puppetlabs-apache/pull/2166) ([sheenaajay](https://github.com/sheenaajay))
- \(maint\) Fix puppet-strings docs on apache::vhost [\#2165](https://github.com/puppetlabs/puppetlabs-apache/pull/2165) ([ekohl](https://github.com/ekohl))
## [v6.3.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.3.0) (2021-06-22)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/kps_ssl_reload_and_cache_disk_combined_tag...v6.3.0)
### Added
- The default disk\_cache.conf.erb caches everything. [\#2142](https://github.com/puppetlabs/puppetlabs-apache/pull/2142) ([Pawa2NR](https://github.com/Pawa2NR))
### Fixed
- Update the default version of Apache for Amazon Linux 2 [\#2158](https://github.com/puppetlabs/puppetlabs-apache/pull/2158) ([turnopil](https://github.com/turnopil))
- Only warn about servername logging if relevant [\#2154](https://github.com/puppetlabs/puppetlabs-apache/pull/2154) ([ekohl](https://github.com/ekohl))
## [kps_ssl_reload_and_cache_disk_combined_tag](https://github.com/puppetlabs/puppetlabs-apache/tree/kps_ssl_reload_and_cache_disk_combined_tag) (2021-06-14)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.2.0...kps_ssl_reload_and_cache_disk_combined_tag)
## [v6.2.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.2.0) (2021-05-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.1.0...v6.2.0)
### Added
- \(MODULES-11068\) Allow apache::vhost ssl\_honorcipherorder to take boolean parameter [\#2152](https://github.com/puppetlabs/puppetlabs-apache/pull/2152) ([davidc](https://github.com/davidc))
## [v6.1.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.1.0) (2021-05-17)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.0.1...v6.1.0)
### Added
- support for uri for severname with use\_servername\_for\_filenames [\#2150](https://github.com/puppetlabs/puppetlabs-apache/pull/2150) ([Zarne](https://github.com/Zarne))
- \(MODULES-11061\) mod\_security custom rule functionality [\#2145](https://github.com/puppetlabs/puppetlabs-apache/pull/2145) ([k2patel](https://github.com/k2patel))
## [v6.0.1](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.0.1) (2021-05-10)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v6.0.0...v6.0.1)
### Fixed
- Fix HEADER\* and README\* wildcards in IndexIgnore [\#2138](https://github.com/puppetlabs/puppetlabs-apache/pull/2138) ([keto](https://github.com/keto))
- Fix dav\_svn for Debian 10 [\#2135](https://github.com/puppetlabs/puppetlabs-apache/pull/2135) ([martijndegouw](https://github.com/martijndegouw))
## [v6.0.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.0.0) (2021-03-02)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.10.0...v6.0.0)
### Changed
- pdksync - \(MAINT\) Remove SLES 11 support [\#2132](https://github.com/puppetlabs/puppetlabs-apache/pull/2132) ([sanfrancrisko](https://github.com/sanfrancrisko))
- pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 [\#2125](https://github.com/puppetlabs/puppetlabs-apache/pull/2125) ([carabasdaniel](https://github.com/carabasdaniel))
## [v5.10.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.10.0) (2021-02-17)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.9.0...v5.10.0)
### Added
- \(IAC-1186\) Add $use\_port\_for\_filenames parameter [\#2122](https://github.com/puppetlabs/puppetlabs-apache/pull/2122) ([smortex](https://github.com/smortex))
### Fixed
- \(MODULES-10899\) Handle PHP8 MOD package naming convention changes [\#2121](https://github.com/puppetlabs/puppetlabs-apache/pull/2121) ([sanfrancrisko](https://github.com/sanfrancrisko))
## [v5.9.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.9.0) (2021-01-25)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.8.0...v5.9.0)
### Added
- Add ssl\_user\_name vhost parameter [\#2093](https://github.com/puppetlabs/puppetlabs-apache/pull/2093) ([bodgit](https://github.com/bodgit))
- Add support for mod\_md [\#2090](https://github.com/puppetlabs/puppetlabs-apache/pull/2090) ([smortex](https://github.com/smortex))
### Fixed
- \(FIX\) Correct PHP packages on Ubuntu 16.04 [\#2111](https://github.com/puppetlabs/puppetlabs-apache/pull/2111) ([ekohl](https://github.com/ekohl))
## [v5.8.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.8.0) (2020-12-07)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.7.0...v5.8.0)
### Added
- \(MODULES-10887\) Set `use_servername_for_filenames` for defaults [\#2103](https://github.com/puppetlabs/puppetlabs-apache/pull/2103) ([towo](https://github.com/towo))
- pdksync - \(feat\) Add support for Puppet 7 [\#2101](https://github.com/puppetlabs/puppetlabs-apache/pull/2101) ([daianamezdrea](https://github.com/daianamezdrea))
- \(feat\) Add support for apreq2 MOD on Debian 9, 10 [\#2085](https://github.com/puppetlabs/puppetlabs-apache/pull/2085) ([TigerKriika](https://github.com/TigerKriika))
### Fixed
- \(fix\) Convert unnecessary multi line warnings to single lines [\#2104](https://github.com/puppetlabs/puppetlabs-apache/pull/2104) ([rj667](https://github.com/rj667))
- Fix bool2httpd function call for older ruby versions [\#2102](https://github.com/puppetlabs/puppetlabs-apache/pull/2102) ([carabasdaniel](https://github.com/carabasdaniel))
- Use Ruby 2.7 compatible string matching [\#2060](https://github.com/puppetlabs/puppetlabs-apache/pull/2060) ([ekohl](https://github.com/ekohl))
## [v5.7.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.7.0) (2020-11-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.6.0...v5.7.0)
### Added
- Add cas\_cookie\_path in vhosts [\#2089](https://github.com/puppetlabs/puppetlabs-apache/pull/2089) ([yakatz](https://github.com/yakatz))
- \(IAC-1186\) Add new $use\_servername\_for\_filenames parameter [\#2086](https://github.com/puppetlabs/puppetlabs-apache/pull/2086) ([sanfrancrisko](https://github.com/sanfrancrisko))
- Allow relative paths in oidc\_redirect\_uri [\#2082](https://github.com/puppetlabs/puppetlabs-apache/pull/2082) ([sanfrancrisko](https://github.com/sanfrancrisko))
- Improve SSLVerify options [\#2081](https://github.com/puppetlabs/puppetlabs-apache/pull/2081) ([bovy89](https://github.com/bovy89))
- Change icon path [\#2079](https://github.com/puppetlabs/puppetlabs-apache/pull/2079) ([yakatz](https://github.com/yakatz))
- Support mod\_auth\_gssapi parameters [\#2078](https://github.com/puppetlabs/puppetlabs-apache/pull/2078) ([traylenator](https://github.com/traylenator))
- Add ssl\_proxy\_machine\_cert\_chain param to vhost class [\#2072](https://github.com/puppetlabs/puppetlabs-apache/pull/2072) ([AbelNavarro](https://github.com/AbelNavarro))
### Fixed
- Use Ruby 2.7 compatible string matching [\#2074](https://github.com/puppetlabs/puppetlabs-apache/pull/2074) ([sanfrancrisko](https://github.com/sanfrancrisko))
## [v5.6.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.6.0) (2020-10-01)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.5.0...v5.6.0)
### Added
- Configure default shared lib path for mod\_wsgi on RHEL8 [\#2063](https://github.com/puppetlabs/puppetlabs-apache/pull/2063) ([nbarrientos](https://github.com/nbarrientos))
- Various enhancements to apache::mod::passenger [\#2058](https://github.com/puppetlabs/puppetlabs-apache/pull/2058) ([smortex](https://github.com/smortex))
### Fixed
- make apache::mod::fcgid redhat 8 compatible [\#2071](https://github.com/puppetlabs/puppetlabs-apache/pull/2071) ([creativefre](https://github.com/creativefre))
- pdksync - \(feat\) - Removal of inappropriate terminology [\#2062](https://github.com/puppetlabs/puppetlabs-apache/pull/2062) ([pmcmaw](https://github.com/pmcmaw))
- Use python3-mod\_wsgi instead of mod\_wsgi on CentOS8 [\#2052](https://github.com/puppetlabs/puppetlabs-apache/pull/2052) ([kajinamit](https://github.com/kajinamit))
## [v5.5.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.5.0) (2020-07-03)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.4.0...v5.5.0)
### Added
- Allow IPv6 CIDRs for proxy\_protocol\_exceptions in mod remoteip [\#2033](https://github.com/puppetlabs/puppetlabs-apache/pull/2033) ([thechristschn](https://github.com/thechristschn))
- \(IAC-746\) - Add ubuntu 20.04 support [\#2032](https://github.com/puppetlabs/puppetlabs-apache/pull/2032) ([david22swan](https://github.com/david22swan))
- Replace legacy `bool2httpd()` function with shim [\#2025](https://github.com/puppetlabs/puppetlabs-apache/pull/2025) ([alexjfisher](https://github.com/alexjfisher))
- Tidy up `pw_hash` function [\#2024](https://github.com/puppetlabs/puppetlabs-apache/pull/2024) ([alexjfisher](https://github.com/alexjfisher))
- Replace validate\_apache\_loglevel\(\) with data type [\#2023](https://github.com/puppetlabs/puppetlabs-apache/pull/2023) ([alexjfisher](https://github.com/alexjfisher))
- Add ProxyIOBufferSize option [\#2014](https://github.com/puppetlabs/puppetlabs-apache/pull/2014) ([jplindquist](https://github.com/jplindquist))
- Add support for SetInputFilter directive [\#2007](https://github.com/puppetlabs/puppetlabs-apache/pull/2007) ([HoucemEddine](https://github.com/HoucemEddine))
- \[MODULES-10530\] Add request limiting directives on virtual host level [\#1996](https://github.com/puppetlabs/puppetlabs-apache/pull/1996) ([aursu](https://github.com/aursu))
- \[MODULES-10528\] Add ErrorLogFormat directive on virtual host level [\#1995](https://github.com/puppetlabs/puppetlabs-apache/pull/1995) ([aursu](https://github.com/aursu))
- Add template variables and parameters for ModSecurity Audit Logs [\#1988](https://github.com/puppetlabs/puppetlabs-apache/pull/1988) ([jplindquist](https://github.com/jplindquist))
- \(MODULES-10432\) Add mod\_auth\_openidc support [\#1987](https://github.com/puppetlabs/puppetlabs-apache/pull/1987) ([asieraguado](https://github.com/asieraguado))
### Fixed
- \(MODULES-10712\) Fix mod\_ldap on RH/CentOS 5 and 6 [\#2041](https://github.com/puppetlabs/puppetlabs-apache/pull/2041) ([h-haaks](https://github.com/h-haaks))
- Update mod\_dir, alias\_icons\_path, error\_documents\_path for CentOS 8 [\#2038](https://github.com/puppetlabs/puppetlabs-apache/pull/2038) ([initrd](https://github.com/initrd))
- Ensure switching of thread module works on Debian 10 / Ubuntu 20.04 [\#2034](https://github.com/puppetlabs/puppetlabs-apache/pull/2034) ([tuxmea](https://github.com/tuxmea))
- MODULES-10586 Centos 8: wrong package used to install mod\_authnz\_ldap [\#2021](https://github.com/puppetlabs/puppetlabs-apache/pull/2021) ([farebers](https://github.com/farebers))
- Re-add package for fcgid on debian/ubuntu machines [\#2006](https://github.com/puppetlabs/puppetlabs-apache/pull/2006) ([vStone](https://github.com/vStone))
- Use ldap\_trusted\_mode in conditional [\#1999](https://github.com/puppetlabs/puppetlabs-apache/pull/1999) ([dacron](https://github.com/dacron))
- Typo in oidcsettings.pp [\#1997](https://github.com/puppetlabs/puppetlabs-apache/pull/1997) ([asieraguado](https://github.com/asieraguado))
- Fix proxy\_html Module to work on Debian 10 [\#1994](https://github.com/puppetlabs/puppetlabs-apache/pull/1994) ([buchstabensalat](https://github.com/buchstabensalat))
- \(MODULES-10360\) Fix icon paths for RedHat systems [\#1991](https://github.com/puppetlabs/puppetlabs-apache/pull/1991) ([2and3makes23](https://github.com/2and3makes23))
- SSLProxyEngine on has to be set before any Proxydirective using it [\#1989](https://github.com/puppetlabs/puppetlabs-apache/pull/1989) ([zivis](https://github.com/zivis))
## [v5.4.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.4.0) (2020-01-22)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.3.0...v5.4.0)
### Added
- Add an apache::vhost::fragment define [\#1980](https://github.com/puppetlabs/puppetlabs-apache/pull/1980) ([ekohl](https://github.com/ekohl))
### Fixed
- \(MODULES-10391\) ssl\_protocol includes SSLv2 and SSLv3 on all platforms [\#1990](https://github.com/puppetlabs/puppetlabs-apache/pull/1990) ([legooolas](https://github.com/legooolas))
## [v5.3.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.3.0) (2019-12-11)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.2.0...v5.3.0)
### Added
- \(FM-8672\) - Addition of Support for CentOS 8 [\#1977](https://github.com/puppetlabs/puppetlabs-apache/pull/1977) ([david22swan](https://github.com/david22swan))
- \(MODULES-9948\) Allow switching of thread modules [\#1961](https://github.com/puppetlabs/puppetlabs-apache/pull/1961) ([tuxmea](https://github.com/tuxmea))
### Fixed
- Fix newline being added before proxy params [\#1984](https://github.com/puppetlabs/puppetlabs-apache/pull/1984) ([oxc](https://github.com/oxc))
- When using mod jk, we expect the libapache2-mod-jk package to be installed [\#1979](https://github.com/puppetlabs/puppetlabs-apache/pull/1979) ([tuxmea](https://github.com/tuxmea))
- move unless into manage\_security\_corerules [\#1976](https://github.com/puppetlabs/puppetlabs-apache/pull/1976) ([SimonHoenscheid](https://github.com/SimonHoenscheid))
- Change mod\_proxy's ProxyTimeout to follow Apache's global timeout [\#1975](https://github.com/puppetlabs/puppetlabs-apache/pull/1975) ([gcoxmoz](https://github.com/gcoxmoz))
- \(FM-8721\) fix php version and ssl error on redhat8 [\#1973](https://github.com/puppetlabs/puppetlabs-apache/pull/1973) ([sheenaajay](https://github.com/sheenaajay))
## [v5.2.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.2.0) (2019-11-01)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.1.0...v5.2.0)
### Added
- Add parameter version for mod security [\#1953](https://github.com/puppetlabs/puppetlabs-apache/pull/1953) ([tuxmea](https://github.com/tuxmea))
- add possibility to define variables inside VirtualHost definition [\#1947](https://github.com/puppetlabs/puppetlabs-apache/pull/1947) ([trefzer](https://github.com/trefzer))
### Fixed
- \(FM-8662\) Correction in manifests/mod/ssl.pp for SLES 11 [\#1963](https://github.com/puppetlabs/puppetlabs-apache/pull/1963) ([sanfrancrisko](https://github.com/sanfrancrisko))
- always quote ExpiresDefault in vhost::directories [\#1958](https://github.com/puppetlabs/puppetlabs-apache/pull/1958) ([evgeni](https://github.com/evgeni))
- MODULES-9904 Fix lbmethod module load order [\#1956](https://github.com/puppetlabs/puppetlabs-apache/pull/1956) ([optiz0r](https://github.com/optiz0r))
- Add owner, group, file\_mode and show\_diff to apache::custom\_config [\#1942](https://github.com/puppetlabs/puppetlabs-apache/pull/1942) ([treydock](https://github.com/treydock))
- Add shibboleth support for Debian 10 [\#1939](https://github.com/puppetlabs/puppetlabs-apache/pull/1939) ([fabbks](https://github.com/fabbks))
## [v5.1.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.1.0) (2019-09-13)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.0.0...v5.1.0)
### Added
- \(FM-8393\) add support on Debian 10 [\#1945](https://github.com/puppetlabs/puppetlabs-apache/pull/1945) ([ThoughtCrhyme](https://github.com/ThoughtCrhyme))
- FM-8140 Add Redhat 8 support [\#1941](https://github.com/puppetlabs/puppetlabs-apache/pull/1941) ([sheenaajay](https://github.com/sheenaajay))
- \(FM-8214\) converted to use litmus [\#1938](https://github.com/puppetlabs/puppetlabs-apache/pull/1938) ([tphoney](https://github.com/tphoney))
- \(MODULES-9668 \) Please make ProxyRequests setting in vhost.pp configurable [\#1935](https://github.com/puppetlabs/puppetlabs-apache/pull/1935) ([aukesj](https://github.com/aukesj))
- Added unmanaged\_path and custom\_fragment options to userdir [\#1931](https://github.com/puppetlabs/puppetlabs-apache/pull/1931) ([GeorgeCox](https://github.com/GeorgeCox))
- Add LDAP parameters to httpd.conf [\#1930](https://github.com/puppetlabs/puppetlabs-apache/pull/1930) ([daveseff](https://github.com/daveseff))
- Add LDAPReferrals configuration parameter [\#1928](https://github.com/puppetlabs/puppetlabs-apache/pull/1928) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB))
### Fixed
- \(MODULES-9104\) Add file\_mode to config files. [\#1922](https://github.com/puppetlabs/puppetlabs-apache/pull/1922) ([stevegarn](https://github.com/stevegarn))
- \(bugfix\) Add default package name for mod\_ldap [\#1913](https://github.com/puppetlabs/puppetlabs-apache/pull/1913) ([turnopil](https://github.com/turnopil))
- Remove event mpm when using prefork, worker or itk [\#1905](https://github.com/puppetlabs/puppetlabs-apache/pull/1905) ([tuxmea](https://github.com/tuxmea))
## [v5.0.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.0.0) (2019-05-20)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/4.1.0...v5.0.0)
### Changed
- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#1908](https://github.com/puppetlabs/puppetlabs-apache/pull/1908) ([david22swan](https://github.com/david22swan))
### Added
- \(FM-7923\) Implement Puppet Strings [\#1916](https://github.com/puppetlabs/puppetlabs-apache/pull/1916) ([eimlav](https://github.com/eimlav))
- Define SCL package name for mod\_ldap [\#1893](https://github.com/puppetlabs/puppetlabs-apache/pull/1893) ([treydock](https://github.com/treydock))
### Fixed
- \(MODULES-9014\) Improve SSLSessionTickets handling [\#1923](https://github.com/puppetlabs/puppetlabs-apache/pull/1923) ([FredericLespez](https://github.com/FredericLespez))
- \(MODULES-8931\) Fix stahnma/epel failures [\#1914](https://github.com/puppetlabs/puppetlabs-apache/pull/1914) ([eimlav](https://github.com/eimlav))
- Fix wsgi\_daemon\_process to support hash data type [\#1884](https://github.com/puppetlabs/puppetlabs-apache/pull/1884) ([mdechiaro](https://github.com/mdechiaro))
## [4.1.0](https://github.com/puppetlabs/puppetlabs-apache/tree/4.1.0) (2019-04-05)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/4.0.0...4.1.0)
### Added
- \(MODULES-7196\) Allow setting CASRootProxiedAs per virtualhost \(replaces \#1857\) [\#1900](https://github.com/puppetlabs/puppetlabs-apache/pull/1900) ([Lavinia-Dan](https://github.com/Lavinia-Dan))
- \(feat\) - Amazon Linux 2 compatibility added [\#1898](https://github.com/puppetlabs/puppetlabs-apache/pull/1898) ([david22swan](https://github.com/david22swan))
- \(MODULES-8731\) Allow CIDRs for proxy\_ips/internal\_proxy in remoteip [\#1891](https://github.com/puppetlabs/puppetlabs-apache/pull/1891) ([JAORMX](https://github.com/JAORMX))
- Manage all mod\_remoteip parameters supported by Apache [\#1882](https://github.com/puppetlabs/puppetlabs-apache/pull/1882) ([johanfleury](https://github.com/johanfleury))
- MODULES-8541 : Allow HostnameLookups to be modified [\#1881](https://github.com/puppetlabs/puppetlabs-apache/pull/1881) ([k2patel](https://github.com/k2patel))
- Add support for mod\_http2 [\#1867](https://github.com/puppetlabs/puppetlabs-apache/pull/1867) ([smortex](https://github.com/smortex))
- Added code to paramertize the libphp prefix [\#1852](https://github.com/puppetlabs/puppetlabs-apache/pull/1852) ([grahamuk2018](https://github.com/grahamuk2018))
- Added WSGI Options WSGIApplicationGroup and WSGIPythonOptimize [\#1847](https://github.com/puppetlabs/puppetlabs-apache/pull/1847) ([emetriqLikedeeler](https://github.com/emetriqLikedeeler))
### Fixed
- \(bugfix\) set kernel for facter version test [\#1895](https://github.com/puppetlabs/puppetlabs-apache/pull/1895) ([tphoney](https://github.com/tphoney))
- \(MODULES-5990\) - Managing conf\_enabled [\#1875](https://github.com/puppetlabs/puppetlabs-apache/pull/1875) ([david22swan](https://github.com/david22swan))
## [4.0.0](https://github.com/puppetlabs/puppetlabs-apache/tree/4.0.0) (2019-01-10)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/3.5.0...4.0.0)
### Changed
- default server\_tokens to prod - more secure default [\#1746](https://github.com/puppetlabs/puppetlabs-apache/pull/1746) ([juju4](https://github.com/juju4))
### Added
- \(Modules 8141/Modules 8379\) - Addition of support for SLES 15 [\#1862](https://github.com/puppetlabs/puppetlabs-apache/pull/1862) ([david22swan](https://github.com/david22swan))
- SCL support for httpd and php7.1 [\#1822](https://github.com/puppetlabs/puppetlabs-apache/pull/1822) ([mmoll](https://github.com/mmoll))
### Fixed
- \(MODULES-5990\) - conf-enabled defaulted to undef [\#1869](https://github.com/puppetlabs/puppetlabs-apache/pull/1869) ([david22swan](https://github.com/david22swan))
- pdksync - \(FM-7655\) Fix rubygems-update for ruby \< 2.3 [\#1866](https://github.com/puppetlabs/puppetlabs-apache/pull/1866) ([tphoney](https://github.com/tphoney))
## [3.5.0](https://github.com/puppetlabs/puppetlabs-apache/tree/3.5.0) (2018-12-17)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/3.4.0...3.5.0)
### Added
- \(MODULES-5990\) Addition of 'IncludeOptional conf-enabled/\*.conf' to apache2.conf' on Debian Family OS [\#1851](https://github.com/puppetlabs/puppetlabs-apache/pull/1851) ([david22swan](https://github.com/david22swan))
- \(MODULES-8107\) - Support added for Ubuntu 18.04. [\#1850](https://github.com/puppetlabs/puppetlabs-apache/pull/1850) ([david22swan](https://github.com/david22swan))
- \(MODULES-8108\) - Support added for Debian 9 [\#1849](https://github.com/puppetlabs/puppetlabs-apache/pull/1849) ([david22swan](https://github.com/david22swan))
- Add option to add comments to the header of a vhost file [\#1841](https://github.com/puppetlabs/puppetlabs-apache/pull/1841) ([jovandeginste](https://github.com/jovandeginste))
### Fixed
- \(FM-7605\) - Disabling conf\_enabled on Ubuntu 18.04 by default as it conflicts with Shibboleth causing errors with apache2. [\#1856](https://github.com/puppetlabs/puppetlabs-apache/pull/1856) ([david22swan](https://github.com/david22swan))
- \(MODULES-8429\) Update GPG key for phusion passenger [\#1848](https://github.com/puppetlabs/puppetlabs-apache/pull/1848) ([abottchen](https://github.com/abottchen))
- Fix default vhost priority in readme [\#1843](https://github.com/puppetlabs/puppetlabs-apache/pull/1843) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB))
- fix apache::mod::jk example typo and add link for more info [\#1812](https://github.com/puppetlabs/puppetlabs-apache/pull/1812) ([xorpaul](https://github.com/xorpaul))
- MODULES-7379: Fixing syntax by adding newline [\#1803](https://github.com/puppetlabs/puppetlabs-apache/pull/1803) ([wimvr](https://github.com/wimvr))
- ensure mpm\_event is disabled under debian 9 if mpm itk is used [\#1766](https://github.com/puppetlabs/puppetlabs-apache/pull/1766) ([zivis](https://github.com/zivis))
## [3.4.0](https://github.com/puppetlabs/puppetlabs-apache/tree/3.4.0) (2018-09-27)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/3.3.0...3.4.0)
### Added
- pdksync - \(FM-7392\) - Puppet 6 Testing Changes [\#1838](https://github.com/puppetlabs/puppetlabs-apache/pull/1838) ([pmcmaw](https://github.com/pmcmaw))
- pdksync - \(MODULES-6805\) metadata.json shows support for puppet 6 [\#1836](https://github.com/puppetlabs/puppetlabs-apache/pull/1836) ([tphoney](https://github.com/tphoney))
### Fixed
- Fix "audit\_log\_relevant\_status" typo in README.md [\#1830](https://github.com/puppetlabs/puppetlabs-apache/pull/1830) ([smokris](https://github.com/smokris))
## [3.3.0](https://github.com/puppetlabs/puppetlabs-apache/tree/3.3.0) (2018-09-11)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/3.2.0...3.3.0)
### Added
- pdksync - \(MODULES-7705\) - Bumping stdlib dependency from \< 5.0.0 to \< 6.0.0 [\#1821](https://github.com/puppetlabs/puppetlabs-apache/pull/1821) ([pmcmaw](https://github.com/pmcmaw))
- Add support for ProxyTimeout [\#1805](https://github.com/puppetlabs/puppetlabs-apache/pull/1805) ([agoodno](https://github.com/agoodno))
- \(MODULES-7343\) - Allow overrides by adding mod\_libs in apache class [\#1800](https://github.com/puppetlabs/puppetlabs-apache/pull/1800) ([karelyatin](https://github.com/karelyatin))
- Rework passenger VHost and Directories [\#1778](https://github.com/puppetlabs/puppetlabs-apache/pull/1778) ([smortex](https://github.com/smortex))
### Fixed
- MODULES-7575 reverse sort the aliases [\#1808](https://github.com/puppetlabs/puppetlabs-apache/pull/1808) ([k2patel](https://github.com/k2patel))
- fixes for OpenSUSE ans SLES [\#1783](https://github.com/puppetlabs/puppetlabs-apache/pull/1783) ([tuxmea](https://github.com/tuxmea))
## 3.2.0
### Summary
This is a clean release to prepare for several planned backwards incompatible changes.
#### Changed
- Parameter `passenger_pre_start` has been moved outside of `<VirtualHost>`.
- Apache version fact has been enabled on FreeBSD.
- Parameter `ssl_proxyengine` has had it's default changed to false.
#### Added
- Parameter `passenger_group` can now be set in `apache::vhost`.
- Multiple `passenger_pre_start` URIs can now be set at once.
- Manifest `mod::auth_gssapi` has been added to allow the deployment of authorisation with kerberos, through GSSAPI.
#### Removed
- Scientific 5 and Debian 7 are no longer supported on Apache.
## Supported Release [3.1.0]
### Summary
This release includes the module being converted using version 1.4.1 of the PDK. It also includes a couple of additional parameters added.
#### Added
- Module has been pdk converted with version 1.4.1 ([MODULES-6331](https://tickets.puppet.com/browse/MODULES-6331))
- Parameter `ssl_cert` to provide a SSLCertificateFile option for use with SSL, optional of type String.
- Parameter `ssl_key` to provide a SSLCertificateKey option for use with SSL, optional of type String.
#### Fixed
- Documentation updates.
- Updates to the Japanese translation based on documentation update.
## Supported Release [3.0.0]
### Summary
This major release changes the default value of `keepalive` to `On`. It also includes many other features and bugfixes.
#### Changed
- Default `apache::keepalive` from `Off` to `On`.
#### Added
- Class `apache::mod::data`
- Function `apache::apache_pw_hash` function (puppet 4 port of `apache_pw_hash()`)
- Function `apache::bool2httpd` function (puppet 4 port of `bool2httpd()`)
- Function `apache::validate_apache_log_level` function (puppet 4 port of `validate_apache_log_level()`)
- Parameter `apache::balancer::options` for additional directives.
- Parameter `apache::limitreqfields` setting the LimitRequestFields directive to 100.
- Parameter `apache::use_canonical_name` to control how httpd uses self-referential URLs.
- Parameter `apache::mod::disk_cache::cache_ignore_headers` to ignore cache headers.
- Parameter `apache::mod::itk::enablecapabilities` to manage ITK capabilities.
- Parameter `apache::mod::ldap::ldap_trusted_mode` to manage trusted mode.
- Parameters for `apache::mod::passenger`:
- `passenger_allow_encoded_slashes`
- `passenger_app_group_name`
- `passenger_app_root`
- `passenger_app_type`
- `passenger_base_uri`
- `passenger_buffer_response`
- `passenger_buffer_upload`
- `passenger_concurrency_model`
- `passenger_debug_log_file`
- `passenger_debugger`
- `passenger_default_group`
- `passenger_default_user`
- `passenger_disable_security_update_check`
- `passenger_enabled`
- `passenger_error_override`
- `passenger_file_descriptor_log_file`
- `passenger_fly_with`
- `passenger_force_max_concurrent_requests_per_process`
- `passenger_friendly_error_pages`
- `passenger_group`
- `passenger_installed_version`
- `passenger_instance_registry_dir`
- `passenger_load_shell_envvars`
- `passenger_lve_min_uid`
- `passenger_max_instances`
- `passenger_max_preloader_idle_time`
- `passenger_max_request_time`
- `passenger_memory_limit`
- `passenger_meteor_app_settings`
- `passenger_nodejs`
- `passenger_pre_start`
- `passenger_python`
- `passenger_resist_deployment_errors`
- `passenger_resolve_symlinks_in_document_root`
- `passenger_response_buffer_high_watermark`
- `passenger_restart_dir`
- `passenger_rolling_restarts`
- `passenger_security_update_check_proxy`
- `passenger_show_version_in_header`
- `passenger_socket_backlog`
- `passenger_start_timeout`
- `passenger_startup_file`
- `passenger_sticky_sessions`
- `passenger_sticky_sessions_cookie_name`
- `passenger_thread_count`
- `passenger_user`
- `passenger_user_switching`
- `rack_auto_detect`
- `rack_base_uri`
- `rack_env`
- `rails_allow_mod_rewrite`
- `rails_app_spawner_idle_time`
- `rails_auto_detect`
- `rails_base_uri`
- `rails_default_user`
- `rails_env`
- `rails_framework_spawner_idle_time`
- `rails_ruby`
- `rails_spawn_method`
- `rails_user_switching`
- `wsgi_auto_detect`
- Parameter `apache::mod::prefork::listenbacklog` to set the listen backlog to 511.
- Parameter `apache::mod::python::loadfile_name` to workaround python.load filename conflicts.
- Parameter `apache::mod::ssl::ssl_cert` to manage the client auth cert.
- Parameter `apache::mod::ssl::ssl_key` to manage the client auth key.
- Parameter `apache::mod::status::requires` as an alternative to `apache::mod::status::allow_from`
- Parameter `apache::vhost::ssl_proxy_cipher_suite` to manage that directive.
- Parameter `apache::vhost::shib_compat_valid_user` to manage that directive.
- Parameter `apache::vhost::use_canonical_name` to manage that directive.
- Parameter value `mellon_session_length` for `apache::vhost::directories`
### Fixed
- `apache_version` is confined to just Linux to avoid erroring on AIX.
- Parameter `apache::mod::jk::workers_file_content` docs typo of "mantain" instead of maintain.
- Deduplicate `apache::mod::ldap` managing `File['ldap.conf']` to avoid resource conflicts.
- ITK package name on Debian 9
- Dav_svn package for SLES
- Log client IP instead of loadbalancer IP when behind a loadbalancer.
- `apache::mod::remoteip` now notifies the `Class['apache::service']` class instead of `Service['httpd']` to avoid restarting the service when `apache::service_manage` is false.
- `apache::vhost::cas_scrub_request_headers` actually manages the directive.
## Supported Release [2.3.1]
### Summary
This release fixes CVE-2018-6508 which is a potential arbitrary code execution via tasks.
### Fixed
- Fix init task for arbitrary remote code
## Supported Release [2.3.0]
### Summary
This is a feature release. It includes a task that will reload the apache service.
#### Added
- Add a task that allows the reloading of the Apache service.
## Supported Release [2.2.0]
### Summary
This is a maintainence and feature release. It will include updates to translations in Japanese, some maintainence and adding `PassengerSpawnMethod` to vhost.
#### Added
- `PassengerSpawnMethod` added to `vhost`.
#### Changed
- Improve version match fact for `apache_version`
- Update to prefork.conf params for Apache 2.4
- Updates to `CONTRIBUTING.md`
- Do not install mod_fastcgi on el7
- Include mod_wsgi when using wsgi options
## Supported Release [2.1.0]
### Summary
This is a feature release including a security patch (CVE-2017-2299)
#### Added
- `apache::mod::jk` class for managing the mod_jk connector
- `apache_pw_hash` function
- the ProxyPass directive in location contexts
- more Puppet 4 type validation
- `apache::mod::macro` class for managing mod_macro
#### Changed
- $ssl_certs_dir default to `undef` for all platorms
- $ssl_verify_client must now be set to use any of the following: `$ssl_certs_dir`, `$ssl_ca`, `$ssl_crl_path`, `$ssl_crl`, `$ssl_verify_depth`, `$ssl_crl_check`
#### Fixed
- issue where mod_alias was not being loaded when RedirectMatch* directives were being used ([MODULES-3942](https://tickets.puppet.com/browse/MODULES-3942))
- issue with `$directories` parameter in `apache::vhost`
- issue in UserDir template where the UserDir path did not match the Directory path
- **Issue where the $ssl_certs_dir default set Apache to implicitly trust all client certificates that were issued by any CA in that directory**
#### Removed
- support for EOL platforms: Ubuntu 10.04, 12.04 and Debian 6 (Squeeze)
## Supported Release [2.0.0]
### Summary
@@ -47,6 +612,17 @@ Major release **removing Puppet 3 support** and other backwards-incompatible cha
- issue where ProxyPreserveHost could not be set without other Proxy* directives
- the module attempting to install proxy_html on Ubuntu Xenial and Debian Stretch
## Supported Release [1.11.1]
#### Summary
This is a security patch release (CVE-2017-2299). These changes are also in version 2.1.0 and higher.
#### Changed
- $ssl_certs_dir default to `undef` for all platorms
- $ssl_verify_client must now be set to use any of the following: `$ssl_certs_dir`, `$ssl_ca`, `$ssl_crl_path`, `$ssl_crl`, `$ssl_verify_depth`, `$ssl_crl_check`
#### Fixed
- **Issue where the $ssl_certs_dir default set Apache to implicitly trust all client certificates that were issued by any CA in that directory** ([MODULES-5471](https://tickets.puppet.com/browse/MODULES-5471))
## Supported Release [1.11.0]
### Summary
This release adds SLES12 Support and many more features and bugfixes.
@@ -510,6 +1086,7 @@ This release features many improvements and bugfixes, including several new defi
- passenger_ruby
- passenger_start_timeout
- proxy_preserve_host
- proxy_requests
- redirectmatch_dest
- ssl_crl_check
- wsgi_chunked_request
@@ -864,7 +1441,15 @@ worker/prefork
* f672e46 a2mod fix
* 8a56ee9 add pthon support to apache
[3.2.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/3.1.0...3.2.0
[3.1.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/3.0.0...3.1.0
[3.0.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/2.3.1...3.0.0
[2.3.1]:https://github.com/puppetlabs/puppetlabs-apache/compare/2.3.0...2.3.1
[2.3.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/2.2.0...2.3.0
[2.2.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/2.1.0...2.2.0
[2.1.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/2.0.0...2.1.0
[2.0.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/1.11.0...2.0.0
[1.11.1]:https://github.com/puppetlabs/puppetlabs-apache/compare/1.11.0...1.11.1
[1.11.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/1.10.0...1.11.0
[1.10.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/1.9.0...1.10.0
[1.9.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/1.8.1...1.9.0
@@ -892,3 +1477,6 @@ worker/prefork
[0.5.0-rc1]:https://github.com/puppetlabs/puppetlabs-apache/compare/0.4.0...0.5.0-rc1
[0.4.0]:https://github.com/puppetlabs/puppetlabs-apache/compare/0.3.0...0.4.0
[0.0.4]:https://github.com/puppetlabs/puppetlabs-apache/commits/0.0.4
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

View File

@@ -0,0 +1,2 @@
# Setting ownership to the modules team
* @puppetlabs/modules

View File

@@ -1,217 +1,3 @@
Checklist (and a short version for the impatient)
=================================================
# Contributing to Puppet modules
* Commits:
- Make commits of logical units.
- Check for unnecessary whitespace with "git diff --check" before
committing.
- Commit using Unix line endings (check the settings around "crlf" in
git-config(1)).
- Do not check in commented out code or unneeded files.
- The first line of the commit message should be a short
description (50 characters is the soft limit, excluding ticket
number(s)), and should skip the full stop.
- Associate the issue in the message. The first line should include
the issue number in the form "(#XXXX) Rest of message".
- The body should provide a meaningful commit message, which:
- uses the imperative, present tense: "change", not "changed" or
"changes".
- includes motivation for the change, and contrasts its
implementation with the previous behavior.
- Make sure that you have tests for the bug you are fixing, or
feature you are adding.
- Make sure the test suites passes after your commit:
`bundle exec rspec spec/acceptance` More information on [testing](#Testing) below
- When introducing a new feature, make sure it is properly
documented in the README.md
* Submission:
* Pre-requisites:
- Make sure you have a [GitHub account](https://github.com/join)
- [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
* Preferred method:
- Fork the repository on GitHub.
- Push your changes to a topic branch in your fork of the
repository. (the format ticket/1234-short_description_of_change is
usually preferred for this project).
- Submit a pull request to the repository in the puppetlabs
organization.
The long version
================
1. Make separate commits for logically separate changes.
Please break your commits down into logically consistent units
which include new or changed tests relevant to the rest of the
change. The goal of doing this is to make the diff easier to
read for whoever is reviewing your code. In general, the easier
your diff is to read, the more likely someone will be happy to
review it and get it into the code base.
If you are going to refactor a piece of code, please do so as a
separate commit from your feature or bug fix changes.
We also really appreciate changes that include tests to make
sure the bug is not re-introduced, and that the feature is not
accidentally broken.
Describe the technical detail of the change(s). If your
description starts to get too long, that is a good sign that you
probably need to split up your commit into more finely grained
pieces.
Commits which plainly describe the things which help
reviewers check the patch and future developers understand the
code are much more likely to be merged in with a minimum of
bike-shedding or requested changes. Ideally, the commit message
would include information, and be in a form suitable for
inclusion in the release notes for the version of Puppet that
includes them.
Please also check that you are not introducing any trailing
whitespace or other "whitespace errors". You can do this by
running "git diff --check" on your changes before you commit.
2. Sending your patches
To submit your changes via a GitHub pull request, we _highly_
recommend that you have them on a topic branch, instead of
directly on "master".
It makes things much easier to keep track of, especially if
you decide to work on another thing before your first change
is merged in.
GitHub has some pretty good
[general documentation](http://help.github.com/) on using
their site. They also have documentation on
[creating pull requests](http://help.github.com/send-pull-requests/).
In general, after pushing your topic branch up to your
repository on GitHub, you can switch to the branch in the
GitHub UI and click "Pull Request" towards the top of the page
in order to open a pull request.
3. Update the related GitHub issue.
If there is a GitHub issue associated with the change you
submitted, then you should update the ticket to include the
location of your branch, along with any other commentary you
may wish to make.
Testing
=======
Getting Started
---------------
Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
package manager such as [bundler](http://bundler.io/) what Ruby packages,
or Gems, are required to build, develop, and test this software.
Please make sure you have [bundler installed](http://bundler.io/#getting-started)
on your system, then use it to install all dependencies needed for this project,
by running
```shell
% bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Using builder (3.2.2)
-- 8><-- many more --><8 --
Using rspec-system-puppet (2.2.0)
Using serverspec (0.6.3)
Using rspec-system-serverspec (1.0.0)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
```
NOTE some systems may require you to run this command with sudo.
If you already have those gems installed, make sure they are up-to-date:
```shell
% bundle update
```
With all dependencies in place and up-to-date we can now run the tests:
```shell
% bundle exec rake spec
```
This will execute all the [rspec tests](http://rspec-puppet.com/) tests
under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
and so on. rspec tests may have the same kind of dependencies as the
module they are testing. While the module defines in its [Modulefile](./Modulefile),
rspec tests define them in [.fixtures.yml](./fixtures.yml).
Some puppet modules also come with [beaker](https://github.com/puppetlabs/beaker)
tests. These tests spin up a virtual machine under
[VirtualBox](https://www.virtualbox.org/)) with, controlling it with
[Vagrant](http://www.vagrantup.com/) to actually simulate scripted test
scenarios. In order to run these, you will need both of those tools
installed on your system.
You can run them by issuing the following command
```shell
% bundle exec rake spec_clean
% bundle exec rspec spec/acceptance
```
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
install puppet, copy this module and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
and then run all the tests under [spec/acceptance](./spec/acceptance).
Writing Tests
-------------
XXX getting started writing tests.
If you have commit access to the repository
===========================================
Even if you have commit access to the repository, you will still need to
go through the process above, and have someone else review and merge
in your changes. The rule is that all changes must be reviewed by a
developer on the project (that did not write the code) to ensure that
all changes go through a code review process.
Having someone other than the author of the topic branch recorded as
performing the merge is the record that they performed the code
review.
Additional Resources
====================
* [Getting additional help](http://puppet.com/community/get-help)
* [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing)
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
Check out our [Contributing to Supported Modules Blog Post](https://puppetlabs.github.io/iac/docs/contributing_to_a_module.html) to find all the information that you will need.

View File

@@ -1,75 +0,0 @@
#This file is generated by ModuleSync, do not edit.
source ENV['GEM_SOURCE'] || "https://rubygems.org"
# Determines what type of gem is requested based on place_or_version.
def gem_type(place_or_version)
if place_or_version =~ /^git:/
:git
elsif place_or_version =~ /^file:/
:file
else
:gem
end
end
# Find a location or specific version for a gem. place_or_version can be a
# version, which is most often used. It can also be git, which is specified as
# `git://somewhere.git#branch`. You can also use a file source location, which
# is specified as `file://some/location/on/disk`.
def location_for(place_or_version, fake_version = nil)
if place_or_version =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place_or_version =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place_or_version, { :require => false }]
end
end
# Used for gem conditionals
supports_windows = false
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = "#{ruby_version_segments[0]}.#{ruby_version_segments[1]}"
group :development do
gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "puppet-module-posix-dev-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-dev-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-system-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '>= 3')
gem "beaker-pe", :require => false
gem "beaker-rspec", *location_for(ENV['BEAKER_RSPEC_VERSION'])
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
end
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])
# Only explicitly specify Facter/Hiera if a version has been specified.
# Otherwise it can lead to strange bundler behavior. If you are seeing weird
# gem resolution behavior, try setting `DEBUG_RESOLVER` environment variable
# to `1` and then run bundle install.
gem 'facter', *location_for(ENV['FACTER_GEM_VERSION']) if ENV['FACTER_GEM_VERSION']
gem 'hiera', *location_for(ENV['HIERA_GEM_VERSION']) if ENV['HIERA_GEM_VERSION']
# Evaluate Gemfile.local if it exists
if File.exists? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end
# Evaluate ~/.gemfile if it exists
if File.exists?(File.join(Dir.home, '.gemfile'))
eval(File.read(File.join(Dir.home, '.gemfile')), binding)
end
# vim:ft=ruby

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
## Maintenance
Maintainers:
- Puppet Forge Modules Team `forge-modules |at| puppet |dot| com`
Tickets: https://tickets.puppet.com/browse/MODULES. Make sure to set component to `apache`.

View File

@@ -1,6 +1,6 @@
Puppet Module - puppetlabs-apache
Copyright 2017 Puppet, Inc.
Copyright 2018 Puppet, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_only_variable_string')
desc 'Generate pooler nodesets'
task :gen_nodeset do
require 'beaker-hostgenerator'
require 'securerandom'
require 'fileutils'
agent_target = ENV['TEST_TARGET']
if ! agent_target
STDERR.puts 'TEST_TARGET environment variable is not set'
STDERR.puts 'setting to default value of "redhat-64default."'
agent_target = 'redhat-64default.'
end
master_target = ENV['MASTER_TEST_TARGET']
if ! master_target
STDERR.puts 'MASTER_TEST_TARGET environment variable is not set'
STDERR.puts 'setting to default value of "redhat7-64mdcl"'
master_target = 'redhat7-64mdcl'
end
targets = "#{master_target}-#{agent_target}"
cli = BeakerHostGenerator::CLI.new([targets])
nodeset_dir = "tmp/nodesets"
nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml"
FileUtils.mkdir_p(nodeset_dir)
File.open(nodeset, 'w') do |fh|
fh.print(cli.execute)
end
puts nodeset
end

View File

@@ -15,4 +15,15 @@
class { 'apache':
mpm_module => 'prefork'
}
}
exec { 'apache2-systemd-reload':
command => 'systemctl daemon-reload; systemctl enable apache2',
path => [ '/usr/bin', '/bin', '/usr/sbin' ],
}
#->
#service { 'apache2':
# ensure => running,
# provider => systemd,
# enable => true,
#}

View File

@@ -1,346 +0,0 @@
{
"CHANGELOG.md": "d5da65931d19f0aabf13a428dc56bc0c",
"CONTRIBUTING.md": "77d0440d7cd4206497f99065c60bed46",
"Gemfile": "bedf635025b279d7c7732adcc8ae9a29",
"LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
"MAINTAINERS.md": "6508b1d302b38186425992a66186c060",
"NOTICE": "b7760cf49f58b80b31df83244cc0fbd0",
"README.md": "b9a192cdc9ddecd060bc011a76df4b81",
"Rakefile": "a49b6653243c678ed33c8870db467d89",
"examples/apache.pp": "41e97262421ea5734fac16a338701a78",
"examples/dev.pp": "8da0d50d9d06834dd06329b8945f06d5",
"examples/init.pp": "d27415f33028c26d4031d30305eec5e0",
"examples/mod_load_params.pp": "e8d1c1b1b96d560c8288c51a76bffc87",
"examples/mods.pp": "78a25c9e226265353eabefd3ddfd4218",
"examples/mods_custom.pp": "bc9e6959c282984cf9cdd93869c89499",
"examples/php.pp": "afa0871b94040e3ae91fce9c375fb725",
"examples/vhost.pp": "27d808964b43d157de5ce8f47b441b46",
"examples/vhost_directories.pp": "95aa446a2fccf9f3561581a5d71c61a7",
"examples/vhost_filter.pp": "62c5af7868af9887b7d71769c319c1e5",
"examples/vhost_ip_based.pp": "7a4d4c1c00147c45e4534f58d2fbf4ed",
"examples/vhost_proxypass.pp": "2f0bd33b34a48554adcdf20d6d31a4c2",
"examples/vhost_ssl.pp": "ddd3c45964df56837d6c051a7d692378",
"examples/vhosts_without_listen.pp": "226afb3e87129a56fc9add21b120feb2",
"files/httpd": "295f5e924afe6f752d29327e73fe6d0a",
"lib/facter/apache_version.rb": "babb22b1d567021995b4b5fa9328047b",
"lib/puppet/parser/functions/bool2httpd.rb": "05d5deeb6e0c31acee7c55b249ec8e06",
"lib/puppet/parser/functions/validate_apache_log_level.rb": "d75bc4ef17ff5c9a1f94dd3948e733d1",
"lib/puppet/provider/a2mod/a2mod.rb": "d986d8e8373f3f31c97359381c180628",
"lib/puppet/provider/a2mod/gentoo.rb": "2492d446adbb68f678e86a75eb7ff3bd",
"lib/puppet/provider/a2mod/modfix.rb": "b689a1c83c9ccd8590399c67f3e588e5",
"lib/puppet/provider/a2mod/redhat.rb": "c39b80e75e7d0666def31c2a6cdedb0b",
"lib/puppet/provider/a2mod.rb": "03ed73d680787dd126ea37a03be0b236",
"lib/puppet/type/a2mod.rb": "9042ccc045bfeecca28bebb834114f05",
"locales/config.yaml": "ca04e502d031649d4aaa40d1803ade8b",
"locales/puppetlabs-apache.pot": "4bd09a821333cf6c272a64e944ef4e01",
"manifests/balancer.pp": "b444ff1415ba0bd6c8ec1497bcc9cfb3",
"manifests/balancermember.pp": "d74ab23d74fa198853b13ad837df925c",
"manifests/confd/no_accf.pp": "406d0ca41c3b90f83740ca218dc3f484",
"manifests/custom_config.pp": "357badc11586c8bb726f2a36364c0932",
"manifests/default_confd_files.pp": "86fdbe5773abb7c2da26db096973865c",
"manifests/default_mods/load.pp": "bc0b3b65edd1ba6178c09672352f9bce",
"manifests/default_mods.pp": "e4a7aa787443fce2e76c37e8fec99012",
"manifests/dev.pp": "8a7ead42f991e5dfdd364ba1aa1304e0",
"manifests/fastcgi/server.pp": "f177293f02a2878b43a863e8ab3015db",
"manifests/init.pp": "5d0b9eccf800e4c0b293bed68571c4ec",
"manifests/listen.pp": "6e44a9f49376cefb5694d52be5bc5a88",
"manifests/mod/actions.pp": "ec2a5d1cf54790204750f9b67938d230",
"manifests/mod/alias.pp": "1ef0d98a941bd796d428297b74acc8c4",
"manifests/mod/auth_basic.pp": "dffef6ff10145393cb78fcaa27220c53",
"manifests/mod/auth_cas.pp": "f2e61e67393a998a19f8b34506e07e0d",
"manifests/mod/auth_kerb.pp": "8759cab3dc12d6ba4cc12fcdbb699418",
"manifests/mod/auth_mellon.pp": "5bfbc604dd79923bdb65ecab02353059",
"manifests/mod/authn_core.pp": "4db773ddbc0d875230085782d4521951",
"manifests/mod/authn_dbd.pp": "8f03863a483184ca53b9bc3a45b2297f",
"manifests/mod/authn_file.pp": "eeb11513490beee901574746faaeabdf",
"manifests/mod/authnz_ldap.pp": "5fb4b52f54daf03358e08cde676ea4fc",
"manifests/mod/authnz_pam.pp": "9f99d93e289a2db42c74046c8ae1889f",
"manifests/mod/authz_default.pp": "b7c94cfa4e008155fffd241d35834064",
"manifests/mod/authz_user.pp": "d446c90c44304594206bd2a0112be625",
"manifests/mod/autoindex.pp": "3b50dc082dba420c3d564309601fd419",
"manifests/mod/cache.pp": "b56d68b9401ba3e02a1f2fe55cdfbcca",
"manifests/mod/cgi.pp": "731ed7bce75628afeb78afd3fa2fd793",
"manifests/mod/cgid.pp": "fb9ae9b5012d41e22cb85c0b50e17361",
"manifests/mod/cluster.pp": "8b67026e9a6a4bdc6a2481613896ded1",
"manifests/mod/dav.pp": "9df80d36dd609be9032a8260aa9d10c1",
"manifests/mod/dav_fs.pp": "9ad2359d64b0b6f219bd8a338917d114",
"manifests/mod/dav_svn.pp": "abc1ba954033b0b0187c079f310eb0e2",
"manifests/mod/dbd.pp": "4471dbd9fd67d0db885d4ba2a47a194a",
"manifests/mod/deflate.pp": "20231a22aba12eb905f1d7f1853e383e",
"manifests/mod/dev.pp": "42673bab60b6fc0f3aa6e2357ec0a27c",
"manifests/mod/dir.pp": "75039bc8c77b9b82fa12fc5aa1061291",
"manifests/mod/disk_cache.pp": "da18cbefced9bb32fc009e999c5b76e2",
"manifests/mod/dumpio.pp": "5492a7249450a7fdf335ecb0c3b948f4",
"manifests/mod/env.pp": "2a0321180a59161565b2b5f1b79d6b15",
"manifests/mod/event.pp": "a82a7ab979cc351eb660576bdc91d0e8",
"manifests/mod/expires.pp": "6f12edcf6863958af832db73b56e5f08",
"manifests/mod/ext_filter.pp": "287966c2c0fd450c72a1c9ef88a0e155",
"manifests/mod/fastcgi.pp": "96a3fcf0508a7eb8c9601eac329622eb",
"manifests/mod/fcgid.pp": "96e0a5f09c2d1ba21b2209a6e21b6847",
"manifests/mod/filter.pp": "b0039f3ae932b1204994ef2180dd76d2",
"manifests/mod/geoip.pp": "41762c637ab45dac05e564d1b3d03c3e",
"manifests/mod/headers.pp": "ef3de538a0a4c9406236faf43eb89710",
"manifests/mod/include.pp": "a3b66eda88e38d90825c16b834bacd8d",
"manifests/mod/info.pp": "c3e815ed9912bb9147805f7274508489",
"manifests/mod/intercept_form_submit.pp": "b3e55433272082bac1e7a5334df3b01f",
"manifests/mod/itk.pp": "f631157ebdff68b6fc2bb6dbd5b8e8c4",
"manifests/mod/ldap.pp": "319e62a24e30221e691b9cf85a6288e1",
"manifests/mod/lookup_identity.pp": "a3fd01d395ea09ec1488494fd077dd7b",
"manifests/mod/mime.pp": "24fe99c65367a3f606441605a2ff26dd",
"manifests/mod/mime_magic.pp": "d31702cee9007c2e65c8d3ccbed1fda3",
"manifests/mod/negotiation.pp": "35fb1e9fa643054271804e215bb47299",
"manifests/mod/nss.pp": "3cc69b59bba579181b0ceb1dfd2976d0",
"manifests/mod/pagespeed.pp": "1fcf4c30084bd1e4fa3006b4d3265c1a",
"manifests/mod/passenger.pp": "f1a4609f61e30fc839ad7f4b668a750b",
"manifests/mod/perl.pp": "b8180ca0e1e7f8d60030321f52c28d6d",
"manifests/mod/peruser.pp": "13761222709094653bca7bad4435fcdb",
"manifests/mod/php.pp": "b6d383242b3c52a2543f8f477ff308a0",
"manifests/mod/prefork.pp": "3deff89f43a1f55dda643ac66e3fc4dc",
"manifests/mod/proxy.pp": "a65065f0c7705b7b75b1dd6fc2222e27",
"manifests/mod/proxy_ajp.pp": "073e2406aea7822750d4c21f02d8ac80",
"manifests/mod/proxy_balancer.pp": "c717e51517043084854b26c89d7b99d9",
"manifests/mod/proxy_connect.pp": "7cd9b4b61ec6feb020f753ee74910a48",
"manifests/mod/proxy_fcgi.pp": "8c7fd559419b159e27218a17463d850d",
"manifests/mod/proxy_html.pp": "aa012e927e20d3f7734fdc026491fd20",
"manifests/mod/proxy_http.pp": "0db1b26f8b4036b0d46ba86b7eaac561",
"manifests/mod/proxy_wstunnel.pp": "88ee88d6d56a70f0000e690f80f64acb",
"manifests/mod/python.pp": "6f65b22271cf356832fe7a1949163861",
"manifests/mod/remoteip.pp": "9ad1d5712477f11ae2643f209bb08ce3",
"manifests/mod/reqtimeout.pp": "17b245b5d14f3f7b8c1d5fa07e5c159e",
"manifests/mod/rewrite.pp": "292f2d6ce2078fa9df7f686105ea7b95",
"manifests/mod/rpaf.pp": "54991f51a06e2b4171956e6ce1caf3a3",
"manifests/mod/security.pp": "b5ed320cbcce30b79557dd38941d339b",
"manifests/mod/setenvif.pp": "fa3b3e5f3a7e029f9db5b66ae499c6c8",
"manifests/mod/shib.pp": "8b75f8818fe9dc5728a478fc27962447",
"manifests/mod/socache_shmcb.pp": "c94ae23ab8cce744acad2f7e33dbfa9c",
"manifests/mod/speling.pp": "b6971e10caf22837e410b94910b66b1a",
"manifests/mod/ssl.pp": "ed4255fa17a174ce02fd8eef399c0ae1",
"manifests/mod/status.pp": "75d19ef4dde3529359d080c6607926f0",
"manifests/mod/suexec.pp": "2a8671856a0ece597e9b57867dc35e76",
"manifests/mod/suphp.pp": "5a7390ef0a0ceaa2d7e684bcb6300587",
"manifests/mod/userdir.pp": "8cce2ae6536eab6b809c63cb6ed59c55",
"manifests/mod/version.pp": "6cb31057ebffa796f95642cc95f9499d",
"manifests/mod/vhost_alias.pp": "ee1225a748daaf50aca39a6d93fb8470",
"manifests/mod/worker.pp": "41137580c48b89f2795c1295d87962c0",
"manifests/mod/wsgi.pp": "adcaac9e490512a58d0e6070904c85d2",
"manifests/mod/xsendfile.pp": "fba06f05a19c466654aca5ecaa705bf0",
"manifests/mod.pp": "405f340daea9c50913904818ca4041d7",
"manifests/mpm.pp": "d4bfe77df34110cb253557104b2e6310",
"manifests/namevirtualhost.pp": "5ad54a441ff26a55cc536069d8fad238",
"manifests/package.pp": "ebd1e1e815ef744ebd4e9d8a6c94a07a",
"manifests/params.pp": "605e33b78b4eb131ac9e9bad335ce88f",
"manifests/peruser/multiplexer.pp": "0ea75341b7a93e55bcfb431a93b1a6c9",
"manifests/peruser/processor.pp": "62f0ad5ed2ec36dadc7f40ad2a9e1bb9",
"manifests/php.pp": "9c9d07e12bf5d112b0b54f5bd69046fc",
"manifests/proxy.pp": "7c8515b88406922e148322ee15044b29",
"manifests/python.pp": "ddef4cd73850fdc2dc126d4579c30adf",
"manifests/security/rule_link.pp": "9c879ecfd7534347ccc8cf3ea77fa859",
"manifests/service.pp": "9984fd2cfd49cea0b8db61f7cc3c1c4b",
"manifests/ssl.pp": "173f3d6a7fd2b5f4100c4ff03d84e13b",
"manifests/version.pp": "3388b1978b04cba63ed7fc8e2ec3f692",
"manifests/vhost/custom.pp": "421081f6c4f33e1aca07ff789e53345e",
"manifests/vhost.pp": "707b86ad96804fed2413ef6366ac43b4",
"manifests/vhosts.pp": "d5cd9e6b701b7b2948c011546bc55497",
"metadata.json": "f9025597336b7ffb8631e1c5949985ae",
"spec/acceptance/apache_parameters_spec.rb": "d8d8f53c76a65558f189a33ef063976a",
"spec/acceptance/apache_ssl_spec.rb": "9cddf1b1b3a4ed2fe971fabe8785e9ed",
"spec/acceptance/class_spec.rb": "9d77ee23b734dd48ecea4353dee3d616",
"spec/acceptance/custom_config_spec.rb": "61e03d814d0671d194dd40e6b1ad5c9b",
"spec/acceptance/default_mods_spec.rb": "2481bfa99dd34e15f2b4c7eed194635f",
"spec/acceptance/itk_spec.rb": "812c855013c08ebb13e642dc5199b41a",
"spec/acceptance/mod_dav_svn_spec.rb": "e792a6d585026dd7bded38e62c8786f6",
"spec/acceptance/mod_deflate_spec.rb": "dd39bfb069e0233bf134caaeb1dc6fe6",
"spec/acceptance/mod_fcgid_spec.rb": "ef0e3368ea14247c05ff43217b5856ee",
"spec/acceptance/mod_mime_spec.rb": "0869792d98c1b2577f02d97c92f1765e",
"spec/acceptance/mod_negotiation_spec.rb": "017f6b0cc1496c25aa9b8a33ef8dbbb3",
"spec/acceptance/mod_pagespeed_spec.rb": "23256a41b700fc92a96edf34a16be499",
"spec/acceptance/mod_passenger_spec.rb": "a66264ef73ad6c5396a06ab9b5444c7c",
"spec/acceptance/mod_php_spec.rb": "98bc1ff97a36de86d5a1b800b2afd7a6",
"spec/acceptance/mod_proxy_html_spec.rb": "34478fc2f12a23cd5a95d424f85da150",
"spec/acceptance/mod_security_spec.rb": "c783d44cf3ccba2fa6a3c14de0e486a0",
"spec/acceptance/mod_suphp_spec.rb": "f5c1f21e4c5323b81afc354c82e7ceb9",
"spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd",
"spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39",
"spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808",
"spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae",
"spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df",
"spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58",
"spec/acceptance/nodesets/suse.yml": "eff62186e4de2ffed45a72a375380338",
"spec/acceptance/prefork_worker_spec.rb": "1570eefe61d667a1b43824adc0b2bb78",
"spec/acceptance/service_spec.rb": "341f157cb33fa48d5166d2274ad3bc65",
"spec/acceptance/version.rb": "6a1f2db3e369f3dc2b5bd76f4921891a",
"spec/acceptance/vhost_spec.rb": "ac0e99a6dfbe8faa2837bf2356fdda7d",
"spec/acceptance/vhosts_spec.rb": "c9635037681d569a053da6eb7ae5f4f4",
"spec/classes/apache_spec.rb": "c75f9bf2fedf99c4d478536d3786223c",
"spec/classes/dev_spec.rb": "6bc9ff7cffb77aac52c5bd3acc157d2d",
"spec/classes/mod/alias_spec.rb": "e62706d9925b0dc1821db78d01986a7e",
"spec/classes/mod/auth_cas_spec.rb": "46a7ba3fe31d3fc6175b8dce5105326e",
"spec/classes/mod/auth_kerb_spec.rb": "d281ff13b8989d759bd7fcdb599a882a",
"spec/classes/mod/auth_mellon_spec.rb": "81d3ea4b7567718ca810b625fd36d231",
"spec/classes/mod/authn_dbd_spec.rb": "8c794faaa5244e16f432c76679cb12d7",
"spec/classes/mod/authnz_ldap_spec.rb": "bef6980f85489c5fd7388511cb65b644",
"spec/classes/mod/authnz_pam_spec.rb": "71759e9ab2dd8aeefeb4d79e3349e67e",
"spec/classes/mod/cluster_spec.rb": "c1d01cc4a4f9ce10d692294019791e2f",
"spec/classes/mod/dav_svn_spec.rb": "6b3c4123a067e249f6c78c5b0cbcbcc7",
"spec/classes/mod/deflate_spec.rb": "adf6e41357fefe4ff1128e8fea4d3057",
"spec/classes/mod/dev_spec.rb": "1a30ef5fb18073fd2bf6f7923ff9c57f",
"spec/classes/mod/dir_spec.rb": "9e25507c094cb3b2fe6eb1106668b484",
"spec/classes/mod/disk_cache_spec.rb": "e821fa50ace7ab3398c43b16034748e9",
"spec/classes/mod/dumpio_spec.rb": "689d167b05e669c29709fc36940e7b05",
"spec/classes/mod/event_spec.rb": "46a304c796ac3928be0a67bec1f46b4f",
"spec/classes/mod/expires_spec.rb": "0d27e3438627f2ad34abacf582fb8b0b",
"spec/classes/mod/ext_filter_spec.rb": "7af18fdf1376f17e68dc99e5627ba067",
"spec/classes/mod/fastcgi_spec.rb": "59f7ea857b0fa614e8808270c529300f",
"spec/classes/mod/fcgid_spec.rb": "bda06cc347a8da8d7c7374add2654248",
"spec/classes/mod/info_spec.rb": "d51c6a9e6ae4d944488a43c8c15b95c0",
"spec/classes/mod/intercept_form_submit_spec.rb": "2e7087360a57f6ccf88b80239ca5056e",
"spec/classes/mod/itk_spec.rb": "622f23a1346383846cbc98e38388034d",
"spec/classes/mod/ldap_spec.rb": "12863d495558fbe9f6cb7a50ab37688c",
"spec/classes/mod/lookup_identity.rb": "97997c0a2e7a1b717426b5845df604ee",
"spec/classes/mod/mime_magic_spec.rb": "259304a80e92e4ba15e7cd719fe25c17",
"spec/classes/mod/mime_spec.rb": "d946fb96659b67bf7117ad7ed4b25cce",
"spec/classes/mod/negotiation_spec.rb": "44d50f7e6ef8c6388baa4c7cfc07be43",
"spec/classes/mod/pagespeed_spec.rb": "56bd7d82920cb734ea8139c9fed97de7",
"spec/classes/mod/passenger_spec.rb": "e8daaeafddd8b8ac33800c04a93b5c03",
"spec/classes/mod/perl_spec.rb": "1daa227f563ac19ff8dcdea0d0005ec4",
"spec/classes/mod/peruser_spec.rb": "c379ce85a997789856b12c27957bf994",
"spec/classes/mod/php_spec.rb": "2cc1a1d5d097be26eef3139b4e8eafaf",
"spec/classes/mod/prefork_spec.rb": "d82f0f25691ba019b912cd000dbb845f",
"spec/classes/mod/proxy_balancer_spec.rb": "c0bd0c3ebf39d7c66120b3837551f6b1",
"spec/classes/mod/proxy_connect_spec.rb": "baef920356c839b698c2adb865e79b5f",
"spec/classes/mod/proxy_html_spec.rb": "c6fc0e6b0cbcd3d5f9e65d533366ee32",
"spec/classes/mod/proxy_wstunnel.rb": "69bcef5e88aeb115290d8428186c80ec",
"spec/classes/mod/python_spec.rb": "5ca2dd0829b7baa1022c551b66548b20",
"spec/classes/mod/remoteip_spec.rb": "f9bf0bc64fef6d570f7b798ceef0d598",
"spec/classes/mod/reqtimeout_spec.rb": "2af2919e8253100fbc2e001d30a5cd15",
"spec/classes/mod/rpaf_spec.rb": "5c4725a4bcab9339d7309765390aaed1",
"spec/classes/mod/security_spec.rb": "f2e41f16ff5e8aa8f4709cab68a7cf5e",
"spec/classes/mod/shib_spec.rb": "b4ec345e387f8d7186048f5d286bb71d",
"spec/classes/mod/speling_spec.rb": "96919b9fbd1e894fcfd649044c3dafb5",
"spec/classes/mod/ssl_spec.rb": "9c9fe05b815405d4e7fbb095e01d7d2a",
"spec/classes/mod/status_spec.rb": "1eeaf906baf6ca82bf24c4e23494c71c",
"spec/classes/mod/suphp_spec.rb": "cc7c02c42e985aa133f9d868e14d9435",
"spec/classes/mod/userdir_spec.rb": "648ab42ba4113b31712ecf8d9ec485e0",
"spec/classes/mod/worker_spec.rb": "c326e36fbcfe9f0c59dc1db389a33926",
"spec/classes/mod/wsgi_spec.rb": "902251d74d6d3c821f460b620158295b",
"spec/classes/params_spec.rb": "adbd9f0dee677ea9439b9ce0d620894f",
"spec/classes/service_spec.rb": "0709833b94c1a3fbd13b73042fa84967",
"spec/classes/vhosts_spec.rb": "9baf23eb534e944a1bd593e72dd3050e",
"spec/defines/balancer_spec.rb": "8793815eb22b5190977b154fcd97e85e",
"spec/defines/balancermember_spec.rb": "e93ded8b51cc1d73e52f453880b3576e",
"spec/defines/custom_config_spec.rb": "cd4ee6803b79a844442107ac385cc833",
"spec/defines/fastcgi_server_spec.rb": "8e167c1525cb9a7473efdde01efe0ca3",
"spec/defines/mod_spec.rb": "a10e5b2570419737c03cd0f6347cc985",
"spec/defines/modsec_link_spec.rb": "3421b21f8234637dd1c32ebcf89e44c3",
"spec/defines/vhost_custom_spec.rb": "d5596a7a0c239d4c0ed8bebbb6a124ab",
"spec/defines/vhost_spec.rb": "b338a9fe8d5bd1f2002025905c2c4a74",
"spec/fixtures/files/negotiation.conf": "9c11872e26327ec880749b5dfdea25d6",
"spec/fixtures/files/spec": "e964ecac35c35baa9b4c57dac4ff5b3e",
"spec/fixtures/site_apache/templates/fake.conf.erb": "6b0431dd0b9a0bf803eb0684300c2cff",
"spec/fixtures/templates/negotiation.conf.erb": "c838e612ce6f82a5efd12871ad562011",
"spec/spec_helper.rb": "b2db3bc02b4ac2fd5142a6621c641b07",
"spec/spec_helper_acceptance.rb": "97b5d5677a368ac97cdc3ae2ab5e204f",
"spec/spec_helper_local.rb": "1b6ccd9b2f6946b81560239881774e94",
"spec/unit/apache_version_spec.rb": "c9d7b8ab46fb21d370702f02088281a2",
"spec/unit/provider/a2mod/gentoo_spec.rb": "02f7510cbf4945c5e1094ebcb967c8e0",
"spec/unit/puppet/parser/functions/bool2httpd_spec.rb": "0c9bca53eb43b5fc888126514b2a174c",
"spec/unit/puppet/parser/functions/validate_apache_log_level.rb": "8f558fd81d1655e9ab20896152eca512",
"templates/confd/no-accf.conf.erb": "a614f28c4b54370e4fa88403dfe93eb0",
"templates/fastcgi/server.erb": "30cdd04393bdb4f68678d00e2930721b",
"templates/httpd.conf.erb": "3667dc46bedcfd2b79f82570b1063623",
"templates/listen.erb": "6286aa08f9e28caee54b1e1ee031b9d6",
"templates/mod/alias.conf.erb": "370e9d394dd462d3ebc0dd345ab68f6f",
"templates/mod/auth_cas.conf.erb": "35e1291a5fa05067d7623c02bafb0ada",
"templates/mod/auth_mellon.conf.erb": "4e17d22a8f1bc312e976e8513199c945",
"templates/mod/authn_dbd.conf.erb": "7a84f5d3b3a4b92a88fe052b13376f8e",
"templates/mod/authnz_ldap.conf.erb": "2262e6d90ae81f2b732bbf0163006c59",
"templates/mod/autoindex.conf.erb": "2421a3c6df32c7e38c2a7a22afdf5728",
"templates/mod/cgid.conf.erb": "f8ce27d60bc495bab16de2696ebb2fd0",
"templates/mod/cluster.conf.erb": "9e92178f1d45193868e41e7fe1a06976",
"templates/mod/dav_fs.conf.erb": "10c1131168e35319e22b3fbfe51aebfd",
"templates/mod/deflate.conf.erb": "e866ecf2bfe8e42ea984267f569723db",
"templates/mod/dir.conf.erb": "2485da78a2506c14bf51dde38dd03360",
"templates/mod/disk_cache.conf.erb": "48d1b54ec1dedea7f68451bc0774790e",
"templates/mod/dumpio.conf.erb": "260a03d5f5b450095a5374690fbb34b2",
"templates/mod/event.conf.erb": "5e4095242d8e5dd99fe0823cfa2f1434",
"templates/mod/expires.conf.erb": "7a77f8b1d50c53ee77a6cb798c51a2b9",
"templates/mod/ext_filter.conf.erb": "4e4e4143ab402a9f9d51301b1a192202",
"templates/mod/fastcgi.conf.erb": "2404caa7d91dea083fc4f8b6f18acd24",
"templates/mod/fcgid.conf.erb": "1780c7808bb3811deaf0007c890df4dc",
"templates/mod/geoip.conf.erb": "93b95f44ec733ee8231be82381e02782",
"templates/mod/info.conf.erb": "c8580f35594e8f76da9c961def618739",
"templates/mod/itk.conf.erb": "eff84b78e4f2f8c5c3a2e9fc4b8aad16",
"templates/mod/ldap.conf.erb": "03ef6f461e4778342e6b94b8b4f3cd3a",
"templates/mod/load.erb": "01132434e6101080c41548b0ba7e57d8",
"templates/mod/mime.conf.erb": "2fa5a10d06ff979de1d5d2544586ab45",
"templates/mod/mime_magic.conf.erb": "067c3180b4216439b039822114144e78",
"templates/mod/mpm_event.conf.erb": "80097a19d063a4f973465d9ef5c0c0bf",
"templates/mod/negotiation.conf.erb": "a2f0fb40cd038cb17bedc2b84d9f48ea",
"templates/mod/nss.conf.erb": "03a7a3721b19706e00df00e457c5df69",
"templates/mod/pagespeed.conf.erb": "d1d8dfb00e528aab10a24518c7f148a6",
"templates/mod/passenger.conf.erb": "81512838f2fb7f01bf7fd674f023d086",
"templates/mod/peruser.conf.erb": "c4f4054aee899249ea6fef5a9e5c14ff",
"templates/mod/php.conf.erb": "c535da6adea16bdcb0586260eedf8c93",
"templates/mod/prefork.conf.erb": "f9ec5a7eaea78a19b04fa69f8acd8a84",
"templates/mod/proxy.conf.erb": "33a6a57edd324ba56e879a7b077ecf08",
"templates/mod/proxy_balancer.conf.erb": "a9f8d51a2a7169e5fd0c8415a3f9c662",
"templates/mod/proxy_html.conf.erb": "1236e21e77bcc077dd71dbef98c911c7",
"templates/mod/remoteip.conf.erb": "ad58e174410e3ff46ff93d4ad1e7b8a0",
"templates/mod/reqtimeout.conf.erb": "314ef068b786ae5afded290a8b6eab15",
"templates/mod/rpaf.conf.erb": "5447539c083ae54f3a9e93c1ac8c988b",
"templates/mod/security.conf.erb": "e309716298ed8709df5496c27d47fe36",
"templates/mod/security_crs.conf.erb": "5c7bc134c0675d75b66a5c8faaf11eb6",
"templates/mod/setenvif.conf.erb": "c7ede4173da1915b7ec088201f030c28",
"templates/mod/ssl.conf.erb": "f88b0d03bbbc9b0773475434a2ef0f93",
"templates/mod/status.conf.erb": "574ecc6f74e8b75d84710a44c4260210",
"templates/mod/suphp.conf.erb": "05bb7b3ea23976b032ce405bfd4edd18",
"templates/mod/userdir.conf.erb": "5d0185dc69bc30849bc1a2f63f652b74",
"templates/mod/worker.conf.erb": "dc4c7049af7312f5e82b3e72e8fccdfd",
"templates/mod/wsgi.conf.erb": "ba2ba5a5699889626f4bc7f5604070b0",
"templates/namevirtualhost.erb": "fbfca19a639e18e6c477e191344ac8ae",
"templates/ports_header.erb": "afe35cb5747574b700ebaa0f0b3a626e",
"templates/vhost/_access_log.erb": "522414033856b19a50a7ebb1c729438a",
"templates/vhost/_action.erb": "a004dfcac2e63cef65cf8aa0e270b636",
"templates/vhost/_additional_includes.erb": "10e9c0056e962c49459839a1576b082e",
"templates/vhost/_aliases.erb": "6412f695e911feac18986da38f290dae",
"templates/vhost/_allow_encoded_slashes.erb": "37dee0b6fe9287342a10b533955dff81",
"templates/vhost/_auth_cas.erb": "96fb19c558e7e187fe9160f00f39061c",
"templates/vhost/_auth_kerb.erb": "3d0de0c3066440dffcbc75215174705b",
"templates/vhost/_block.erb": "8fa2f970222dbc0a38898b5a0ab80411",
"templates/vhost/_charsets.erb": "d152b6a7815e9edc0fe9bf9acbe2f1ec",
"templates/vhost/_custom_fragment.erb": "325ff48cefc06db035daa3491c391a88",
"templates/vhost/_directories.erb": "cb400adc888ef3632e155b700c2117aa",
"templates/vhost/_docroot.erb": "65d882a3c9d6b6bdd2f9b771f378035a",
"templates/vhost/_error_document.erb": "81d3007c1301a5c5f244c082cfee9de2",
"templates/vhost/_fallbackresource.erb": "e6c103bee7f6f76b10f244fc9fd1cd3b",
"templates/vhost/_fastcgi.erb": "e6d743e11b776e155dc4f80c602fb7e1",
"templates/vhost/_file_footer.erb": "e27b2525783e590ca1820f1e2118285d",
"templates/vhost/_file_header.erb": "7c3c04eb4ac67403604113e2628696cf",
"templates/vhost/_filters.erb": "597b9de5ae210af9182a1c95172115e7",
"templates/vhost/_header.erb": "9eb9d4075f288183d8224ddec5b2f126",
"templates/vhost/_http_protocol_options.erb": "9df9dec592fdb8fb4ab4abf7227cef9c",
"templates/vhost/_itk.erb": "8bf90b9855a9277f7a665b10f6c57fe9",
"templates/vhost/_jk_mounts.erb": "ce997ee7b5602af04062cd5f785da345",
"templates/vhost/_keepalive_options.erb": "16876858bac1e55b13545866b0428d90",
"templates/vhost/_logging.erb": "5bc4cbb1bc8a292acc0ba0420f96ca4e",
"templates/vhost/_passenger.erb": "2c720e3c849f81898be5f3822a3f67be",
"templates/vhost/_passenger_base_uris.erb": "c8d7f4da1434078e856c72671942dcd8",
"templates/vhost/_php.erb": "a16a9f3e146ce463481205e083d4bf79",
"templates/vhost/_php_admin.erb": "107a57e9e7b3f86d1abcf743f672a292",
"templates/vhost/_proxy.erb": "18b9bbb791d248179a08eb36ab895e12",
"templates/vhost/_rack.erb": "ebe187c1bdc81eec9c8e0d9026120b18",
"templates/vhost/_redirect.erb": "2d40ece74203cc00b861a058db91962c",
"templates/vhost/_requestheader.erb": "db1b0cdda069ae809b5b83b0871ef991",
"templates/vhost/_require.erb": "932106f2c9ea604bba4ace78d22bdfee",
"templates/vhost/_rewrite.erb": "b7858eac95352744196006b57d4091df",
"templates/vhost/_scriptalias.erb": "98713f33cca15b22c749bd35ea9a7b41",
"templates/vhost/_security.erb": "0ade536a9d25342e7128996add04be56",
"templates/vhost/_serveralias.erb": "95fed45853629924467aefc271d5b396",
"templates/vhost/_serversignature.erb": "9bf5a458783ab459e5043e1cdf671fa7",
"templates/vhost/_setenv.erb": "6e6a7efb1b168da9673c9e6d00eadec5",
"templates/vhost/_ssl.erb": "788b293b65736aead0007fe3bc52448b",
"templates/vhost/_sslproxy.erb": "8ab477ac3aa325e46f07b3fbf188303f",
"templates/vhost/_suexec.erb": "f2b3f9b9ff8fbac4e468e02cd824675a",
"templates/vhost/_suphp.erb": "a1c4a5e4461adbfce870df0abd158b59",
"templates/vhost/_wsgi.erb": "7939532279d7655896ce1a5942116ca7"
}

View File

@@ -1,6 +1,6 @@
include ::apache
include ::apache::mod::php
include ::apache::mod::cgi
include ::apache::mod::userdir
include ::apache::mod::disk_cache
include ::apache::mod::proxy_http
include apache
include apache::mod::php
include apache::mod::cgi
include apache::mod::userdir
include apache::mod::disk_cache
include apache::mod::proxy_http

View File

@@ -1 +1 @@
include ::apache::mod::dev
include apache::mod::dev

View File

@@ -1 +1 @@
include ::apache
include apache

View File

@@ -1,8 +1,7 @@
# Tests the path and identifier parameters for the apache::mod class
# Base class for clarity:
class { '::apache': }
class { 'apache': }
# Exaple parameter usage:
apache::mod { 'testmod':

View File

@@ -3,7 +3,6 @@
# Base class. Declares default vhost on port 80 and default ssl
# vhost on port 443 listening on all interfaces and serving
# $apache::docroot, and declaring our default set of modules.
class { '::apache':
class { 'apache':
default_mods => true,
}

View File

@@ -3,7 +3,7 @@
# Base class. Declares default vhost on port 80 and default ssl
# vhost on port 443 listening on all interfaces and serving
# $apache::docroot, and declaring a custom set of modules.
class { '::apache':
class { 'apache':
default_mods => [
'info',
'alias',
@@ -13,4 +13,3 @@ class { '::apache':
'expires',
],
}

View File

@@ -1,4 +1,4 @@
class { '::apache':
class { 'apache':
mpm_module => 'prefork',
}
include ::apache::mod::php
include apache::mod::php

View File

@@ -5,7 +5,7 @@
# Base class. Declares default vhost on port 80 and default ssl
# vhost on port 443 listening on all interfaces and serving
# $apache::docroot
class { '::apache': }
class { 'apache': }
# Most basic vhost
apache::vhost { 'first.example.com':
@@ -141,7 +141,6 @@ apache::vhost { 'fifteenth.example.com':
rack_base_uris => ['/rackapp1', '/rackapp2'],
}
# Vhost to redirect non-ssl to ssl
apache::vhost { 'sixteenth.example.com non-ssl':
servername => 'sixteenth.example.com',
@@ -229,20 +228,17 @@ apache::vhost { 'subdomain.loc':
serveraliases => ['*.loc',],
}
# Vhost with SSLProtocol,SSLCipherSuite, SSLHonorCipherOrder
# Vhost with SSL (SSLProtocol, SSLCipherSuite & SSLHonorCipherOrder from default)
apache::vhost { 'securedomain.com':
priority => '10',
vhost_name => 'www.securedomain.com',
port => '443',
docroot => '/var/www/secure',
ssl => true,
ssl_cert => '/etc/ssl/securedomain.cert',
ssl_key => '/etc/ssl/securedomain.key',
ssl_chain => '/etc/ssl/securedomain.crt',
ssl_protocol => '-ALL +TLSv1',
ssl_cipher => 'ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM',
ssl_honorcipherorder => 'On',
add_listen => false,
priority => '10',
vhost_name => 'www.securedomain.com',
port => '443',
docroot => '/var/www/secure',
ssl => true,
ssl_cert => '/etc/ssl/securedomain.cert',
ssl_key => '/etc/ssl/securedomain.key',
ssl_chain => '/etc/ssl/securedomain.crt',
add_listen => false,
}
# Vhost with access log environment variables writing control
@@ -258,4 +254,3 @@ apache::vhost { 'twentysecond.example.com':
docroot => '/var/www/twentysecond',
rack_base_uris => ['/passengerapp1', '/passengerapp2'],
}

View File

@@ -1,7 +1,7 @@
# Base class. Declares default vhost on port 80 and default ssl
# vhost on port 443 listening on all interfaces and serving
# $apache::docroot
class { '::apache': }
class { 'apache': }
# Example from README adapted.
apache::vhost { 'readme.example.net':
@@ -41,4 +41,3 @@ apache::vhost { 'files.example.net':
},
],
}

View File

@@ -1,5 +1,5 @@
# Base class. Declares default vhost on port 80 with filters.
class { '::apache': }
class { 'apache': }
# Example from README adapted.
apache::vhost { 'readme.example.net':
@@ -14,4 +14,3 @@ apache::vhost { 'readme.example.net':
'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no',
],
}

View File

@@ -3,7 +3,7 @@
# Base class. Turn off the default vhosts; we will be declaring
# all vhosts below.
class { '::apache':
class { 'apache':
default_vhost => false,
}

View File

@@ -5,7 +5,7 @@
# Base class. Declares default vhost on port 80 and default ssl
# vhost on port 443 listening on all interfaces and serving
# $apache::docroot
class { '::apache': }
class { 'apache': }
# Most basic vhost with proxy_pass
apache::vhost { 'first.example.com':
@@ -30,7 +30,7 @@ apache::vhost { 'second.example.com':
'params' => {
'retry' => '0',
'timeout' => '5',
}
}
},
],
}
@@ -59,7 +59,7 @@ apache::vhost { 'fourth.example.com':
'params' => {
'retry' => '0',
'timeout' => '5',
},
},
'keywords' => ['noquery', 'interpolate']
},
],

View File

@@ -3,7 +3,7 @@
# Base class. Turn off the default vhosts; we will be declaring
# all vhosts below.
class { '::apache':
class { 'apache':
default_vhost => false,
}

View File

@@ -4,11 +4,10 @@
# Base class. Turn off the default vhosts; we will be declaring
# all vhosts below.
class { '::apache':
class { 'apache':
default_vhost => false,
}
# Add two an IP-based vhost on 10.0.0.10, ssl and non-ssl
apache::vhost { 'The first IP-based vhost, non-ssl':
servername => 'first.example.com',

View File

@@ -0,0 +1,21 @@
---
version: 5
defaults: # Used for any hierarchy level that omits these keys.
datadir: data # This path is relative to hiera.yaml's directory.
data_hash: yaml_data # Use the built-in YAML backend.
hierarchy:
- name: "osfamily/major release"
paths:
# Used to distinguish between Debian and Ubuntu
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
# Used for Solaris
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
- name: "osfamily"
paths:
- "os/%{facts.os.name}.yaml"
- "os/%{facts.os.family}.yaml"
- name: 'common'
path: 'common.yaml'

View File

@@ -1,13 +1,29 @@
# frozen_string_literal: true
Facter.add(:apache_version) do
confine kernel: ['FreeBSD', 'Linux']
setcode do
if Facter::Util::Resolution.which('apachectl')
apache_version = nil
if Facter::Util::Resolution.which('httpd')
apache_version = Facter::Util::Resolution.exec('httpd -V 2>&1')
Facter.debug "Matching httpd '#{apache_version}'"
elsif Facter::Util::Resolution.which('apache2')
apache_version = Facter::Util::Resolution.exec('apache2 -V 2>&1')
Facter.debug "Matching apache2 '#{apache_version}'"
elsif Facter::Util::Resolution.which('apachectl')
apache_version = Facter::Util::Resolution.exec('apachectl -v 2>&1')
Facter.debug "Matching apachectl '#{apache_version}'"
%r{^Server version: Apache\/(\d+.\d+(.\d+)?)}.match(apache_version)[1]
elsif Facter::Util::Resolution.which('apache2ctl')
apache_version = Facter::Util::Resolution.exec('apache2ctl -v 2>&1')
Facter.debug "Matching apache2ctl '#{apache_version}'"
%r{^Server version: Apache\/(\d+.\d+(.\d+)?)}.match(apache_version)[1]
end
unless apache_version.nil?
match = %r{^Server version: Apache\/(\d+.\d+(.\d+)?)}.match(apache_version)
unless match.nil?
match[1]
end
end
end
end

View File

@@ -0,0 +1,12 @@
# frozen_string_literal: true
# @summary DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead.
Puppet::Functions.create_function(:'apache::apache_pw_hash') do
dispatch :deprecation_gen do
repeated_param 'Any', :args
end
def deprecation_gen(*args)
call_function('deprecation', 'apache::apache_pw_hash', 'This function is deprecated, please use apache::pw_hash instead.')
call_function('apache::pw_hash', *args)
end
end

View File

@@ -0,0 +1,36 @@
# frozen_string_literal: true
# @summary
# Transform a supposed boolean to On or Off. Passes all other values through.
#
Puppet::Functions.create_function(:'apache::bool2httpd') do
# @param arg
# The value to be converted into a string.
#
# @return
# Will return either `On` or `Off` if given a boolean value. Returns a string of any
# other given value.
# @example
# $trace_enable = false
# $server_signature = 'mail'
#
# apache::bool2httpd($trace_enable) # returns 'Off'
# apache::bool2httpd($server_signature) # returns 'mail'
# apache::bool2httpd(undef) # returns 'Off'
#
def bool2httpd(arg)
return 'Off' if arg.nil? || arg == false || matches_string?(arg, %r{false}i) || arg == :undef
return 'On' if arg == true || matches_string?(arg, %r{true}i)
arg.to_s
end
private
def matches_string?(value, matcher)
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0')
value =~ matcher
else
value.is_a?(String) && value.match?(matcher)
end
end
end

View File

@@ -0,0 +1,23 @@
# frozen_string_literal: true
# @summary
# Hashes a password in a format suitable for htpasswd files read by apache.
#
# Currently uses SHA-hashes, because although this format is considered insecure, it's the
# most secure format supported by the most platforms.
Puppet::Functions.create_function(:'apache::pw_hash') do
# @param password
# The input that is to be hashed.
#
# @return
# Returns the hash of the input that was given.
dispatch :apache_pw_hash do
required_param 'String[1]', :password
return_type 'String'
end
def apache_pw_hash(password)
require 'base64'
'{SHA}' + Base64.strict_encode64(Digest::SHA1.digest(password))
end
end

View File

@@ -0,0 +1,12 @@
# frozen_string_literal: true
# @summary DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead.
Puppet::Functions.create_function(:apache_pw_hash) do
dispatch :deprecation_gen do
repeated_param 'Any', :args
end
def deprecation_gen(*args)
call_function('deprecation', 'apache_pw_hash', 'This function is deprecated, please use apache::pw_hash instead.')
call_function('apache::pw_hash', *args)
end
end

View File

@@ -0,0 +1,12 @@
# frozen_string_literal: true
# @summary DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead.
Puppet::Functions.create_function(:bool2httpd) do
dispatch :deprecation_gen do
repeated_param 'Any', :args
end
def deprecation_gen(*args)
call_function('deprecation', 'bool2httpd', 'This function is deprecated, please use apache::bool2httpd instead.')
call_function('apache::bool2httpd', *args)
end
end

View File

@@ -1,30 +0,0 @@
Puppet::Parser::Functions::newfunction(:bool2httpd, :type => :rvalue, :doc => <<-EOS
Transform a supposed boolean to On or Off. Pass all other values through.
Given a nil value (undef), bool2httpd will return 'Off'
Example:
$trace_enable = false
$server_signature = 'mail'
bool2httpd($trace_enable)
# => 'Off'
bool2httpd($server_signature)
# => 'mail'
bool2httpd(undef)
# => 'Off'
EOS
) do |args|
raise(Puppet::ParseError, "bool2httpd() wrong number of arguments. Given: #{args.size} for 1)") if args.size != 1
arg = args[0]
if arg.nil? or arg == false or arg =~ /false/i or arg == :undef
return 'Off'
elsif arg == true or arg =~ /true/i
return 'On'
end
return arg.to_s
end

View File

@@ -1,27 +0,0 @@
module Puppet::Parser::Functions
newfunction(:validate_apache_log_level, :doc => <<-'ENDHEREDOC') do |args|
Perform simple validation of a string against the list of known log
levels as per http://httpd.apache.org/docs/current/mod/core.html#loglevel
validate_apache_loglevel('info')
Modules maybe specified with their own levels like these:
validate_apache_loglevel('warn ssl:info')
validate_apache_loglevel('warn mod_ssl.c:info')
validate_apache_loglevel('warn ssl_module:info')
Expected to be used from the main or vhost.
Might be used from directory too later as apaceh supports that
ENDHEREDOC
if (args.size != 1) then
raise Puppet::ParseError, ("validate_apache_loglevel(): wrong number of arguments (#{args.length}; must be 1)")
end
log_level = args[0]
msg = "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels."
raise Puppet::ParseError, (msg) unless log_level =~ Regexp.compile('(emerg|alert|crit|error|warn|notice|info|debug|trace[1-8])')
end
end

View File

@@ -1,33 +1,42 @@
# frozen_string_literal: true
# a2mod.rb
class Puppet::Provider::A2mod < Puppet::Provider
# Fetches the mod provider
def self.prefetch(mods)
instances.each do |prov|
if mod = mods[prov.name]
mod = mods[prov.name]
if mod
mod.provider = prov
end
end
end
# Clear's the property_hash
def flush
@property_hash.clear
end
# Returns a copy of the property_hash
def properties
if @property_hash.empty?
@property_hash = query || {:ensure => :absent}
@property_hash = query || { ensure: :absent }
@property_hash[:ensure] = :absent if @property_hash.empty?
end
@property_hash.dup
end
# Returns the properties of the given mod if it exists.
def query
self.class.instances.each do |mod|
if mod.name == self.name or mod.name.downcase == self.name
if mod.name == name || mod.name.downcase == name
return mod.properties
end
end
nil
end
# Return's if the ensure property is absent or not
def exists?
properties[:ensure] != :absent
end

View File

@@ -1,35 +1,37 @@
# frozen_string_literal: true
require 'puppet/provider/a2mod'
Puppet::Type.type(:a2mod).provide(:a2mod, :parent => Puppet::Provider::A2mod) do
desc "Manage Apache 2 modules on Debian and Ubuntu"
Puppet::Type.type(:a2mod).provide(:a2mod, parent: Puppet::Provider::A2mod) do
desc 'Manage Apache 2 modules on Debian and Ubuntu'
optional_commands :encmd => "a2enmod"
optional_commands :discmd => "a2dismod"
commands :apache2ctl => "apache2ctl"
optional_commands encmd: 'a2enmod'
optional_commands discmd: 'a2dismod'
commands apache2ctl: 'apache2ctl'
confine :osfamily => :debian
defaultfor :operatingsystem => [:debian, :ubuntu]
confine osfamily: :debian
defaultfor operatingsystem: [:debian, :ubuntu]
def self.instances
modules = apache2ctl("-M").lines.collect { |line|
m = line.match(/(\w+)_module \(shared\)$/)
m[1] if m
}.compact
def self.instances
modules = apache2ctl('-M').lines.map { |line|
m = line.match(%r{(\w+)_module \(shared\)$})
m[1] if m
}.compact
modules.map do |mod|
new(
:name => mod,
:ensure => :present,
:provider => :a2mod
)
end
modules.map do |mod|
new(
name: mod,
ensure: :present,
provider: :a2mod,
)
end
end
def create
encmd resource[:name]
end
def create
encmd resource[:name]
end
def destroy
discmd resource[:name]
end
def destroy
discmd resource[:name]
end
end

View File

@@ -1,9 +1,11 @@
require 'puppet/util/filetype'
Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
desc "Manage Apache 2 modules on Gentoo"
# frozen_string_literal: true
confine :operatingsystem => :gentoo
defaultfor :operatingsystem => :gentoo
require 'puppet/util/filetype'
Puppet::Type.type(:a2mod).provide(:gentoo, parent: Puppet::Provider) do
desc 'Manage Apache 2 modules on Gentoo'
confine operatingsystem: :gentoo
defaultfor operatingsystem: :gentoo
attr_accessor :property_hash
@@ -12,7 +14,7 @@ Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
end
def exists?
(!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
(!@property_hash[:ensure].nil? && @property_hash[:ensure] == :present)
end
def destroy
@@ -30,34 +32,32 @@ Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
def self.clear
@mod_resources = []
@modules = []
@other_args = ""
@other_args = ''
end
def self.initvars
@conf_file = "/etc/conf.d/apache2"
@conf_file = '/etc/conf.d/apache2'
@filetype = Puppet::Util::FileType.filetype(:flat).new(conf_file)
@mod_resources = []
@modules = []
@other_args = ""
@other_args = ''
end
self.initvars
initvars
# Retrieve an array of all existing modules
def self.modules
if @modules.length <= 0
# Locate the APACHE_OPTS variable
records = filetype.read.split(/\n/)
apache2_opts = records.grep(/^\s*APACHE2_OPTS=/).first
records = filetype.read.split(%r{\n})
apache2_opts = records.grep(%r{^\s*APACHE2_OPTS=}).first
# Extract all defines
while apache2_opts.sub!(/-D\s+(\w+)/, '')
@modules << $1.downcase
end
@modules << Regexp.last_match(1).downcase while apache2_opts.sub!(%r{-D\s+(\w+)}, '')
# Hang on to any remaining options.
if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
@other_args = $1.strip
if apache2_opts =~ %r{APACHE2_OPTS="(.+)"}
@other_args = Regexp.last_match(1).strip
end
@modules.sort!.uniq!
@@ -66,51 +66,51 @@ Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
@modules
end
def self.prefetch(resources={})
def self.prefetch(resources = {})
# Match resources with existing providers
instances.each do |provider|
if resource = resources[provider.name]
resource = resources[provider.name]
if resource
resource.provider = provider
end
end
# Store all resources using this provider for flushing
resources.each do |name, resource|
resources.each do |_name, resource|
@mod_resources << resource
end
end
def self.instances
modules.map {|mod| new(:name => mod, :provider => :gentoo, :ensure => :present)}
modules.map { |mod| new(name: mod, provider: :gentoo, ensure: :present) }
end
def self.flush
mod_list = modules
mods_to_remove = @mod_resources.select {|mod| mod.should(:ensure) == :absent}.map {|mod| mod[:name]}
mods_to_add = @mod_resources.select {|mod| mod.should(:ensure) == :present}.map {|mod| mod[:name]}
mods_to_remove = @mod_resources.select { |mod| mod.should(:ensure) == :absent }.map { |mod| mod[:name] }
mods_to_add = @mod_resources.select { |mod| mod.should(:ensure) == :present }.map { |mod| mod[:name] }
mod_list -= mods_to_remove
mod_list += mods_to_add
mod_list.sort!.uniq!
if modules != mod_list
opts = @other_args + " "
opts << mod_list.map {|mod| "-D #{mod.upcase}"}.join(" ")
opts.strip!
opts.gsub!(/\s+/, ' ')
return unless modules != mod_list
apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
opts = @other_args + ' '
opts << mod_list.map { |mod| "-D #{mod.upcase}" }.join(' ')
opts.strip!
opts.gsub!(%r{\s+}, ' ')
records = filetype.read.split(/\n/)
apache2_opts = %(APACHE2_OPTS="#{opts}")
Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
records[opts_index] = apache2_opts
records = filetype.read.split(%r{\n})
filetype.backup
filetype.write(records.join("\n"))
@modules = mod_list
end
opts_index = records.find_index { |i| i.match(%r{^\s*APACHE2_OPTS}) }
records[opts_index] = apache2_opts
filetype.backup
filetype.write(records.join("\n"))
@modules = mod_list
end
end

View File

@@ -1,12 +1,13 @@
# frozen_string_literal: true
Puppet::Type.type(:a2mod).provide :modfix do
desc "Dummy provider for A2mod.
desc "Dummy provider for A2mod.
Fake nil resources when there is no crontab binary available. Allows
puppetd to run on a bootstrapped machine before a Cron package has been
installed. Workaround for: http://projects.puppetlabs.com/issues/2384
"
Fake nil resources when there is no crontab binary available. Allows
puppetd to run on a bootstrapped machine before a Cron package has been
installed. Workaround for: http://projects.puppetlabs.com/issues/2384
"
def self.instances
[]
end
end
def self.instances
[]
end
end

View File

@@ -1,12 +1,14 @@
# frozen_string_literal: true
require 'puppet/provider/a2mod'
Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
desc "Manage Apache 2 modules on RedHat family OSs"
Puppet::Type.type(:a2mod).provide(:redhat, parent: Puppet::Provider::A2mod) do
desc 'Manage Apache 2 modules on RedHat family OSs'
commands :apachectl => "apachectl"
commands apachectl: 'apachectl'
confine :osfamily => :redhat
defaultfor :osfamily => :redhat
confine osfamily: :redhat
defaultfor osfamily: :redhat
require 'pathname'
@@ -18,14 +20,14 @@ Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) d
class << self
attr_accessor :modpath
def preinit
@modpath = "/etc/httpd/mod.d"
@modpath = '/etc/httpd/mod.d'
end
end
self.preinit
preinit
def create
File.open(modfile,'w') do |f|
File.open(modfile, 'w') do |f|
f.puts "LoadModule #{resource[:identifier]} #{libfile}"
end
end
@@ -35,26 +37,26 @@ Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) d
end
def self.instances
modules = apachectl("-M").lines.collect { |line|
m = line.match(/(\w+)_module \(shared\)$/)
modules = apachectl('-M').lines.map { |line|
m = line.match(%r{(\w+)_module \(shared\)$})
m[1] if m
}.compact
modules.map do |mod|
new(
:name => mod,
:ensure => :present,
:provider => :redhat
name: mod,
ensure: :present,
provider: :redhat,
)
end
end
def modfile
modfile ||= "#{self.class.modpath}/#{resource[:name]}.load"
"#{self.class.modpath}/#{resource[:name]}.load"
end
# Set libfile path: If absolute path is passed, then maintain it. Else, make it default from 'modules' dir.
def libfile
libfile = Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
end
end

View File

@@ -1,30 +1,30 @@
# frozen_string_literal: true
Puppet::Type.newtype(:a2mod) do
@doc = "Manage Apache 2 modules"
@doc = 'Manage Apache 2 modules'
ensurable
ensurable
newparam(:name) do
Puppet.warning "The a2mod provider is deprecated, please use apache::mod instead"
desc "The name of the module to be managed"
newparam(:name) do
Puppet.warning 'The a2mod provider is deprecated, please use apache::mod instead'
desc 'The name of the module to be managed'
isnamevar
isnamevar
end
end
newparam(:lib) do
desc 'The name of the .so library to be loaded'
newparam(:lib) do
desc "The name of the .so library to be loaded"
defaultto { "mod_#{@resource[:name]}.so" }
end
defaultto { "mod_#{@resource[:name]}.so" }
end
newparam(:identifier) do
desc "Module identifier string used by LoadModule. Default: module-name_module"
newparam(:identifier) do
desc 'Module identifier string used by LoadModule. Default: module-name_module'
# http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
# http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
defaultto { "#{resource[:name]}_module" }
end
autorequire(:package) { catalog.resource(:package, 'httpd')}
defaultto { "#{resource[:name]}_module" }
end
autorequire(:package) { catalog.resource(:package, 'httpd') }
end

View File

@@ -1,25 +0,0 @@
---
# This is the project-specific configuration file for setting up
# fast_gettext for your project.
gettext:
# This is used for the name of the .pot and .po files; they will be
# called <project_name>.pot?
project_name: puppetlabs-apache
# This is used in comments in the .pot and .po files to indicate what
# project the files belong to and should bea little more desctiptive than
# <project_name>
package_name: puppetlabs-apache
# The locale that the default messages in the .pot file are in
default_locale: en
# The email used for sending bug reports.
bugs_address: docs@puppet.com
# The holder of the copyright.
copyright_holder: Puppet, Inc.
# This determines which comments in code should be eligible for translation.
# Any comments that start with this string will be externalized. (Leave
# empty to include all.)
comments_tag: TRANSLATOR
# Patterns for +Dir.glob+ used to find all files that might contain
# translatable content, relative to the project root directory
source_files:

View File

@@ -1,25 +0,0 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-21 14:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 2.0.0\n"
#. metadata.json
#: .summary
msgid ""
"Installs, configures, and manages Apache virtual hosts, web services, and "
"modules."
msgstr ""
#. metadata.json
#: .description
msgid "Module for Apache configuration"
msgstr ""

View File

@@ -1,80 +1,89 @@
# == Define Resource Type: apache::balancer
# @summary
# This type will create an apache balancer cluster file inside the conf.d
# directory.
#
# This type will create an apache balancer cluster file inside the conf.d
# directory. Each balancer cluster needs one or more balancer members (that can
# Each balancer cluster needs one or more balancer members (that can
# be declared with the apache::balancermember defined resource type). Using
# storeconfigs, you can export the apache::balancermember resources on all
# balancer members, and then collect them on a single apache load balancer
# server.
#
# === Requirement/Dependencies:
# @note
# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
# storeconfigs on the Puppet Server to export/collect resources from all
# balancer members.
#
# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
# storeconfigs on the Puppet Master to export/collect resources from all
# balancer members.
# @param name
# The namevar of the defined resource type is the balancer clusters name.<br />
# This name is also used in the name of the conf.d file
#
# === Parameters
# @param proxy_set
# Configures key-value pairs to be used as a ProxySet lines in the configuration.
#
# [*name*]
# The namevar of the defined resource type is the balancer clusters name.
# This name is also used in the name of the conf.d file
# @param target
# The path to the file the balancer definition will be written in.
#
# [*proxy_set*]
# Hash, default empty. If given, each key-value pair will be used as a ProxySet
# line in the configuration.
# @param collect_exported
# Determines whether to use exported resources.<br />
# If you statically declare all of your backend servers, set this parameter to false to rely
# on existing, declared balancer member resources. Also, use apache::balancermember with array
# arguments.<br />
# To dynamically declare backend servers via exported resources collected on a central node,
# set this parameter to true to collect the balancer member resources exported by the balancer
# member nodes.<br />
# If you don't use exported resources, a single Puppet run configures all balancer members. If
# you use exported resources, Puppet has to run on the balanced nodes first, then run on the
# balancer.
#
# [*target*]
# String, default undef. If given, path to the file the balancer definition will
# be written.
# @param options
# Specifies an array of [options](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember)
# after the balancer URL, and accepts any key-value pairs available to `ProxyPass`.
#
# [*collect_exported*]
# Boolean, default 'true'. True means 'collect exported @@balancermember
# resources' (for the case when every balancermember node exports itself),
# false means 'rely on the existing declared balancermember resources' (for the
# case when you know the full set of balancermembers in advance and use
# apache::balancermember with array arguments, which allows you to deploy
# everything in 1 run)
#
#
# === Examples
#
# Exporting the resource for a balancer member:
#
# apache::balancer { 'puppet00': }
# @example
# apache::balancer { 'puppet00': }
#
define apache::balancer (
$proxy_set = {},
$collect_exported = true,
$target = undef,
$options = [],
) {
include ::apache::mod::proxy_balancer
include apache::mod::proxy_balancer
if versioncmp($apache::mod::proxy_balancer::apache_version, '2.4') >= 0 {
$lbmethod = $proxy_set['lbmethod'] ? {
undef => 'byrequests',
default => $proxy_set['lbmethod'],
}
ensure_resource('apache::mod', "lbmethod_${lbmethod}")
ensure_resource('apache::mod', "lbmethod_${lbmethod}", {
'loadfile_name' => "proxy_balancer_lbmethod_${lbmethod}.load"
})
}
if $target {
$_target = $target
} else {
$_target = "${::apache::confd_dir}/balancer_${name}.conf"
$_target = "${apache::confd_dir}/balancer_${name}.conf"
}
if !empty($options) {
$_options = " ${join($options, ' ')}"
} else {
$_options = ''
}
concat { "apache_balancer_${name}":
owner => '0',
group => '0',
path => $_target,
mode => $::apache::file_mode,
mode => $apache::file_mode,
notify => Class['Apache::Service'],
}
concat::fragment { "00-${name}-header":
target => "apache_balancer_${name}",
order => '01',
content => "<Proxy balancer://${name}>\n",
content => "<Proxy balancer://${name}${_options}>\n",
}
if $collect_exported {

View File

@@ -1,50 +1,48 @@
# == Define Resource Type: apache::balancermember
#
# @summary
# Defines members of `mod_proxy_balancer`
#
# Sets up a balancer member inside a listening service configuration block in
# the load balancer's `apache.cfg`.
#
# This type will setup a balancer member inside a listening service
# configuration block in /etc/apache/apache.cfg on the load balancer.
# currently it only has the ability to specify the instance name, url and an
# Currently it only has the ability to specify the instance name, url and an
# array of options. More features can be added as needed. The best way to
# implement this is to export this resource for all apache balancer member
# servers, and then collect them on the main apache load balancer.
#
# === Requirement/Dependencies:
# @note
# Currently requires the puppetlabs/concat module on the Puppet Forge and
# uses storeconfigs on the Puppet Server to export/collect resources
# from all balancer members.
#
# Currently requires the puppetlabs/concat module on the Puppet Forge and
# uses storeconfigs on the Puppet Master to export/collect resources
# from all balancer members.
# @param name
# The title of the resource is arbitrary and only utilized in the concat
# fragment name.
#
# === Parameters
# @param balancer_cluster
# The apache service's instance name (or, the title of the apache::balancer
# resource). This must match up with a declared apache::balancer resource.
#
# [*name*]
# The title of the resource is arbitrary and only utilized in the concat
# fragment name.
# @param url
# The url used to contact the balancer member server.
#
# [*balancer_cluster*]
# The apache service's instance name (or, the title of the apache::balancer
# resource). This must match up with a declared apache::balancer resource.
# @param options
# Specifies an array of [options](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember)
# after the URL, and accepts any key-value pairs available to `ProxyPass`.
#
# [*url*]
# The url used to contact the balancer member server.
# @example
# @@apache::balancermember { 'apache':
# balancer_cluster => 'puppet00',
# url => "ajp://${::fqdn}:8009"
# options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
# }
#
# [*options*]
# An array of options to be specified after the url.
#
# === Examples
#
# Exporting the resource for a balancer member:
#
# @@apache::balancermember { 'apache':
# balancer_cluster => 'puppet00',
# url => "ajp://${::fqdn}:8009"
# options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
# }
#
define apache::balancermember(
define apache::balancermember (
$balancer_cluster,
$url = "http://${::fqdn}/",
$options = [],
) {
concat::fragment { "BalancerMember ${name}":
target => "apache_balancer_${balancer_cluster}",
content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),

View File

@@ -1,10 +1,14 @@
# @summary
# Manages the `no-accf.conf` file.
#
# @api private
class apache::confd::no_accf {
# Template uses no variables
file { 'no-accf.conf':
ensure => 'file',
path => "${::apache::confd_dir}/no-accf.conf",
path => "${apache::confd_dir}/no-accf.conf",
content => template('apache/confd/no-accf.conf.erb'),
require => Exec["mkdir ${::apache::confd_dir}"],
before => File[$::apache::confd_dir],
require => Exec["mkdir ${apache::confd_dir}"],
before => File[$apache::confd_dir],
}
}

View File

@@ -1,15 +1,67 @@
# See README.md for usage information
# @summary
# Adds a custom configuration file to the Apache server's `conf.d` directory.
#
# If the file is invalid and this defined type's `verify_config` parameter's value is
# `true`, Puppet throws an error during a Puppet run.
#
# @param ensure
# Specifies whether the configuration file should be present.
#
# @param confdir
# Sets the directory in which Puppet places configuration files.
#
# @param content
# Sets the configuration file's content. The `content` and `source` parameters are exclusive
# of each other.
#
# @param filename
# Sets the name of the file under `confdir` in which Puppet stores the configuration.
#
# @param priority
# Sets the configuration file's priority by prefixing its filename with this parameter's
# numeric value, as Apache processes configuration files in alphanumeric order.<br />
# To omit the priority prefix in the configuration file's name, set this parameter to `false`.
#
# @param source
# Points to the configuration file's source. The `content` and `source` parameters are
# exclusive of each other.
#
# @param verify_command
# Specifies the command Puppet uses to verify the configuration file. Use a fully qualified
# command.<br />
# This parameter is used only if the `verify_config` parameter's value is `true`. If the
# `verify_command` fails, the Puppet run deletes the configuration file and raises an error,
# but does not notify the Apache service.
#
# @param verify_config
# Specifies whether to validate the configuration file before notifying the Apache service.
#
# @param owner
# File owner of configuration file
#
# @param group
# File group of configuration file
#
# @param file_mode
# File mode of configuration file
#
# @param show_diff
# show_diff property for configuration file resource
#
define apache::custom_config (
Enum['absent', 'present'] $ensure = 'present',
$confdir = $::apache::confd_dir,
$confdir = $apache::confd_dir,
$content = undef,
$priority = '25',
$source = undef,
$verify_command = $::apache::params::verify_command,
$verify_command = $apache::params::verify_command,
Boolean $verify_config = true,
$filename = undef,
$owner = undef,
$group = undef,
$file_mode = undef,
Boolean $show_diff = true,
) {
if $content and $source {
fail('Only one of $content and $source can be specified.')
}
@@ -38,13 +90,19 @@ define apache::custom_config (
$notifies = undef
}
$_file_mode = pick($file_mode, $apache::file_mode)
file { "apache_${name}":
ensure => $ensure,
path => "${confdir}/${_filename}",
content => $content,
source => $source,
require => Package['httpd'],
notify => $notifies,
ensure => $ensure,
path => "${confdir}/${_filename}",
owner => $owner,
group => $group,
mode => $_file_mode,
content => $content,
source => $source,
show_diff => $show_diff,
require => Package['httpd'],
notify => $notifies,
}
if $ensure == 'present' and $verify_config {

View File

@@ -1,3 +1,7 @@
# @summary
# Helper for setting up default conf.d files.
#
# @api private
class apache::default_confd_files (
$all = true,
) {
@@ -5,7 +9,7 @@ class apache::default_confd_files (
if $all {
case $::osfamily {
'freebsd': {
include ::apache::confd::no_accf
include apache::confd::no_accf
}
default: {
# do nothing

View File

@@ -1,8 +1,12 @@
# @summary
# Installs and congfigures default mods for Apache
#
# @api private
class apache::default_mods (
$all = true,
$mods = undef,
$apache_version = $::apache::apache_version,
$use_systemd = $::apache::use_systemd,
$apache_version = $apache::apache_version,
$use_systemd = $apache::use_systemd,
) {
# These are modules required to run the default configuration.
# They are not configurable at this time, so we just include
@@ -13,11 +17,14 @@ class apache::default_mods (
if versioncmp($apache_version, '2.4') >= 0 {
# Lets fork it
# Do not try to load mod_systemd on RHEL/CentOS 6 SCL.
if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemrelease, '7.0') == -1) and !($::operatingsystem == 'Amazon') ) {
if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemmajrelease, '7') == -1) and !($::operatingsystem == 'Amazon') ) {
if ($use_systemd) {
::apache::mod { 'systemd': }
}
}
if ($::operatingsystem == 'Amazon' and $::operatingsystemrelease == '2') {
::apache::mod { 'systemd': }
}
::apache::mod { 'unixd': }
}
}
@@ -40,24 +47,24 @@ class apache::default_mods (
if $all {
case $::osfamily {
'debian': {
include ::apache::mod::authn_core
include ::apache::mod::reqtimeout
include apache::mod::authn_core
include apache::mod::reqtimeout
if versioncmp($apache_version, '2.4') < 0 {
::apache::mod { 'authn_alias': }
}
}
'redhat': {
include ::apache::mod::actions
include ::apache::mod::authn_core
include ::apache::mod::cache
include ::apache::mod::ext_filter
include ::apache::mod::mime
include ::apache::mod::mime_magic
include ::apache::mod::rewrite
include ::apache::mod::speling
include ::apache::mod::suexec
include ::apache::mod::version
include ::apache::mod::vhost_alias
include apache::mod::actions
include apache::mod::authn_core
include apache::mod::cache
include apache::mod::ext_filter
include apache::mod::mime
include apache::mod::mime_magic
include apache::mod::rewrite
include apache::mod::speling
include apache::mod::suexec
include apache::mod::version
include apache::mod::vhost_alias
::apache::mod { 'auth_digest': }
::apache::mod { 'authn_anon': }
::apache::mod { 'authn_dbm': }
@@ -75,20 +82,20 @@ class apache::default_mods (
}
}
'freebsd': {
include ::apache::mod::actions
include ::apache::mod::authn_core
include ::apache::mod::cache
include ::apache::mod::disk_cache
include ::apache::mod::headers
include ::apache::mod::info
include ::apache::mod::mime_magic
include ::apache::mod::reqtimeout
include ::apache::mod::rewrite
include ::apache::mod::userdir
include ::apache::mod::version
include ::apache::mod::vhost_alias
include ::apache::mod::speling
include ::apache::mod::filter
include apache::mod::actions
include apache::mod::authn_core
include apache::mod::cache
include apache::mod::disk_cache
include apache::mod::headers
include apache::mod::info
include apache::mod::mime_magic
include apache::mod::reqtimeout
include apache::mod::rewrite
include apache::mod::userdir
include apache::mod::version
include apache::mod::vhost_alias
include apache::mod::speling
include apache::mod::filter
::apache::mod { 'asis': }
::apache::mod { 'auth_digest': }
@@ -102,7 +109,7 @@ class apache::default_mods (
::apache::mod { 'dumpio': }
::apache::mod { 'expires': }
::apache::mod { 'file_cache': }
::apache::mod { 'imagemap':}
::apache::mod { 'imagemap': }
::apache::mod { 'include': }
::apache::mod { 'logio': }
::apache::mod { 'request': }
@@ -111,32 +118,32 @@ class apache::default_mods (
}
default: {}
}
case $::apache::mpm_module {
case $apache::mpm_module {
'prefork': {
include ::apache::mod::cgi
include apache::mod::cgi
}
'worker': {
include ::apache::mod::cgid
include apache::mod::cgid
}
default: {
# do nothing
}
}
include ::apache::mod::alias
include ::apache::mod::authn_file
include ::apache::mod::autoindex
include ::apache::mod::dav
include ::apache::mod::dav_fs
include ::apache::mod::deflate
include ::apache::mod::dir
include ::apache::mod::mime
include ::apache::mod::negotiation
include ::apache::mod::setenvif
include apache::mod::alias
include apache::mod::authn_file
include apache::mod::autoindex
include apache::mod::dav
include apache::mod::dav_fs
include apache::mod::deflate
include apache::mod::dir
include apache::mod::mime
include apache::mod::negotiation
include apache::mod::setenvif
::apache::mod { 'auth_basic': }
if versioncmp($apache_version, '2.4') >= 0 {
# filter is needed by mod_deflate
include ::apache::mod::filter
include apache::mod::filter
# authz_core is needed for 'Require' directive
::apache::mod { 'authz_core':
@@ -146,13 +153,13 @@ class apache::default_mods (
# lots of stuff seems to break without access_compat
::apache::mod { 'access_compat': }
} else {
include ::apache::mod::authz_default
include apache::mod::authz_default
}
include ::apache::mod::authz_user
include apache::mod::authz_user
::apache::mod { 'authz_groupfile': }
include ::apache::mod::env
include apache::mod::env
} elsif $mods {
::apache::default_mods::load { $mods: }
@@ -163,7 +170,7 @@ class apache::default_mods (
}
# filter is needed by mod_deflate
include ::apache::mod::filter
include apache::mod::filter
}
} else {
if versioncmp($apache_version, '2.4') >= 0 {
@@ -173,7 +180,7 @@ class apache::default_mods (
}
# filter is needed by mod_deflate
include ::apache::mod::filter
include apache::mod::filter
}
}
}

View File

@@ -1,4 +1,7 @@
# private define
# @summary
# Helper used by `apache::default_mods`
#
# @api private
define apache::default_mods::load ($module = $title) {
if defined("apache::mod::${module}") {
include "::apache::mod::${module}"

View File

@@ -1,10 +1,18 @@
# @summary
# Installs Apache development libraries.
#
# The libraries installed depends on the `dev_packages` parameter of the `apache::params`
# class, based on your operating system:
# - **Debian** : `libaprutil1-dev`, `libapr1-dev`; `apache2-dev`
# - **FreeBSD**: `undef`; on FreeBSD, you must declare the `apache::package` or `apache` classes before declaring `apache::dev`.
# - **Gentoo**: `undef`.
# - **Red Hat**: `httpd-devel`.
class apache::dev {
if ! defined(Class['apache']) {
fail('You must include the apache base class before using any apache defined resources')
}
$packages = $::apache::dev_packages
$packages = $apache::dev_packages
if $packages { # FreeBSD doesn't have dev packages to install
package { $packages:
ensure => present,

View File

@@ -1,3 +1,33 @@
# @summary
# Defines one or more external FastCGI servers to handle specific file types. Use this
# defined type with `mod_fastcgi`.
#
# @param host
# Determines the FastCGI's hostname or IP address and TCP port number (1-65535).
#
# @param timeout
# Sets the number of seconds a [FastCGI](http://www.fastcgi.com/) application can be inactive before aborting the
# request and logging the event at the error LogLevel. The inactivity timer applies only as
# long as a connection is pending with the FastCGI application. If a request is queued to an
# application, but the application doesn't respond by writing and flushing within this period,
# the request is aborted. If communication is complete with the application but incomplete with
# the client (the response is buffered), the timeout does not apply.
#
# @param flush
# Forces `mod_fastcgi` to write to the client as data is received from the
# application. By default, `mod_fastcgi` buffers data in order to free the application
# as quickly as possible.
#
# @param faux_path
# Apache has FastCGI handle URIs that resolve to this filename. The path set in this
# parameter does not have to exist in the local filesystem.
#
# @param fcgi_alias
# Internally links actions with the FastCGI server. This alias must be unique.
#
# @param file_type
# Sets the MIME `content-type` of the file to be processed by the FastCGI server.
#
define apache::fastcgi::server (
$host = '127.0.0.1:9000',
$timeout = 15,
@@ -7,23 +37,23 @@ define apache::fastcgi::server (
$file_type = 'application/x-httpd-php',
$pass_header = undef,
) {
include ::apache::mod::fastcgi
include apache::mod::fastcgi
Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title]
if is_absolute_path($host) {
if $host =~ Stdlib::Absolutepath {
$socket = $host
}
file { "fastcgi-pool-${name}.conf":
ensure => present,
path => "${::apache::confd_dir}/fastcgi-pool-${name}.conf",
ensure => file,
path => "${apache::confd_dir}/fastcgi-pool-${name}.conf",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
content => template('apache/fastcgi/server.erb'),
require => Exec["mkdir ${::apache::confd_dir}"],
before => File[$::apache::confd_dir],
require => Exec["mkdir ${apache::confd_dir}"],
before => File[$apache::confd_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,116 +1,573 @@
# Class: apache
# @summary
# Guides the basic setup and installation of Apache on your system.
#
# This class installs Apache
# When this class is declared with the default options, Puppet:
# - Installs the appropriate Apache software package and [required Apache modules](#default_mods) for your operating system.
# - Places the required configuration files in a directory, with the [default location](#conf_dir) determined by your operating system.
# - Configures the server with a default virtual host and standard port (`80`) and address (`\*`) bindings.
# - Creates a document root directory determined by your operating system, typically `/var/www`.
# - Starts the Apache service.
#
# Parameters:
# @example
# class { 'apache': }
#
# Actions:
# - Install Apache
# - Manage Apache service
# @param allow_encoded_slashes
# Sets the server default for the `AllowEncodedSlashes` declaration, which modifies the
# responses to URLs containing '\' and '/' characters. If not specified, this parameter omits
# the declaration from the server's configuration and uses Apache's default setting of 'off'.
#
# Requires:
# @param apache_version
# Configures module template behavior, package names, and default Apache modules by defining
# the version of Apache to use. We do not recommend manually configuring this parameter
# without reason.
#
# Sample Usage:
# @param conf_dir
# Sets the directory where the Apache server's main configuration file is located.
#
# @param conf_template
# Defines the template used for the main Apache configuration file. Modifying this
# parameter is potentially risky, as the apache module is designed to use a minimal
# configuration file customized by `conf.d` entries.
#
# @param confd_dir
# Sets the location of the Apache server's custom configuration directory.
#
# @param default_charset
# Used as the `AddDefaultCharset` directive in the main configuration file.
#
# @param default_confd_files
# Determines whether Puppet generates a default set of includable Apache configuration files
# in the directory defined by the `confd_dir` parameter. These configuration files
# correspond to what is typically installed with the Apache package on the server's
# operating system.
#
# @param default_mods
# Determines whether to configure and enable a set of default Apache modules depending on
# your operating system.<br />
# If `false`, Puppet includes only the Apache modules required to make the HTTP daemon work
# on your operating system, and you can declare any other modules separately using the
# `apache::mod::<MODULE NAME>` class or `apache::mod` defined type.<br />
# If `true`, Puppet installs additional modules, depending on the operating system and
# the values of `apache_version` and `mpm_module` parameters. Because these lists of
# modules can change frequently, consult the Puppet module's code for up-to-date lists.<br />
# If this parameter contains an array, Puppet instead enables all passed Apache modules.
#
# @param default_ssl_ca
# Sets the default certificate authority for the Apache server.<br />
# Although the default value results in a functioning Apache server, you **must** update
# this parameter with your certificate authority information before deploying this server in
# a production environment.
#
# @param default_ssl_cert
# Sets the SSL encryption certificate location.<br />
# Although the default value results in a functioning Apache server, you **must** update this
# parameter with your certificate location before deploying this server in a production environment.
#
# @param default_ssl_chain
# Sets the default SSL chain location.<br />
# Although this default value results in a functioning Apache server, you **must** update
# this parameter with your SSL chain before deploying this server in a production environment.
#
# @param default_ssl_crl
# Sets the path of the default certificate revocation list (CRL) file to use.<br />
# Although this default value results in a functioning Apache server, you **must** update
# this parameter with the CRL file path before deploying this server in a production
# environment. You can use this parameter with or in place of the `default_ssl_crl_path`.
#
# @param default_ssl_crl_path
# Sets the server's certificate revocation list path, which contains your CRLs.<br />
# Although this default value results in a functioning Apache server, you **must** update
# this parameter with the CRL file path before deploying this server in a production environment.
#
# @param default_ssl_crl_check
# Sets the default certificate revocation check level via the `SSLCARevocationCheck` directive.
# This parameter applies only to Apache 2.4 or higher and is ignored on older versions.<br />
# Although this default value results in a functioning Apache server, you **must** specify
# this parameter when using certificate revocation lists in a production environment.
#
# @param default_ssl_key
# Sets the SSL certificate key file location.
# Although the default values result in a functioning Apache server, you **must** update
# this parameter with your SSL key's location before deploying this server in a production
# environment.
#
# @param default_ssl_reload_on_change
# Enable reloading of apache if the content of ssl files have changed.
#
# @param default_ssl_vhost
# Configures a default SSL virtual host.
# If `true`, Puppet automatically configures the following virtual host using the
# `apache::vhost` defined type:
# ```puppet
# apache::vhost { 'default-ssl':
# port => 443,
# ssl => true,
# docroot => $docroot,
# scriptalias => $scriptalias,
# serveradmin => $serveradmin,
# access_log_file => "ssl_${access_log_file}",
# }
# ```
# **Note**: SSL virtual hosts only respond to HTTPS queries.
#
# @param default_type
# _Apache 2.2 only_. Sets the MIME `content-type` sent if the server cannot otherwise
# determine an appropriate `content-type`. This directive is deprecated in Apache 2.4 and
# newer, and is only for backwards compatibility in configuration files.
#
# @param default_vhost
# Configures a default virtual host when the class is declared.<br />
# To configure customized virtual hosts, set this parameter's
# value to `false`.<br />
# > **Note**: Apache will not start without at least one virtual host. If you set this
# to `false` you must configure a virtual host elsewhere.
#
# @param dev_packages
# Configures a specific dev package to use.<br />
# For example, using httpd 2.4 from the IUS yum repo:<br />
# ``` puppet
# include ::apache::dev
# class { 'apache':
# apache_name => 'httpd24u',
# dev_packages => 'httpd24u-devel',
# }
# ```
#
# @param docroot
# Sets the default `DocumentRoot` location.
#
# @param error_documents
# Determines whether to enable [custom error documents](https://httpd.apache.org/docs/current/custom-error.html) on the Apache server.
#
# @param group
# Sets the group ID that owns any Apache processes spawned to answer requests.<br />
# By default, Puppet attempts to manage this group as a resource under the `apache`
# class, determining the group based on the operating system as detected by the
# `apache::params` class. To prevent the group resource from being created and use a group
# created by another Puppet module, set the `manage_group` parameter's value to `false`.<br />
# > **Note**: Modifying this parameter only changes the group ID that Apache uses to spawn
# child processes to access resources. It does not change the user that owns the parent server
# process.
#
# @param httpd_dir
# Sets the Apache server's base configuration directory. This is useful for specially
# repackaged Apache server builds but might have unintended consequences when combined
# with the default distribution packages.
#
# @param http_protocol_options
# Specifies the strictness of HTTP protocol checks.<br />
# Valid options: any sequence of the following alternative values: `Strict` or `Unsafe`,
# `RegisteredMethods` or `LenientMethods`, and `Allow0.9` or `Require1.0`.
#
# @param keepalive
# Determines whether to enable persistent HTTP connections with the `KeepAlive` directive.
# If you set this to `On`, use the `keepalive_timeout` and `max_keepalive_requests` parameters
# to set relevant options.<br />
#
# @param keepalive_timeout
# Sets the `KeepAliveTimeout` directive, which determines the amount of time the Apache
# server waits for subsequent requests on a persistent HTTP connection. This parameter is
# only relevant if the `keepalive` parameter is enabled.
#
# @param max_keepalive_requests
# Limits the number of requests allowed per connection when the `keepalive` parameter is enabled.
#
# @param hostname_lookups
# This directive enables DNS lookups so that host names can be logged and passed to
# CGIs/SSIs in REMOTE_HOST.<br />
# > **Note**: If enabled, it impacts performance significantly.
#
# @param ldap_trusted_mode
# The following modes are supported:
#
# NONE - no encryption
# SSL - ldaps:// encryption on default port 636
# TLS - STARTTLS encryption on default port 389
# Not all LDAP toolkits support all the above modes. An error message will be logged at
# runtime if a mode is not supported, and the connection to the LDAP server will fail.
#
#If an ldaps:// URL is specified, the mode becomes SSL and the setting of LDAPTrustedMode is ignored.
#
# @param ldap_verify_server_cert
# Specifies whether to force the verification of a server certificate when establishing an SSL
# connection to the LDAP server.
# On|Off
#
# @param lib_path
# Specifies the location whereApache module files are stored.<br />
# > **Note**: Do not configure this parameter manually without special reason.
#
# @param log_level
# Configures the apache [LogLevel](https://httpd.apache.org/docs/current/mod/core.html#loglevel) directive
# which adjusts the verbosity of the messages recorded in the error logs.
#
# @param log_formats
# Define additional `LogFormat` directives. Values: A hash, such as:
# ``` puppet
# $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' }
# ```
# There are a number of predefined `LogFormats` in the `httpd.conf` that Puppet creates:
# ``` httpd
# LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
# LogFormat "%h %l %u %t \"%r\" %>s %b" common
# LogFormat "%{Referer}i -> %U" referer
# LogFormat "%{User-agent}i" agent
# LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded
# ```
# If your `log_formats` parameter contains one of those, it will be overwritten with **your** definition.
#
# @param logroot
# Changes the directory of Apache log files for the virtual host.
#
# @param logroot_mode
# Overrides the default `logroot` directory's mode.<br />
# > **Note**: Do _not_ grant write access to the directory where the logs are stored
# without being aware of the consequences. See the [Apache documentation](https://httpd.apache.org/docs/current/logs.html#security)
# for details.
#
# @param manage_group
# When `false`, stops Puppet from creating the group resource.<br />
# If you have a group created from another Puppet module that you want to use to run Apache,
# set this to `false`. Without this parameter, attempting to use a previously established
# group results in a duplicate resource error.
#
# @param supplementary_groups
# A list of groups to which the user belongs. These groups are in addition to the primary group.<br />
# Notice: This option only has an effect when `manage_user` is set to true.
#
# @param manage_user
# When `false`, stops Puppet from creating the user resource.<br />
# This is for instances when you have a user, created from another Puppet module, you want
# to use to run Apache. Without this parameter, attempting to use a previously established
# user would result in a duplicate resource error.
#
# @param mod_dir
# Sets where Puppet places configuration files for your Apache modules.
#
# @param mod_libs
# Allows the user to override default module library names.
# ```puppet
# include apache::params
# class { 'apache':
# mod_libs => merge($::apache::params::mod_libs, {
# 'wsgi' => 'mod_wsgi_python3.so',
# })
# }
# ```
#
# @param mod_packages
# Allows the user to override default module package names.
# ```puppet
# include apache::params
# class { 'apache':
# mod_packages => merge($::apache::params::mod_packages, {
# 'auth_kerb' => 'httpd24-mod_auth_kerb',
# })
# }
# ```
#
# @param mpm_module
# Determines which [multi-processing module](https://httpd.apache.org/docs/current/mpm.html) (MPM) is loaded and configured for the
# HTTPD process. Valid values are: `event`, `itk`, `peruser`, `prefork`, `worker` or `false`.<br />
# You must set this to `false` to explicitly declare the following classes with custom parameters:
# - `apache::mod::event`
# - `apache::mod::itk`
# - `apache::mod::peruser`
# - `apache::mod::prefork`
# - `apache::mod::worker`
#
# @param package_ensure
# Controls the `package` resource's `ensure` attribute. Valid values are: `absent`, `installed`
# (or equivalent `present`), or a version string.
#
# @param pidfile
# Allows settting a custom location for the pid file. Useful if using a custom-built Apache rpm.
#
# @param ports_file
# Sets the path to the file containing Apache ports configuration.
#
# @param protocols
# Sets the [Protocols](https://httpd.apache.org/docs/current/en/mod/core.html#protocols)
# directive, which lists available protocols for the server.
#
# @param protocols_honor_order
# Sets the [ProtocolsHonorOrder](https://httpd.apache.org/docs/current/en/mod/core.html#protocolshonororder)
# directive which determines whether the order of Protocols sets precedence during negotiation.
#
# @param purge_configs
# Removes all other Apache configs and virtual hosts.<br />
# Setting this to `false` is a stopgap measure to allow the apache module to coexist with
# existing or unmanaged configurations. We recommend moving your configuration to resources
# within this module. For virtual host configurations, see `purge_vhost_dir`.
#
# @param purge_vhost_dir
# If the `vhost_dir` parameter's value differs from the `confd_dir` parameter's, this parameter
# determines whether Puppet removes any configurations inside `vhost_dir` that are _not_ managed
# by Puppet.<br />
# Setting `purge_vhost_dir` to `false` is a stopgap measure to allow the apache module to
# coexist with existing or otherwise unmanaged configurations within `vhost_dir`.
#
# @param rewrite_lock
# Allows setting a custom location for a rewrite lock - considered best practice if using
# a RewriteMap of type prg in the `rewrites` parameter of your virtual host. This parameter
# only applies to Apache version 2.2 or lower and is ignored on newer versions.
#
# @param sendfile
# Forces Apache to use the Linux kernel's `sendfile` support to serve static files, via the
# `EnableSendfile` directive.
#
# @param serveradmin
# Sets the Apache server administrator's contact information via Apache's `ServerAdmin` directive.
#
# @param servername
# Sets the Apache server name via Apache's `ServerName` directive.
# Setting to `false` will not set ServerName at all.
#
# @param server_root
# Sets the Apache server's root directory via Apache's `ServerRoot` directive.
#
# @param server_signature
# Configures a trailing footer line to display at the bottom of server-generated documents,
# such as error documents and output of certain Apache modules, via Apache's `ServerSignature`
# directive. Valid values are: `On` or `Off`.
#
# @param server_tokens
# Controls how much information Apache sends to the browser about itself and the operating
# system, via Apache's `ServerTokens` directive.
#
# @param service_enable
# Determines whether Puppet enables the Apache HTTPD service when the system is booted.
#
# @param service_ensure
# Determines whether Puppet should make sure the service is running.
# Valid values are: `true` (or `running`) or `false` (or `stopped`).<br />
# The `false` or `stopped` values set the 'httpd' service resource's `ensure` parameter
# to `false`, which is useful when you want to let the service be managed by another
# application, such as Pacemaker.<br />
#
# @param service_name
# Sets the name of the Apache service.
#
# @param service_manage
# Determines whether Puppet manages the HTTPD service's state.
#
# @param service_restart
# Determines whether Puppet should use a specific command to restart the HTTPD service.
# Values: a command to restart the Apache service.
#
# @param timeout
# Sets Apache's `TimeOut` directive, which defines the number of seconds Apache waits for
# certain events before failing a request.
#
# @param trace_enable
# Controls how Apache handles `TRACE` requests (per RFC 2616) via the `TraceEnable` directive.
#
# @param use_canonical_name
# Controls Apache's `UseCanonicalName` directive which controls how Apache handles
# self-referential URLs. If not specified, this parameter omits the declaration from the
# server's configuration and uses Apache's default setting of 'off'.
#
# @param use_systemd
# Controls whether the systemd module should be installed on Centos 7 servers, this is
# especially useful if using custom-built RPMs.
#
# @param file_mode
# Sets the desired permissions mode for config files.
# Valid values are: a string, with permissions mode in symbolic or numeric notation.
#
# @param root_directory_options
# Array of the desired options for the `/` directory in httpd.conf.
#
# @param root_directory_secured
# Sets the default access policy for the `/` directory in httpd.conf. A value of `false`
# allows access to all resources that are missing a more specific access policy. A value of
# `true` denies access to all resources by default. If `true`, more specific rules must be
# used to allow access to these resources (for example, in a directory block using the
# `directories` parameter).
#
# @param vhost_dir
# Changes your virtual host configuration files' location.
#
# @param vhost_include_pattern
# Defines the pattern for files included from the `vhost_dir`.
# If set to a value like `[^.#]\*.conf[^~]` to make sure that files accidentally created in
# this directory (such as files created by version control systems or editor backups) are
# *not* included in your server configuration.<br />
# Some operating systems use a value of `*.conf`. By default, this module creates configuration
# files ending in `.conf`.
#
# @param user
# Changes the user that Apache uses to answer requests. Apache's parent process continues
# to run as root, but child processes access resources as the user defined by this parameter.
# To prevent Puppet from managing the user, set the `manage_user` parameter to `false`.
#
# @param apache_name
# The name of the Apache package to install. If you are using a non-standard Apache package
# you might need to override the default setting.<br />
# For CentOS/RHEL Software Collections (SCL), you can also use `apache::version::scl_httpd_version`.
#
# @param error_log
# The name of the error log file for the main server instance. If the string starts with
# `/`, `|`, or `syslog`: the full path is set. Otherwise, the filename is prefixed with
# `$logroot`.
#
# @param scriptalias
# Directory to use for global script alias
#
# @param access_log_file
# The name of the access log file for the main server instance.
#
# @param limitreqfields
# The `limitreqfields` parameter sets the maximum number of request header fields in
# an HTTP request. This directive gives the server administrator greater control over
# abnormal client request behavior, which may be useful for avoiding some forms of
# denial-of-service attacks. The value should be increased if normal clients see an error
# response from the server that indicates too many fields were sent in the request.
#
# @param limitreqfieldsize
# The `limitreqfieldsize` parameter sets the maximum ammount of _bytes_ that will
# be allowed within a request header.
#
# @param ip
# Specifies the ip address
#
# @param purge_vdir
# Removes all other Apache configs and virtual hosts.<br />
# > **Note**: This parameter is deprecated in favor of the `purge_config` parameter.<br />
#
# @param conf_enabled
# Whether the additional config files in `/etc/apache2/conf-enabled` should be managed.
#
# @param vhost_enable_dir
# Set's whether the vhost definitions will be stored in sites-availible and if
# they will be symlinked to and from sites-enabled.
#
# @param mod_enable_dir
# Set's whether the mods-enabled directory should be managed.
#
# @param ssl_file
# This parameter allows you to set an ssl.conf file to be managed in order to implement
# an SSL Certificate.
#
# @param file_e_tag
# Sets the server default for the `FileETag` declaration, which modifies the response header
# field for static files.
#
# @param use_optional_includes
# Specifies whether Apache uses the `IncludeOptional` directive instead of `Include` for
# `additional_includes` in Apache 2.4 or newer.
#
# @param mime_types_additional
# Specifies any idditional Internet media (mime) types that you wish to be configured.
#
class apache (
$apache_name = $::apache::params::apache_name,
$service_name = $::apache::params::service_name,
$default_mods = true,
Boolean $default_vhost = true,
$default_charset = undef,
Boolean $default_confd_files = true,
Boolean $default_ssl_vhost = false,
$default_ssl_cert = $::apache::params::default_ssl_cert,
$default_ssl_key = $::apache::params::default_ssl_key,
$default_ssl_chain = undef,
$default_ssl_ca = undef,
$default_ssl_crl_path = undef,
$default_ssl_crl = undef,
$default_ssl_crl_check = undef,
$default_type = 'none',
$dev_packages = $::apache::params::dev_packages,
$ip = undef,
Boolean $service_enable = true,
Boolean $service_manage = true,
$service_ensure = 'running',
$service_restart = undef,
$purge_configs = false,
$purge_vhost_dir = undef,
$purge_vdir = false,
$serveradmin = 'root@localhost',
$sendfile = 'On',
$error_documents = false,
$timeout = '120',
$httpd_dir = $::apache::params::httpd_dir,
$server_root = $::apache::params::server_root,
$conf_dir = $::apache::params::conf_dir,
$confd_dir = $::apache::params::confd_dir,
$vhost_dir = $::apache::params::vhost_dir,
$vhost_enable_dir = $::apache::params::vhost_enable_dir,
$mod_packages = $::apache::params::mod_packages,
$vhost_include_pattern = $::apache::params::vhost_include_pattern,
$mod_dir = $::apache::params::mod_dir,
$mod_enable_dir = $::apache::params::mod_enable_dir,
$mpm_module = $::apache::params::mpm_module,
$lib_path = $::apache::params::lib_path,
$conf_template = $::apache::params::conf_template,
$servername = $::apache::params::servername,
$pidfile = $::apache::params::pidfile,
Optional[Stdlib::Absolutepath] $rewrite_lock = undef,
Boolean $manage_user = true,
Boolean $manage_group = true,
$user = $::apache::params::user,
$group = $::apache::params::group,
$http_protocol_options = $::apache::params::http_protocol_options,
$supplementary_groups = [],
$keepalive = $::apache::params::keepalive,
$keepalive_timeout = $::apache::params::keepalive_timeout,
$max_keepalive_requests = $::apache::params::max_keepalive_requests,
$limitreqfieldsize = '8190',
$logroot = $::apache::params::logroot,
$logroot_mode = $::apache::params::logroot_mode,
$log_level = $::apache::params::log_level,
$log_formats = {},
$ssl_file = undef,
$ports_file = $::apache::params::ports_file,
$docroot = $::apache::params::docroot,
$apache_version = $::apache::version::default,
$server_tokens = 'OS',
$server_signature = 'On',
$trace_enable = 'On',
Optional[Enum['on', 'off', 'nodecode']] $allow_encoded_slashes = undef,
$file_e_tag = undef,
$apache_name = $apache::params::apache_name,
$service_name = $apache::params::service_name,
$default_mods = true,
Boolean $default_vhost = true,
$default_charset = undef,
Boolean $default_confd_files = true,
Boolean $default_ssl_vhost = false,
$default_ssl_cert = $apache::params::default_ssl_cert,
$default_ssl_key = $apache::params::default_ssl_key,
$default_ssl_chain = undef,
$default_ssl_ca = undef,
$default_ssl_crl_path = undef,
$default_ssl_crl = undef,
$default_ssl_crl_check = undef,
Boolean $default_ssl_reload_on_change = false,
$default_type = 'none',
$dev_packages = $apache::params::dev_packages,
$ip = undef,
Boolean $service_enable = true,
Boolean $service_manage = true,
$service_ensure = 'running',
$service_restart = undef,
$purge_configs = true,
$purge_vhost_dir = undef,
$purge_vdir = false,
$serveradmin = 'root@localhost',
Enum['On', 'Off', 'on', 'off'] $sendfile = 'On',
$ldap_verify_server_cert = undef,
$ldap_trusted_mode = undef,
$error_documents = false,
$timeout = '60',
$httpd_dir = $apache::params::httpd_dir,
$server_root = $apache::params::server_root,
$conf_dir = $apache::params::conf_dir,
$confd_dir = $apache::params::confd_dir,
Enum['Off', 'On', 'Double', 'off', 'on', 'double'] $hostname_lookups = $apache::params::hostname_lookups,
$conf_enabled = $apache::params::conf_enabled,
$vhost_dir = $apache::params::vhost_dir,
$vhost_enable_dir = $apache::params::vhost_enable_dir,
$mod_libs = $apache::params::mod_libs,
$mod_packages = $apache::params::mod_packages,
$vhost_include_pattern = $apache::params::vhost_include_pattern,
$mod_dir = $apache::params::mod_dir,
$mod_enable_dir = $apache::params::mod_enable_dir,
$mpm_module = $apache::params::mpm_module,
$lib_path = $apache::params::lib_path,
$conf_template = $apache::params::conf_template,
$servername = $apache::params::servername,
$pidfile = $apache::params::pidfile,
Optional[Stdlib::Absolutepath] $rewrite_lock = undef,
Boolean $manage_user = true,
Boolean $manage_group = true,
$user = $apache::params::user,
$group = $apache::params::group,
$http_protocol_options = $apache::params::http_protocol_options,
$supplementary_groups = [],
$keepalive = $apache::params::keepalive,
$keepalive_timeout = $apache::params::keepalive_timeout,
$max_keepalive_requests = $apache::params::max_keepalive_requests,
$limitreqfieldsize = '8190',
$limitreqfields = '100',
$logroot = $apache::params::logroot,
$logroot_mode = $apache::params::logroot_mode,
Apache::LogLevel $log_level = $apache::params::log_level,
$log_formats = {},
$ssl_file = undef,
$ports_file = $apache::params::ports_file,
$docroot = $apache::params::docroot,
$apache_version = $apache::version::default,
$server_tokens = 'Prod',
$server_signature = 'On',
$trace_enable = 'On',
Optional[Enum['on', 'off', 'nodecode']] $allow_encoded_slashes = undef,
$file_e_tag = undef,
Optional[Enum['On', 'on', 'Off', 'off', 'DNS', 'dns']]
$use_canonical_name = undef,
$package_ensure = 'installed',
Boolean $use_optional_includes = $::apache::params::use_optional_includes,
$use_systemd = $::apache::params::use_systemd,
$mime_types_additional = $::apache::params::mime_types_additional,
$file_mode = $::apache::params::file_mode,
$root_directory_options = $::apache::params::root_directory_options,
Boolean $use_optional_includes = $apache::params::use_optional_includes,
$use_systemd = $apache::params::use_systemd,
$mime_types_additional = $apache::params::mime_types_additional,
$file_mode = $apache::params::file_mode,
$root_directory_options = $apache::params::root_directory_options,
Boolean $root_directory_secured = false,
$error_log = $::apache::params::error_log,
$scriptalias = $::apache::params::scriptalias,
$access_log_file = $::apache::params::access_log_file,
$overwrite_ports = true, # TODO: Implement this as in wheezy apache
$error_log = $apache::params::error_log,
$scriptalias = $apache::params::scriptalias,
$access_log_file = $apache::params::access_log_file,
Array[Enum['h2', 'h2c', 'http/1.1']] $protocols = [],
Optional[Boolean] $protocols_honor_order = undef,
) inherits ::apache::params {
$valid_mpms_re = $apache_version ? {
'2.4' => '(event|itk|peruser|prefork|worker)',
default => '(event|itk|prefork|worker)'
}
if $::osfamily == 'RedHat' and $::apache::version::distrelease == '7' {
if $::osfamily == 'RedHat' and $facts['operatingsystemmajrelease'] == '7' {
# On redhat 7 the ssl.conf lives in /etc/httpd/conf.d (the confd_dir)
# when all other module configs live in /etc/httpd/conf.modules.d (the
# mod_dir). On all other platforms and versions, ssl.conf lives in the
# mod_dir. This should maintain the expected location of ssl.conf
$_ssl_file = $ssl_file ? {
undef => "${apache::confd_dir}/ssl.conf",
default => $ssl_file
default => $ssl_file
}
} else {
$_ssl_file = $ssl_file ? {
undef => "${apache::mod_dir}/ssl.conf",
default => $ssl_file
default => $ssl_file
}
}
@@ -130,7 +587,6 @@ class apache (
notify => Class['Apache::Service'],
}
}
validate_re($sendfile, [ '^[oO]n$' , '^[oO]ff$' ])
# declare the web server user and group
# Note: requiring the package means the package ought to create them and not puppet
@@ -149,9 +605,7 @@ class apache (
}
}
validate_apache_log_level($log_level)
class { '::apache::service':
class { 'apache::service':
service_name => $service_name,
service_enable => $service_enable,
service_manage => $service_manage,
@@ -191,6 +645,17 @@ class apache (
require => Package['httpd'],
}
if $conf_enabled and ! defined(File[$conf_enabled]) {
file { $conf_enabled:
ensure => directory,
recurse => true,
purge => $purge_confd,
force => $purge_confd,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
}
if ! defined(File[$mod_dir]) {
exec { "mkdir ${mod_dir}":
creates => $mod_dir,
@@ -256,29 +721,27 @@ class apache (
$vhost_load_dir = $vhost_dir
}
if $overwrite_ports {
concat { $ports_file:
ensure => present,
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
concat::fragment { 'Apache ports header':
target => $ports_file,
content => template('apache/ports_header.erb'),
}
concat { $ports_file:
ensure => present,
owner => 'root',
group => $apache::params::root_group,
mode => $apache::file_mode,
notify => Class['Apache::Service'],
require => Package['httpd'],
}
concat::fragment { 'Apache ports header':
target => $ports_file,
content => template('apache/ports_header.erb'),
}
if $::apache::conf_dir and $::apache::params::conf_file {
if $apache::conf_dir and $apache::params::conf_file {
if $::osfamily == 'gentoo' {
$error_documents_path = '/usr/share/apache2/error'
if is_array($default_mods) {
if $default_mods =~ Array {
if versioncmp($apache_version, '2.4') >= 0 {
if defined('apache::mod::ssl') {
::portage::makeconf { 'apache2_modules':
content => concat($default_mods, [ 'authz_core', 'socache_shmcb' ]),
content => concat($default_mods, ['authz_core', 'socache_shmcb']),
}
} else {
::portage::makeconf { 'apache2_modules':
@@ -293,11 +756,11 @@ class apache (
}
file { [
'/etc/apache2/modules.d/.keep_www-servers_apache-2',
'/etc/apache2/vhosts.d/.keep_www-servers_apache-2',
]:
ensure => absent,
require => Package['httpd'],
'/etc/apache2/modules.d/.keep_www-servers_apache-2',
'/etc/apache2/vhosts.d/.keep_www-servers_apache-2',
]:
ensure => absent,
require => Package['httpd'],
}
}
@@ -330,26 +793,27 @@ class apache (
# - $trace_enable
# - $rewrite_lock
# - $root_directory_secured
file { "${::apache::conf_dir}/${::apache::params::conf_file}":
file { "${apache::conf_dir}/${apache::params::conf_file}":
ensure => file,
mode => $apache::file_mode,
content => template($conf_template),
notify => Class['Apache::Service'],
require => [Package['httpd']],
require => [Package['httpd'], Concat[$ports_file]],
}
# preserve back-wards compatibility to the times when default_mods was
# only a boolean value. Now it can be an array (too)
if is_array($default_mods) {
class { '::apache::default_mods':
if $default_mods =~ Array {
class { 'apache::default_mods':
all => false,
mods => $default_mods,
}
} else {
class { '::apache::default_mods':
class { 'apache::default_mods':
all => $default_mods,
}
}
class { '::apache::default_confd_files':
class { 'apache::default_confd_files':
all => $default_confd_files,
}
if $mpm_module and $mpm_module != 'false' { # lint:ignore:quoted_booleans
@@ -366,33 +830,37 @@ class apache (
}
::apache::vhost { 'default':
ensure => $default_vhost_ensure,
port => '80',
docroot => $docroot,
scriptalias => $scriptalias,
serveradmin => $serveradmin,
access_log_file => $access_log_file,
priority => '15',
ip => $ip,
logroot_mode => $logroot_mode,
manage_docroot => $default_vhost,
ensure => $default_vhost_ensure,
port => '80',
docroot => $docroot,
scriptalias => $scriptalias,
serveradmin => $serveradmin,
access_log_file => $access_log_file,
priority => '15',
ip => $ip,
logroot_mode => $logroot_mode,
manage_docroot => $default_vhost,
use_servername_for_filenames => true,
use_port_for_filenames => true,
}
$ssl_access_log_file = $::osfamily ? {
'freebsd' => $access_log_file,
default => "ssl_${access_log_file}",
}
::apache::vhost { 'default-ssl':
ensure => $default_ssl_vhost_ensure,
port => '443',
ssl => true,
docroot => $docroot,
scriptalias => $scriptalias,
serveradmin => $serveradmin,
access_log_file => $ssl_access_log_file,
priority => '15',
ip => $ip,
logroot_mode => $logroot_mode,
manage_docroot => $default_ssl_vhost,
ensure => $default_ssl_vhost_ensure,
port => '443',
ssl => true,
docroot => $docroot,
scriptalias => $scriptalias,
serveradmin => $serveradmin,
access_log_file => $ssl_access_log_file,
priority => '15',
ip => $ip,
logroot_mode => $logroot_mode,
manage_docroot => $default_ssl_vhost,
use_servername_for_filenames => true,
use_port_for_filenames => true,
}
}

View File

@@ -1,25 +1,15 @@
define apache::listen ($port='') {
# @summary
# Adds `Listen` directives to `ports.conf` that define the
# Apache server's or a virtual host's listening address and port.
#
# The `apache::vhost` class uses this defined type, and titles take the form
# `<PORT>`, `<IPV4>:<PORT>`, or `<IPV6>:<PORT>`.
define apache::listen {
$listen_addr_port = $name
if defined(Concat[$::apache::ports_file]){
# Template uses: $listen_addr_port
concat::fragment { "Listen ${listen_addr_port}":
target => $::apache::ports_file,
content => template('apache/listen.erb'),
}
} elsif $port != '80' {
# Create a temporary file
# join with cat $tmp_file >> $file
# remove tmp files
$ports_file = $::apache::ports_file
$tmp_file = "$ports_file-tmp_listen"
file { $tmp_file:
ensure => file,
content => template('apache/listen.erb'),
}
exec { "apache::listen: cat $tmp_file with ports.conf":
command => "/bin/cat $tmp_file >> $ports_file;/bin/rm $tmp_file"
}
# Template uses: $listen_addr_port
concat::fragment { "Listen ${listen_addr_port}":
target => $apache::ports_file,
content => template('apache/listen.erb'),
}
}

View File

@@ -1,8 +1,42 @@
# @summary
# Installs packages for an Apache module that doesn't have a corresponding
# `apache::mod::<MODULE NAME>` class.
#
# Checks for or places the module's default configuration files in the Apache server's
# `module` and `enable` directories. The default locations depend on your operating system.
#
# @param package
# **Required**.<br />
# Names the package Puppet uses to install the Apache module.
#
# @param package_ensure
# Determines whether Puppet ensures the Apache module should be installed.
#
# @param lib
# Defines the module's shared object name. Do not configure manually without special reason.
#
# @param lib_path
# Specifies a path to the module's libraries. Do not manually set this parameter
# without special reason. The `path` parameter overrides this value.
#
# @param loadfile_name
# Sets the filename for the module's `LoadFile` directive, which can also set
# the module load order as Apache processes them in alphanumeric order.
#
# @param id
# Specifies the package id
#
# @param loadfiles
# Specifies an array of `LoadFile` directives.
#
# @param path
# Specifies a path to the module. Do not manually set this parameter without a special reason.
#
define apache::mod (
$package = undef,
$package_ensure = 'present',
$lib = undef,
$lib_path = $::apache::lib_path,
$lib_path = $apache::lib_path,
$id = undef,
$path = undef,
$loadfile_name = undef,
@@ -14,10 +48,10 @@ define apache::mod (
$mod = $name
#include apache #This creates duplicate resources in rspec-puppet
$mod_dir = $::apache::mod_dir
$mod_dir = $apache::mod_dir
# Determine if we have special lib
$mod_libs = $::apache::params::mod_libs
$mod_libs = $apache::mod_libs
if $lib {
$_lib = $lib
} elsif has_key($mod_libs, $mod) { # 2.6 compatibility hack
@@ -46,11 +80,11 @@ define apache::mod (
}
# Determine if we have a package
$mod_packages = $::apache::mod_packages
$mod_packages = $apache::mod_packages
if $package {
$_package = $package
} elsif has_key($mod_packages, $mod) { # 2.6 compatibility hack
if ($::apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/) {
if ($apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/ and $::operatingsystemmajrelease != '2') {
# On amazon linux we need to prefix our package name with mod24 instead of mod to support apache 2.4
$_package = regsubst($mod_packages[$mod],'^(mod_)?(.*)','mod24_\2')
} else {
@@ -67,11 +101,11 @@ define apache::mod (
$package_before = $::osfamily ? {
'freebsd' => [
File[$_loadfile_name],
File["${::apache::conf_dir}/${::apache::params::conf_file}"]
File["${apache::conf_dir}/${apache::params::conf_file}"]
],
default => [
File[$_loadfile_name],
File[$::apache::confd_dir],
File[$apache::confd_dir],
],
}
# if there are any packages, they should be installed before the associated conf file
@@ -89,8 +123,8 @@ define apache::mod (
ensure => file,
path => "${mod_dir}/${_loadfile_name}",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
content => template('apache/mod/load.erb'),
require => [
Package['httpd'],
@@ -101,14 +135,14 @@ define apache::mod (
}
if $::osfamily == 'Debian' {
$enable_dir = $::apache::mod_enable_dir
file{ "${_loadfile_name} symlink":
$enable_dir = $apache::mod_enable_dir
file { "${_loadfile_name} symlink":
ensure => link,
path => "${enable_dir}/${_loadfile_name}",
target => "${mod_dir}/${_loadfile_name}",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
require => [
File[$_loadfile_name],
Exec["mkdir ${enable_dir}"],
@@ -120,13 +154,13 @@ define apache::mod (
# defined in the class apache::mod::module
# Some modules do not require this file.
if defined(File["${mod}.conf"]) {
file{ "${mod}.conf symlink":
file { "${mod}.conf symlink":
ensure => link,
path => "${enable_dir}/${mod}.conf",
target => "${mod_dir}/${mod}.conf",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
require => [
File["${mod}.conf"],
Exec["mkdir ${enable_dir}"],
@@ -136,14 +170,14 @@ define apache::mod (
}
}
} elsif $::osfamily == 'Suse' {
$enable_dir = $::apache::mod_enable_dir
file{ "${_loadfile_name} symlink":
$enable_dir = $apache::mod_enable_dir
file { "${_loadfile_name} symlink":
ensure => link,
path => "${enable_dir}/${_loadfile_name}",
target => "${mod_dir}/${_loadfile_name}",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
require => [
File[$_loadfile_name],
Exec["mkdir ${enable_dir}"],
@@ -155,13 +189,13 @@ define apache::mod (
# defined in the class apache::mod::module
# Some modules do not require this file.
if defined(File["${mod}.conf"]) {
file{ "${mod}.conf symlink":
file { "${mod}.conf symlink":
ensure => link,
path => "${enable_dir}/${mod}.conf",
target => "${mod_dir}/${mod}.conf",
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
require => [
File["${mod}.conf"],
Exec["mkdir ${enable_dir}"],

View File

@@ -1,3 +1,8 @@
# @summary
# Installs Apache mod_actions
#
# @see https://httpd.apache.org/docs/current/mod/mod_actions.html for additional documentation.
#
class apache::mod::actions {
apache::mod { 'actions': }
}

View File

@@ -1,10 +1,33 @@
class apache::mod::alias(
# @summary
# Installs and configures `mod_alias`.
#
# @param apache_version
# The version of Apache, if not set will be retrieved from the init class.
#
# @param icons_options
# Disables directory listings for the icons directory, via Apache [Options](https://httpd.apache.org/docs/current/mod/core.html#options)
# directive.
#
# @param icons_path
# Sets the local path for an /icons/ Alias. Default depends on operating system:
# - Debian: /usr/share/apache2/icons
# - FreeBSD: /usr/local/www/apache24/icons
# - Gentoo: /var/www/icons
# - Red Hat: /var/www/icons, except on Apache 2.4, where it's /usr/share/httpd/icons
#
# @param icons_path
# Change the alias for /icons/.
#
# @see https://httpd.apache.org/docs/current/mod/mod_alias.html for additional documentation.
#
class apache::mod::alias (
$apache_version = undef,
$icons_options = 'Indexes MultiViews',
# set icons_path to false to disable the alias
$icons_path = $::apache::params::alias_icons_path,
$icons_path = $apache::params::alias_icons_path,
$icons_prefix = $apache::params::icons_prefix
) inherits ::apache::params {
include ::apache
include apache
$_apache_version = pick($apache_version, $apache::apache_version)
apache::mod { 'alias': }
@@ -12,11 +35,11 @@ class apache::mod::alias(
if $icons_path {
file { 'alias.conf':
ensure => file,
path => "${::apache::mod_dir}/alias.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/alias.conf",
mode => $apache::file_mode,
content => template('apache/mod/alias.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -0,0 +1,11 @@
# @summary
# Installs `mod_apreq2`.
#
# @see http://httpd.apache.org/apreq/docs/libapreq2/group__mod__apreq2.html for additional documentation.
#
# @note Unsupported platforms: CentOS: all; Debian: 8; OracleLinux: all; RedHat: all; Scientific: all; SLES: all; Ubuntu: all
class apache::mod::apreq2 {
::apache::mod { 'apreq2':
id => 'apreq_module',
}
}

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_auth_basic`
#
# @see https://httpd.apache.org/docs/current/mod/mod_auth_basic.html for additional documentation.
#
class apache::mod::auth_basic {
::apache::mod { 'auth_basic': }
}

View File

@@ -1,7 +1,90 @@
# @summary
# Installs and configures `mod_auth_cas`.
#
# @param cas_login_url
# Sets the URL to which the module redirects users when they attempt to access a
# CAS-protected resource and don't have an active session.
#
# @param cas_validate_url
# Sets the URL to use when validating a client-presented ticket in an HTTP query string.
#
# @param cas_cookie_path
# Sets the location where information on the current session should be stored. This should
# be writable by the web server only.
#
# @param cas_cookie_path_mode
# The mode of cas_cookie_path.
#
# @param cas_version
# The version of the CAS protocol to adhere to.
#
# @param cas_debug
# Whether to enable or disable debug mode.
#
# @param cas_validate_server
# Whether to validate the presented certificate. This has been deprecated and
# removed from Version 1.1-RC1 onward.
#
# @param cas_validatedepth
# The maximum depth for chained certificate validation.
#
# @param cas_proxy_validate_url
# The URL to use when performing a proxy validation.
#
# @param cas_root_proxied_as
# Sets the URL end users see when access to this Apache server is proxied per vhost.
# This URL should not include a trailing slash.
#
# @param cas_cookie_entropy
# When creating a local session, this many random bytes are used to create a unique
# session identifier.
#
# @param cas_timeout
# The hard limit, in seconds, for a mod_auth_cas session.
#
# @param cas_idle_timeout
# The limit, in seconds, of how long a mod_auth_cas session can be idle.
#
# @param cas_cache_clean_interval
# The minimum amount of time that must pass inbetween cache cleanings.
#
# @param cas_cookie_domain
# The value for the 'Domain=' parameter in the Set-Cookie header.
#
# @param cas_cookie_http_only
# Setting this flag prevents the mod_auth_cas cookies from being accessed by
# client side Javascript.
#
# @param cas_authoritative
# Determines whether an optional authorization directive is authoritative and thus binding.
#
# @param cas_validate_saml
# Parse response from CAS server for SAML.
#
# @param cas_sso_enabled
# Enables experimental support for single sign out (may mangle POST data).
#
# @param cas_attribute_prefix
# Adds a header with the value of this header being the attribute values when SAML
# validation is enabled.
#
# @param cas_attribute_delimiter
# Sets the delimiter between attribute values in the header created by `cas_attribute_prefix`.
#
# @param cas_scrub_request_headers
# Remove inbound request headers that may have special meaning within mod_auth_cas.
#
# @param suppress_warning
# Suppress warning about being on RedHat (mod_auth_cas package is now available in epel-testing repo).
#
# @note The auth_cas module isn't available on RH/CentOS without providing dependency packages provided by EPEL.
#
# @see https://github.com/apereo/mod_auth_cas for additional documentation.
#
class apache::mod::auth_cas (
String $cas_login_url,
String $cas_validate_url,
String $cas_cookie_path = $::apache::params::cas_cookie_path,
String $cas_cookie_path = $apache::params::cas_cookie_path,
$cas_cookie_path_mode = '0750',
$cas_version = 2,
$cas_debug = 'Off',
@@ -24,12 +107,11 @@ class apache::mod::auth_cas (
$cas_scrub_request_headers = undef,
$suppress_warning = false,
) inherits ::apache::params {
if $::osfamily == 'RedHat' and ! $suppress_warning {
warning('RedHat distributions do not have Apache mod_auth_cas in their default package repositories.')
}
include ::apache
include apache
::apache::mod { 'auth_cas': }
file { $cas_cookie_path:
@@ -44,12 +126,11 @@ class apache::mod::auth_cas (
# - All variables beginning with cas_
file { 'auth_cas.conf':
ensure => file,
path => "${::apache::mod_dir}/auth_cas.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/auth_cas.conf",
mode => $apache::file_mode,
content => template('apache/mod/auth_cas.conf.erb'),
require => [ Exec["mkdir ${::apache::mod_dir}"], ],
before => File[$::apache::mod_dir],
require => [Exec["mkdir ${apache::mod_dir}"],],
before => File[$apache::mod_dir],
notify => Class['Apache::Service'],
}
}

View File

@@ -0,0 +1,10 @@
# @summary
# Installs `mod_auth_gsappi`.
#
# @see https://github.com/modauthgssapi/mod_auth_gssapi for additional documentation.
#
class apache::mod::auth_gssapi {
include apache
include apache::mod::authn_core
apache::mod { 'auth_gssapi': }
}

View File

@@ -1,7 +1,9 @@
# @summary
# Installs `mod_auth_kerb`
#
# @see http://modauthkerb.sourceforge.net for additional documentation.
class apache::mod::auth_kerb {
include ::apache
include ::apache::mod::authn_core
include apache
include apache::mod::authn_core
::apache::mod { 'auth_kerb': }
}

View File

@@ -1,26 +1,50 @@
# @summary
# Installs and configures `mod_auth_mellon`.
#
# @param mellon_cache_size
# Maximum number of sessions which can be active at once.
#
# @param mellon_lock_file
# Full path to a file used for synchronizing access to the session data.
#
# @param mellon_post_directory
# Full path of a directory where POST requests are saved during authentication.
#
# @param mellon_cache_entry_size
# Maximum size for a single session entry in bytes.
#
# @param mellon_post_ttl
# Delay in seconds before a saved POST request can be flushed.
#
# @param mellon_post_size
# Maximum size for saved POST requests.
#
# @param mellon_post_count
# Maximum amount of saved POST requests.
#
# @see https://github.com/Uninett/mod_auth_mellon for additional documentation.
#
class apache::mod::auth_mellon (
$mellon_cache_size = $::apache::params::mellon_cache_size,
$mellon_lock_file = $::apache::params::mellon_lock_file,
$mellon_post_directory = $::apache::params::mellon_post_directory,
$mellon_cache_size = $apache::params::mellon_cache_size,
$mellon_lock_file = $apache::params::mellon_lock_file,
$mellon_post_directory = $apache::params::mellon_post_directory,
$mellon_cache_entry_size = undef,
$mellon_post_ttl = undef,
$mellon_post_size = undef,
$mellon_post_count = undef
) inherits ::apache::params {
include ::apache
include apache
::apache::mod { 'auth_mellon': }
# Template uses
# - All variables beginning with mellon_
file { 'auth_mellon.conf':
ensure => file,
path => "${::apache::mod_dir}/auth_mellon.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/auth_mellon.conf",
mode => $apache::file_mode,
content => template('apache/mod/auth_mellon.conf.erb'),
require => [ Exec["mkdir ${::apache::mod_dir}"], ],
before => File[$::apache::mod_dir],
require => [Exec["mkdir ${apache::mod_dir}"],],
before => File[$apache::mod_dir],
notify => Class['Apache::Service'],
}
}

View File

@@ -0,0 +1,11 @@
# @summary
# Installs and configures `mod_auth_openidc`.
#
# @see https://github.com/zmartzone/mod_auth_openidc for additional documentation.
#
class apache::mod::auth_openidc (
) inherits ::apache::params {
include apache
include apache::mod::authz_user
apache::mod { 'auth_openidc': }
}

View File

@@ -1,5 +1,13 @@
class apache::mod::authn_core(
$apache_version = $::apache::apache_version
# @summary
# Installs `mod_authn_core`.
#
# @param apache_version
# The version of apache being run.
#
# @see https://httpd.apache.org/docs/current/mod/mod_authn_core.html for additional documentation.
#
class apache::mod::authn_core (
$apache_version = $apache::apache_version
) {
if versioncmp($apache_version, '2.4') >= 0 {
::apache::mod { 'authn_core': }

View File

@@ -1,3 +1,32 @@
# @summary
# Installs `mod_authn_dbd`.
#
# @param authn_dbd_params
# The params needed for the mod to function.
#
# @param authn_dbd_dbdriver
# Selects an apr_dbd driver by name.
#
# @param authn_dbd_query
#
# @param authn_dbd_min
# Set the minimum number of connections per process.
#
# @param authn_dbd_max
# Set the maximum number of connections per process.
#
# @param authn_dbd_keep
# Set the maximum number of connections per process to be sustained.
#
# @param authn_dbd_exptime
# Set the time to keep idle connections alive when the number of
# connections specified in DBDKeep has been exceeded.
#
# @param authn_dbd_alias
# Sets an alias for `AuthnProvider.
#
# @see https://httpd.apache.org/docs/current/mod/mod_authn_dbd.html for additional documentation.
#
class apache::mod::authn_dbd (
$authn_dbd_params,
$authn_dbd_dbdriver = 'mysql',
@@ -8,23 +37,23 @@ class apache::mod::authn_dbd (
$authn_dbd_exptime = '300',
$authn_dbd_alias = undef,
) inherits ::apache::params {
include ::apache
include ::apache::mod::dbd
include apache
include apache::mod::dbd
::apache::mod { 'authn_dbd': }
if $authn_dbd_alias {
include ::apache::mod::authn_core
include apache::mod::authn_core
}
# Template uses
# - All variables beginning with authn_dbd
file { 'authn_dbd.conf':
ensure => file,
path => "${::apache::mod_dir}/authn_dbd.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/authn_dbd.conf",
mode => $apache::file_mode,
content => template('apache/mod/authn_dbd.conf.erb'),
require => [ Exec["mkdir ${::apache::mod_dir}"], ],
before => File[$::apache::mod_dir],
require => [Exec["mkdir ${apache::mod_dir}"],],
before => File[$apache::mod_dir],
notify => Class['Apache::Service'],
}
}

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_authn_file`.
#
# @see https://httpd.apache.org/docs/2.4/mod/mod_authn_file.html for additional documentation.
#
class apache::mod::authn_file {
::apache::mod { 'authn_file': }
}

View File

@@ -1,11 +1,20 @@
# lint:ignore:variable_is_lowercase required for compatibility
# @summary
# Installs `mod_authnz_ldap`.
#
# @param verify_server_cert
# Whether to force te verification of a server cert or not.
#
# @param package_name
# The name of the ldap package.
#
# @see https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html for additional documentation.
# @note Unsupported platforms: RedHat: 6, 8; CentOS: 6, 8; OracleLinux: 6, 8; Ubuntu: all; Debian: all; SLES: all
class apache::mod::authnz_ldap (
Boolean $verify_server_cert = true,
$package_name = undef,
) {
include ::apache
include '::apache::mod::ldap'
include apache
include 'apache::mod::ldap'
::apache::mod { 'authnz_ldap':
package => $package_name,
}
@@ -14,12 +23,11 @@ class apache::mod::authnz_ldap (
# - $verify_server_cert
file { 'authnz_ldap.conf':
ensure => file,
path => "${::apache::mod_dir}/authnz_ldap.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/authnz_ldap.conf",
mode => $apache::file_mode,
content => template('apache/mod/authnz_ldap.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}
# lint:endignore

View File

@@ -1,4 +1,9 @@
# @summary
# Installs `mod_authnz_pam`.
#
# @see https://www.adelton.com/apache/mod_authnz_pam for additional documentation.
#
class apache::mod::authnz_pam {
include ::apache
include apache
::apache::mod { 'authnz_pam': }
}

View File

@@ -1,5 +1,13 @@
class apache::mod::authz_default(
$apache_version = $::apache::apache_version
# @summary
# Installs and configures `mod_authz_default`.
#
# @param apache_version
# Version of Apache to install module on.
#
# @see https://httpd.apache.org/docs/current/mod/mod_authz_default.html for additional documentation.
#
class apache::mod::authz_default (
$apache_version = $apache::apache_version
) {
if versioncmp($apache_version, '2.4') >= 0 {
warning('apache::mod::authz_default has been removed in Apache 2.4')

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_authz_user`
#
# @see https://httpd.apache.org/docs/current/mod/mod_authz_user.html for additional documentation.
#
class apache::mod::authz_user {
::apache::mod { 'authz_user': }
}

View File

@@ -1,14 +1,31 @@
class apache::mod::autoindex {
include ::apache
# @summary
# Installs `mod_autoindex`
#
# @see https://httpd.apache.org/docs/current/mod/mod_autoindex.html for additional documentation.
#
class apache::mod::autoindex (
$icons_prefix = $apache::params::icons_prefix
) inherits ::apache::params {
include apache
::apache::mod { 'autoindex': }
# Template uses no variables
# Determine icon filename suffix for autoindex.conf.erb
case $::operatingsystem {
'Debian', 'Ubuntu': {
$icon_suffix = '-20x22'
}
default: {
$icon_suffix = ''
}
}
file { 'autoindex.conf':
ensure => file,
path => "${::apache::mod_dir}/autoindex.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/autoindex.conf",
mode => $apache::file_mode,
content => template('apache/mod/autoindex.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_cache`
#
# @see https://httpd.apache.org/docs/current/mod/mod_cache.html for additional documentation.
#
class apache::mod::cache {
::apache::mod { 'cache': }
}

View File

@@ -1,9 +1,19 @@
# @summary
# Installs `mod_cgi`.
#
# @see https://httpd.apache.org/docs/current/mod/mod_cgi.html for additional documentation.
#
class apache::mod::cgi {
include apache
case $::osfamily {
'FreeBSD': {}
default: {
if $::apache::mpm_module =~ /^(itk|peruser|prefork)$/ {
Class["::apache::mod::${::apache::mpm_module}"] -> Class['::apache::mod::cgi']
if defined(Class['::apache::mod::itk']) {
Class['::apache::mod::itk'] -> Class['::apache::mod::cgi']
} elsif defined(Class['::apache::mod::peruser']) {
Class['::apache::mod::peruser'] -> Class['::apache::mod::cgi']
} else {
Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
}
}
}
@@ -15,5 +25,4 @@ class apache::mod::cgi {
} else {
::apache::mod { 'cgi': }
}
}

View File

@@ -1,5 +1,10 @@
# @summary
# Installs `mod_cgid`.
#
# @see https://httpd.apache.org/docs/current/mod/mod_cgid.html
#
class apache::mod::cgid {
include ::apache
include apache
case $::osfamily {
'FreeBSD': {}
default: {
@@ -31,11 +36,11 @@ class apache::mod::cgid {
# Template uses $cgisock_path
file { 'cgid.conf':
ensure => file,
path => "${::apache::mod_dir}/cgid.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/cgid.conf",
mode => $apache::file_mode,
content => template('apache/mod/cgid.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,3 +1,53 @@
# @summary
# Installs `mod_cluster`.
#
# @param allowed_network
# Balanced members network.
#
# @param balancer_name
# Name of balancer.
#
# @param ip
# Specifies the IP address to listen to.
#
# @param version
# Specifies the mod_cluster version. Version 1.3.0 or greater is required for httpd 2.4.
#
# @param enable_mcpm_receive
# Whether MCPM should be enabled.
#
# @param port
# mod_cluster listen port.
#
# @param keep_alive_timeout
# Specifies how long Apache should wait for a request, in seconds.
#
# @param manager_allowed_network
# Whether to allow the network to access the mod_cluster_manager.
#
# @param max_keep_alive_requests
# Maximum number of requests kept alive.
#
# @param server_advertise
# Whether the server should advertise.
#
# @param advertise_frequency
# Sets the interval between advertise messages in seconds.
#
# @example
# class { '::apache::mod::cluster':
# ip => '172.17.0.1',
# allowed_network => '172.17.0.',
# balancer_name => 'mycluster',
# version => '1.3.1'
# }
#
# @note
# There is no official package available for mod_cluster, so you must make it available outside of the apache module.
# Binaries can be found [here](https://modcluster.io/).
#
# @see https://modcluster.io/ for additional documentation.
#
class apache::mod::cluster (
$allowed_network,
$balancer_name,
@@ -11,8 +61,7 @@ class apache::mod::cluster (
$server_advertise = true,
$advertise_frequency = undef,
) {
include ::apache
include apache
::apache::mod { 'proxy': }
::apache::mod { 'proxy_ajp': }
@@ -26,14 +75,13 @@ class apache::mod::cluster (
::apache::mod { 'slotmem': }
}
file {'cluster.conf':
file { 'cluster.conf':
ensure => file,
path => "${::apache::mod_dir}/cluster.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/cluster.conf",
mode => $apache::file_mode,
content => template('apache/mod/cluster.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -0,0 +1,18 @@
# @summary
# Installs and configures `mod_data`.
#
# @param apache_version
# Version of Apache to install module on.
#
# @see https://httpd.apache.org/docs/current/mod/mod_data.html for additional documentation.
#
class apache::mod::data (
$apache_version = undef,
) {
include apache
$_apache_version = pick($apache_version, $apache::apache_version)
if versioncmp($_apache_version, '2.3') < 0 {
fail('mod_data is only available in Apache 2.3 and later')
}
::apache::mod { 'data': }
}

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_dav`.
#
# @see https://httpd.apache.org/docs/current/mod/mod_dav.html for additional documentation.
#
class apache::mod::dav {
::apache::mod { 'dav': }
}

View File

@@ -1,5 +1,10 @@
# @summary
# Installs `mod_dav_fs`.
#
# @see https://httpd.apache.org/docs/current/mod/mod_dav_fs.html for additional documentation.
#
class apache::mod::dav_fs {
include ::apache
include apache
$dav_lock = $::osfamily ? {
'debian' => "\${APACHE_LOCK_DIR}/DAVLock",
'freebsd' => '/usr/local/var/DavLock',
@@ -12,11 +17,11 @@ class apache::mod::dav_fs {
# Template uses: $dav_lock
file { 'dav_fs.conf':
ensure => file,
path => "${::apache::mod_dir}/dav_fs.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/dav_fs.conf",
mode => $apache::file_mode,
content => template('apache/mod/dav_fs.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,10 +1,18 @@
# @summary
# Installs and configures `mod_dav_svn`.
#
# @param authz_svn_enabled
# Specifies whether to install Apache mod_authz_svn
#
# @see https://httpd.apache.org/docs/current/mod/mod_dav_svn.html for additional documentation.
#
class apache::mod::dav_svn (
$authz_svn_enabled = false,
) {
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
include ::apache
include ::apache::mod::dav
if($::operatingsystem == 'SLES' and $::operatingsystemmajrelease < '12'){
include apache
include apache::mod::dav
if($::operatingsystem == 'SLES' and versioncmp($::operatingsystemmajrelease, '12') < 0) {
package { 'subversion-server':
ensure => 'installed',
provider => 'zypper',
@@ -13,15 +21,11 @@ class apache::mod::dav_svn (
::apache::mod { 'dav_svn': }
if $::osfamily == 'Debian' and ($::operatingsystemmajrelease != '6' and $::operatingsystemmajrelease != '10.04' and $::operatingsystemrelease != '10.04' and $::operatingsystemmajrelease != '16.04') {
$loadfile_name = undef
} else {
$loadfile_name = 'dav_svn_authz_svn.load'
}
if $authz_svn_enabled {
::apache::mod { 'authz_svn':
loadfile_name => $loadfile_name,
# authz_svn depends on symbols from the dav_svn module,
# therefore, make sure authz_svn is loaded after dav_svn.
loadfile_name => 'dav_svn_authz_svn.load',
require => Apache::Mod['dav_svn'],
}
}

View File

@@ -1,3 +1,11 @@
# @summary
# Installs `mod_dbd`.
#
# @param apache_version
# Used to verify that the Apache version you have requested is compatible with the module.
#
# @see https://httpd.apache.org/docs/current/mod/mod_dbd.html for additional documentation.
#
class apache::mod::dbd {
::apache::mod { 'dbd': }
}

View File

@@ -1,3 +1,14 @@
# @summary
# Installs and configures `mod_deflate`.
#
# @param types
# An array of MIME types to be deflated. See https://www.iana.org/assignments/media-types/media-types.xhtml.
#
# @param notes
# A Hash where the key represents the type and the value represents the note name.
#
# @see https://httpd.apache.org/docs/current/mod/mod_deflate.html for additional documentation.
#
class apache::mod::deflate (
$types = [
'text/html text/plain text/xml',
@@ -12,16 +23,16 @@ class apache::mod::deflate (
'Ratio' => 'ratio',
}
) {
include ::apache
include apache
::apache::mod { 'deflate': }
file { 'deflate.conf':
ensure => file,
path => "${::apache::mod_dir}/deflate.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/deflate.conf",
mode => $apache::file_mode,
content => template('apache/mod/deflate.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,5 +1,11 @@
# @summary
# Installs `mod_dev`.
#
# @note
# This module is deprecated. Please use `apache::dev`.
#
class apache::mod::dev {
# Development packages are not apache modules
warning('apache::mod::dev is deprecated; please use apache::dev')
include ::apache::dev
include apache::dev
}

View File

@@ -1,23 +1,34 @@
# Note: this sets the global DirectoryIndex directive, it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration
# Parameters:
# - $indexes provides a string for the DirectoryIndex directive http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
# @summary
# Installs and configures `mod_dir`.
#
# @param types
# Specifies the text-based content types to compress.
#
# @param indexes
# Provides a string for the DirectoryIndex directive
#
# @todo
# This sets the global DirectoryIndex directive, so it may be necessary to consider being able to modify the apache::vhost to declare
# DirectoryIndex statements in a vhost configuration
#
# @see https://httpd.apache.org/docs/current/mod/mod_dir.html for additional documentation.
#
class apache::mod::dir (
$dir = 'public_html',
Array[String] $indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
) {
include ::apache
include apache
::apache::mod { 'dir': }
# Template uses
# - $indexes
file { 'dir.conf':
ensure => file,
path => "${::apache::mod_dir}/dir.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/dir.conf",
mode => $apache::file_mode,
content => template('apache/mod/dir.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,11 +1,37 @@
# @summary
# Installs and configures `mod_disk_cache`.
#
# @param cache_root
# Defines the name of the directory on the disk to contain cache files.
# Default depends on the Apache version and operating system:
# - Debian: /var/cache/apache2/mod_cache_disk
# - FreeBSD: /var/cache/mod_cache_disk
# - Red Hat, Apache 2.4: /var/cache/httpd/proxy
# - Red Hat, Apache 2.2: /var/cache/mod_proxy
#
# @param cache_ignore_headers
# Specifies HTTP header(s) that should not be stored in the cache.
#
# @param default_cache_enable
# Default value is true, which enables "CacheEnable disk /" in disk_cache.conf for the webserver. This would cache
# every request to apache by default for every vhost. If set to false the default cache all behaviour is supressed.
# You can then control this behaviour in individual vhosts by explicitly defining CacheEnable.
#
# @note
# Apache 2.2, mod_disk_cache installed. On Apache 2.4, mod_cache_disk installed.
#
# @see https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html for additional documentation.
#
class apache::mod::disk_cache (
$cache_root = undef,
$cache_root = undef,
$cache_ignore_headers = undef,
Boolean $default_cache_enable = true,
) {
include ::apache
include apache
if $cache_root {
$_cache_root = $cache_root
}
elsif versioncmp($::apache::apache_version, '2.4') >= 0 {
elsif versioncmp($apache::apache_version, '2.4') >= 0 {
$_cache_root = $::osfamily ? {
'debian' => '/var/cache/apache2/mod_cache_disk',
'redhat' => '/var/cache/httpd/proxy',
@@ -20,7 +46,7 @@ class apache::mod::disk_cache (
}
}
if versioncmp($::apache::apache_version, '2.4') >= 0 {
if versioncmp($apache::apache_version, '2.4') >= 0 {
apache::mod { 'cache_disk': }
}
else {
@@ -32,11 +58,11 @@ class apache::mod::disk_cache (
# Template uses $_cache_root
file { 'disk_cache.conf':
ensure => file,
path => "${::apache::mod_dir}/disk_cache.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/disk_cache.conf",
mode => $apache::file_mode,
content => template('apache/mod/disk_cache.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,18 +1,38 @@
class apache::mod::dumpio(
# @summary
# Installs and configures `mod_dumpio`.
#
# @param dump_io_input
# Dump all input data to the error log
#
# @param dump_io_output
# Dump all output data to the error log
#
# @example
# class{'apache':
# default_mods => false,
# log_level => 'dumpio:trace7',
# }
# class{'apache::mod::dumpio':
# dump_io_input => 'On',
# dump_io_output => 'Off',
# }
#
# @see https://httpd.apache.org/docs/current/mod/mod_dumpio.html for additional documentation.
#
class apache::mod::dumpio (
Enum['Off', 'On', 'off', 'on'] $dump_io_input = 'Off',
Enum['Off', 'On', 'off', 'on'] $dump_io_output = 'Off',
) {
include ::apache
include apache
::apache::mod { 'dumpio': }
file{'dumpio.conf':
file { 'dumpio.conf':
ensure => file,
path => "${::apache::mod_dir}/dumpio.conf",
mode => $::apache::file_mode,
path => "${apache::mod_dir}/dumpio.conf",
mode => $apache::file_mode,
content => template('apache/mod/dumpio.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}

View File

@@ -1,3 +1,8 @@
# @summary
# Installs `mod_env`.
#
# @see https://httpd.apache.org/docs/current/mod/mod_env.html for additional documentation.
#
class apache::mod::env {
::apache::mod { 'env': }
}

View File

@@ -1,3 +1,51 @@
# @summary
# Installs and configures `mod_event`.
#
# @param startservers
# Sets the number of child server processes created at startup, via the module's `StartServers` directive. Setting this to `false`
# removes the parameter.
#
# @param maxclients
# Apache 2.3.12 or older alias for the `MaxRequestWorkers` directive.
#
# @param maxrequestworkers
# Sets the maximum number of connections Apache can simultaneously process, via the module's `MaxRequestWorkers` directive. Setting
# these to `false` removes the parameters.
#
# @param minsparethreads
# Sets the minimum number of idle threads, via the `MinSpareThreads` directive. Setting this to `false` removes the parameters.
#
# @param maxsparethreads
# Sets the maximum number of idle threads, via the `MaxSpareThreads` directive. Setting this to `false` removes the parameters.
#
# @param threadsperchild
# Number of threads created by each child process.
#
# @param maxrequestsperchild
# Apache 2.3.8 or older alias for the `MaxConnectionsPerChild` directive.
#
# @param maxconnectionsperchild
# Limit on the number of connections that an individual child server will handle during its life.
#
# @param serverlimit
# Limits the configurable number of processes via the `ServerLimit` directive. Setting this to `false` removes the parameter.
#
# @param apache_version
# Version of Apache to install module on.
#
# @param threadlimit
# Limits the number of event threads via the module's `ThreadLimit` directive. Setting this to `false` removes the parameter.
#
# @param listenbacklog
# Sets the maximum length of the pending connections queue via the module's `ListenBackLog` directive. Setting this to `false` removes
# the parameter.
#
# @note
# You cannot include apache::mod::event with apache::mod::itk, apache::mod::peruser, apache::mod::prefork, or
# apache::mod::worker on the same server.
#
# @see https://httpd.apache.org/docs/current/mod/event.html for additional documentation.
# @note Unsupported platforms: SLES: all
class apache::mod::event (
$startservers = '2',
$maxclients = '150',
@@ -12,7 +60,7 @@ class apache::mod::event (
$threadlimit = '64',
$listenbacklog = '511',
) {
include ::apache
include apache
$_apache_version = pick($apache_version, $apache::apache_version)
@@ -30,8 +78,8 @@ class apache::mod::event (
}
File {
owner => 'root',
group => $::apache::params::root_group,
mode => $::apache::file_mode,
group => $apache::params::root_group,
mode => $apache::file_mode,
}
# Template uses:
@@ -42,25 +90,25 @@ class apache::mod::event (
# - $threadsperchild
# - $maxrequestsperchild
# - $serverlimit
file { "${::apache::mod_dir}/event.conf":
file { "${apache::mod_dir}/event.conf":
ensure => file,
mode => $::apache::file_mode,
mode => $apache::file_mode,
content => template('apache/mod/event.conf.erb'),
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
case $::osfamily {
'redhat': {
if versioncmp($_apache_version, '2.4') >= 0 {
apache::mpm{ 'event':
apache::mpm { 'event':
apache_version => $_apache_version,
}
}
}
'debian','freebsd' : {
apache::mpm{ 'event':
apache::mpm { 'event':
apache_version => $_apache_version,
}
}

Some files were not shown because too many files have changed in this diff Show More