diff --git a/Vagrantfile b/Vagrantfile index 77c8287f..7d6767a7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,264 +1,21 @@ -require 'yaml' - -dir = File.dirname(File.expand_path(__FILE__)) - -configValues = YAML.load_file("#{dir}/puphpet/config.yaml") -data = configValues['vagrantfile-local'] - -Vagrant.require_version '>= 1.6.0' - -Vagrant.configure('2') do |config| - config.vm.box = "#{data['vm']['box']}" - config.vm.box_url = "#{data['vm']['box_url']}" - - if data['vm']['hostname'].to_s.strip.length != 0 - config.vm.hostname = "#{data['vm']['hostname']}" - end - - if data['vm']['network']['private_network'].to_s != '' - config.vm.network 'private_network', ip: "#{data['vm']['network']['private_network']}" - end - - data['vm']['network']['forwarded_port'].each do |i, port| - if port['guest'] != '' && port['host'] != '' - config.vm.network :forwarded_port, guest: port['guest'].to_i, host: port['host'].to_i - end - end - - if !data['vm']['post_up_message'].nil? - config.vm.post_up_message = "#{data['vm']['post_up_message']}" - end - - if Vagrant.has_plugin?('vagrant-hostmanager') - hosts = Array.new() - - if !configValues['apache']['install'].nil? && - configValues['apache']['install'].to_i == 1 && - configValues['apache']['vhosts'].is_a?(Hash) - configValues['apache']['vhosts'].each do |i, vhost| - hosts.push(vhost['servername']) - - if vhost['serveraliases'].is_a?(Array) - vhost['serveraliases'].each do |vhost_alias| - hosts.push(vhost_alias) - end - end - end - elsif !configValues['nginx']['install'].nil? && - configValues['nginx']['install'].to_i == 1 && - configValues['nginx']['vhosts'].is_a?(Hash) - configValues['nginx']['vhosts'].each do |i, vhost| - hosts.push(vhost['server_name']) - - if vhost['server_aliases'].is_a?(Array) - vhost['server_aliases'].each do |x, vhost_alias| - hosts.push(vhost_alias) - end - end - end - end - - if hosts.any? - if config.vm.hostname.to_s.strip.length == 0 - config.vm.hostname = 'puphpet-dev-machine' - end - - config.hostmanager.enabled = true - config.hostmanager.manage_host = true - config.hostmanager.ignore_private_ip = false - config.hostmanager.include_offline = false - config.hostmanager.aliases = hosts - end - end - - if Vagrant.has_plugin?('vagrant-cachier') - config.cache.scope = :box - end - - data['vm']['synced_folder'].each do |i, folder| - if folder['source'] != '' && folder['target'] != '' - sync_owner = !folder['sync_owner'].nil? ? folder['sync_owner'] : 'www-data' - sync_group = !folder['sync_group'].nil? ? folder['sync_group'] : 'www-data' - - if folder['sync_type'] == 'nfs' - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: 'nfs' - elsif folder['sync_type'] == 'smb' - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: 'smb' - elsif folder['sync_type'] == 'rsync' - rsync_args = !folder['rsync']['args'].nil? ? folder['rsync']['args'] : ['--verbose', '--archive', '-z'] - rsync_auto = !folder['rsync']['auto'].nil? ? folder['rsync']['auto'] : true - rsync_exclude = !folder['rsync']['exclude'].nil? ? folder['rsync']['exclude'] : ['.vagrant/'] - - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", - rsync__args: rsync_args, rsync__exclude: rsync_exclude, rsync__auto: rsync_auto, type: 'rsync', group: sync_group, owner: sync_owner - elsif data['vm']['chosen_provider'] == 'parallels' - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", - group: sync_group, owner: sync_owner, mount_options: ['share'] - else - config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", - group: sync_group, owner: sync_owner, mount_options: ['dmode=775', 'fmode=764'] - end - end - end - - config.vm.usable_port_range = (data['vm']['usable_port_range']['start'].to_i..data['vm']['usable_port_range']['stop'].to_i) - - if data['vm']['chosen_provider'].empty? || data['vm']['chosen_provider'] == 'virtualbox' - ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' - - config.vm.provider :virtualbox do |virtualbox| - data['vm']['provider']['virtualbox']['modifyvm'].each do |key, value| - if key == 'memory' - next - end - if key == 'cpus' - next - end - - if key == 'natdnshostresolver1' - value = value ? 'on' : 'off' - end - - virtualbox.customize ['modifyvm', :id, "--#{key}", "#{value}"] - end - - virtualbox.customize ['modifyvm', :id, '--memory', "#{data['vm']['memory']}"] - virtualbox.customize ['modifyvm', :id, '--cpus', "#{data['vm']['cpus']}"] - - if data['vm']['provider']['virtualbox']['modifyvm']['name'].nil? || - data['vm']['provider']['virtualbox']['modifyvm']['name'].empty? - if data['vm']['hostname'].to_s.strip.length != 0 - virtualbox.customize ['modifyvm', :id, '--name', config.vm.hostname] - end - end - end - end - - if data['vm']['chosen_provider'] == 'vmware_fusion' || data['vm']['chosen_provider'] == 'vmware_workstation' - ENV['VAGRANT_DEFAULT_PROVIDER'] = (data['vm']['chosen_provider'] == 'vmware_fusion') ? 'vmware_fusion' : 'vmware_workstation' - - config.vm.provider :vmware_fusion do |v, override| - data['vm']['provider']['vmware'].each do |key, value| - if key == 'memsize' - next - end - if key == 'cpus' - next - end - - v.vmx["#{key}"] = "#{value}" - end - - v.vmx['memsize'] = "#{data['vm']['memory']}" - v.vmx['numvcpus'] = "#{data['vm']['cpus']}" - - if data['vm']['provider']['vmware']['displayName'].nil? || - data['vm']['provider']['vmware']['displayName'].empty? - if data['vm']['hostname'].to_s.strip.length != 0 - v.vmx['displayName'] = config.vm.hostname - end - end - end - end - - if data['vm']['chosen_provider'] == 'parallels' - ENV['VAGRANT_DEFAULT_PROVIDER'] = 'parallels' - - config.vm.provider 'parallels' do |v| - data['vm']['provider']['parallels'].each do |key, value| - if key == 'memsize' - next - end - if key == 'cpus' - next - end - - v.customize ['set', :id, "--#{key}", "#{value}"] - end - - v.memory = "#{data['vm']['memory']}" - v.cpus = "#{data['vm']['cpus']}" - - if data['vm']['provider']['parallels']['name'].nil? || - data['vm']['provider']['parallels']['name'].empty? - if data['vm']['hostname'].to_s.strip.length != 0 - v.name = config.vm.hostname - end - end - end - end - - ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : 'vagrant' - - config.vm.provision 'shell' do |s| - s.path = 'puphpet/shell/initial-setup.sh' - s.args = '/vagrant/puphpet' - end - config.vm.provision 'shell' do |kg| - kg.path = 'puphpet/shell/ssh-keygen.sh' - kg.args = "#{ssh_username}" - end - config.vm.provision :shell, :path => 'puphpet/shell/install-ruby.sh' - config.vm.provision :shell, :path => 'puphpet/shell/install-puppet.sh' - - config.vm.provision :puppet do |puppet| - puppet.facter = { - 'ssh_username' => "#{ssh_username}", - 'provisioner_type' => ENV['VAGRANT_DEFAULT_PROVIDER'], - 'vm_target_key' => 'vagrantfile-local', - } - puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}" - puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}" - puppet.module_path = "#{data['vm']['provision']['puppet']['module_path']}" - - if !data['vm']['provision']['puppet']['options'].empty? - puppet.options = data['vm']['provision']['puppet']['options'] - end - end - - config.vm.provision :shell do |s| - s.path = 'puphpet/shell/execute-files.sh' - s.args = ['exec-once', 'exec-always'] - end - config.vm.provision :shell, run: 'always' do |s| - s.path = 'puphpet/shell/execute-files.sh' - s.args = ['startup-once', 'startup-always'] - end - config.vm.provision :shell, :path => 'puphpet/shell/important-notices.sh' - - if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa") - config.ssh.private_key_path = [ - "#{dir}/puphpet/files/dot/ssh/id_rsa", - "#{dir}/puphpet/files/dot/ssh/insecure_private_key" - ] - end - - if !data['ssh']['host'].nil? - config.ssh.host = "#{data['ssh']['host']}" - end - if !data['ssh']['port'].nil? - config.ssh.port = "#{data['ssh']['port']}" - end - if !data['ssh']['username'].nil? - config.ssh.username = "#{data['ssh']['username']}" - end - if !data['ssh']['guest_port'].nil? - config.ssh.guest_port = data['ssh']['guest_port'] - end - if !data['ssh']['shell'].nil? - config.ssh.shell = "#{data['ssh']['shell']}" - end - if !data['ssh']['keep_alive'].nil? - config.ssh.keep_alive = data['ssh']['keep_alive'] - end - if !data['ssh']['forward_agent'].nil? - config.ssh.forward_agent = data['ssh']['forward_agent'] - end - if !data['ssh']['forward_x11'].nil? - config.ssh.forward_x11 = data['ssh']['forward_x11'] - end - if !data['vagrant']['host'].nil? - config.vagrant.host = data['vagrant']['host'].gsub(':', '').intern +# -*- mode: ruby -*- +# vi: set ft=ruby : + +ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' +Vagrant.configure("2") do |config| + ##### VM definition ##### + config.vm.define "phpservermon-dev" do |config| + config.vm.hostname = "phpservermon-dev" + config.vm.box = "bento/ubuntu-20.04" + config.vm.box_check_update = false + config.vm.network "private_network", ip: "192.168.50.100" + config.vm.provision :ansible do |ansible| + ansible.limit = "all" + ansible.playbook = "provision.yaml" + end + config.vm.provider "virtualbox" do |vb| + vb.memory = "2048" + vb.cpus = "2" end end - +end diff --git a/dev/config.php b/dev/config.php new file mode 100644 index 00000000..86082d12 --- /dev/null +++ b/dev/config.php @@ -0,0 +1,11 @@ + -# Distributed under the GNU General Public License, version 2.0. -# -# This script allows you to see repository status in your prompt. -# -# To enable: -# -# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). -# 2) Add the following line to your .bashrc/.zshrc: -# source ~/.git-prompt.sh -# 3a) Change your PS1 to call __git_ps1 as -# command-substitution: -# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' -# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ ' -# the optional argument will be used as format string. -# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can -# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh -# with two parameters,
 and , which are strings
-#        you would put in $PS1 before and after the status string
-#        generated by the git-prompt machinery.  e.g.
-#        Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
-#          will show username, at-sign, host, colon, cwd, then
-#          various status string, followed by dollar and SP, as
-#          your prompt.
-#        ZSH:  precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
-#          will show username, pipe, then various status string,
-#          followed by colon, cwd, dollar and SP, as your prompt.
-#        Optionally, you can supply a third argument with a printf
-#        format string to finetune the output of the branch status
-#
-# The repository status will be displayed only if you are currently in a
-# git repository. The %s token is the placeholder for the shown status.
-#
-# The prompt status always includes the current branch name.
-#
-# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
-# unstaged (*) and staged (+) changes will be shown next to the branch
-# name.  You can configure this per-repository with the
-# bash.showDirtyState variable, which defaults to true once
-# GIT_PS1_SHOWDIRTYSTATE is enabled.
-#
-# You can also see if currently something is stashed, by setting
-# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
-# then a '$' will be shown next to the branch name.
-#
-# If you would like to see if there're untracked files, then you can set
-# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
-# files, then a '%' will be shown next to the branch name.  You can
-# configure this per-repository with the bash.showUntrackedFiles
-# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
-# enabled.
-#
-# If you would like to see the difference between HEAD and its upstream,
-# set GIT_PS1_SHOWUPSTREAM="auto".  A "<" indicates you are behind, ">"
-# indicates you are ahead, "<>" indicates you have diverged and "="
-# indicates that there is no difference. You can further control
-# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
-# of values:
-#
-#     verbose       show number of commits ahead/behind (+/-) upstream
-#     name          if verbose, then also show the upstream abbrev name
-#     legacy        don't use the '--count' option available in recent
-#                   versions of git-rev-list
-#     git           always compare HEAD to @{upstream}
-#     svn           always compare HEAD to your SVN upstream
-#
-# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
-# find one, or @{upstream} otherwise.  Once you have set
-# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
-# setting the bash.showUpstream config variable.
-#
-# If you would like to see more information about the identity of
-# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
-# to one of these values:
-#
-#     contains      relative to newer annotated tag (v1.6.3.2~35)
-#     branch        relative to newer tag or branch (master~4)
-#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
-#     default       exactly matching tag
-#
-# If you would like a colored hint about the current dirty state, set
-# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
-# the colored output of "git status -sb" and are available only when
-# using __git_ps1 for PROMPT_COMMAND or precmd.
-
-# check whether printf supports -v
-__git_printf_supports_v=
-printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
-
-# stores the divergence from upstream in $p
-# used by GIT_PS1_SHOWUPSTREAM
-__git_ps1_show_upstream ()
-{
-	local key value
-	local svn_remote svn_url_pattern count n
-	local upstream=git legacy="" verbose="" name=""
-
-	svn_remote=()
-	# get some config options from git-config
-	local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
-	while read -r key value; do
-		case "$key" in
-		bash.showupstream)
-			GIT_PS1_SHOWUPSTREAM="$value"
-			if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
-				p=""
-				return
-			fi
-			;;
-		svn-remote.*.url)
-			svn_remote[$((${#svn_remote[@]} + 1))]="$value"
-			svn_url_pattern="$svn_url_pattern\\|$value"
-			upstream=svn+git # default upstream is SVN if available, else git
-			;;
-		esac
-	done <<< "$output"
-
-	# parse configuration values
-	for option in ${GIT_PS1_SHOWUPSTREAM}; do
-		case "$option" in
-		git|svn) upstream="$option" ;;
-		verbose) verbose=1 ;;
-		legacy)  legacy=1  ;;
-		name)    name=1 ;;
-		esac
-	done
-
-	# Find our upstream
-	case "$upstream" in
-	git)    upstream="@{upstream}" ;;
-	svn*)
-		# get the upstream from the "git-svn-id: ..." in a commit message
-		# (git-svn uses essentially the same procedure internally)
-		local -a svn_upstream
-		svn_upstream=($(git log --first-parent -1 \
-					--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
-		if [[ 0 -ne ${#svn_upstream[@]} ]]; then
-			svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
-			svn_upstream=${svn_upstream%@*}
-			local n_stop="${#svn_remote[@]}"
-			for ((n=1; n <= n_stop; n++)); do
-				svn_upstream=${svn_upstream#${svn_remote[$n]}}
-			done
-
-			if [[ -z "$svn_upstream" ]]; then
-				# default branch name for checkouts with no layout:
-				upstream=${GIT_SVN_ID:-git-svn}
-			else
-				upstream=${svn_upstream#/}
-			fi
-		elif [[ "svn+git" = "$upstream" ]]; then
-			upstream="@{upstream}"
-		fi
-		;;
-	esac
-
-	# Find how many commits we are ahead/behind our upstream
-	if [[ -z "$legacy" ]]; then
-		count="$(git rev-list --count --left-right \
-				"$upstream"...HEAD 2>/dev/null)"
-	else
-		# produce equivalent output to --count for older versions of git
-		local commits
-		if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
-		then
-			local commit behind=0 ahead=0
-			for commit in $commits
-			do
-				case "$commit" in
-				"<"*) ((behind++)) ;;
-				*)    ((ahead++))  ;;
-				esac
-			done
-			count="$behind	$ahead"
-		else
-			count=""
-		fi
-	fi
-
-	# calculate the result
-	if [[ -z "$verbose" ]]; then
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p="=" ;;
-		"0	"*) # ahead of upstream
-			p=">" ;;
-		*"	0") # behind upstream
-			p="<" ;;
-		*)	    # diverged from upstream
-			p="<>" ;;
-		esac
-	else
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p=" u=" ;;
-		"0	"*) # ahead of upstream
-			p=" u+${count#0	}" ;;
-		*"	0") # behind upstream
-			p=" u-${count%	0}" ;;
-		*)	    # diverged from upstream
-			p=" u+${count#*	}-${count%	*}" ;;
-		esac
-		if [[ -n "$count" && -n "$name" ]]; then
-			__git_ps1_upstream_name=$(git rev-parse \
-				--abbrev-ref "$upstream" 2>/dev/null)
-			if [ $pcmode = yes ]; then
-				# see the comments around the
-				# __git_ps1_branch_name variable below
-				p="$p \${__git_ps1_upstream_name}"
-			else
-				p="$p ${__git_ps1_upstream_name}"
-				# not needed anymore; keep user's
-				# environment clean
-				unset __git_ps1_upstream_name
-			fi
-		fi
-	fi
-
-}
-
-# Helper function that is meant to be called from __git_ps1.  It
-# injects color codes into the appropriate gitstring variables used
-# to build a gitstring.
-__git_ps1_colorize_gitstring ()
-{
-	if [[ -n ${ZSH_VERSION-} ]]; then
-		local c_red='%F{red}'
-		local c_green='%F{green}'
-		local c_lblue='%F{blue}'
-		local c_clear='%f'
-	else
-		# Using \[ and \] around colors is necessary to prevent
-		# issues with command line editing/browsing/completion!
-		local c_red='\[\e[31m\]'
-		local c_green='\[\e[32m\]'
-		local c_lblue='\[\e[1;34m\]'
-		local c_clear='\[\e[0m\]'
-	fi
-	local bad_color=$c_red
-	local ok_color=$c_green
-	local flags_color="$c_lblue"
-
-	local branch_color=""
-	if [ $detached = no ]; then
-		branch_color="$ok_color"
-	else
-		branch_color="$bad_color"
-	fi
-	c="$branch_color$c"
-
-	z="$c_clear$z"
-	if [ "$w" = "*" ]; then
-		w="$bad_color$w"
-	fi
-	if [ -n "$i" ]; then
-		i="$ok_color$i"
-	fi
-	if [ -n "$s" ]; then
-		s="$flags_color$s"
-	fi
-	if [ -n "$u" ]; then
-		u="$bad_color$u"
-	fi
-	r="$c_clear$r"
-}
-
-__git_eread ()
-{
-	f="$1"
-	shift
-	test -r "$f" && read "$@" <"$f"
-}
-
-# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
-# when called from PS1 using command substitution
-# in this mode it prints text to add to bash PS1 prompt (includes branch name)
-#
-# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
-# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
-# when two arguments are given, the first is prepended and the second appended
-# to the state string when assigned to PS1.
-# The optional third parameter will be used as printf format string to further
-# customize the output of the git-status string.
-# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
-__git_ps1 ()
-{
-	local pcmode=no
-	local detached=no
-	local ps1pc_start='\u@\h:\w '
-	local ps1pc_end='\$ '
-	local printf_format=' (%s)'
-
-	case "$#" in
-		2|3)	pcmode=yes
-			ps1pc_start="$1"
-			ps1pc_end="$2"
-			printf_format="${3:-$printf_format}"
-		;;
-		0|1)	printf_format="${1:-$printf_format}"
-		;;
-		*)	return
-		;;
-	esac
-
-	local repo_info rev_parse_exit_code
-	repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
-		--is-bare-repository --is-inside-work-tree \
-		--short HEAD 2>/dev/null)"
-	rev_parse_exit_code="$?"
-
-	if [ -z "$repo_info" ]; then
-		if [ $pcmode = yes ]; then
-			#In PC mode PS1 always needs to be set
-			PS1="$ps1pc_start$ps1pc_end"
-		fi
-		return
-	fi
-
-	local short_sha
-	if [ "$rev_parse_exit_code" = "0" ]; then
-		short_sha="${repo_info##*$'\n'}"
-		repo_info="${repo_info%$'\n'*}"
-	fi
-	local inside_worktree="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local bare_repo="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local inside_gitdir="${repo_info##*$'\n'}"
-	local g="${repo_info%$'\n'*}"
-
-	local r=""
-	local b=""
-	local step=""
-	local total=""
-	if [ -d "$g/rebase-merge" ]; then
-		__git_eread "$g/rebase-merge/head-name" b
-		__git_eread "$g/rebase-merge/msgnum" step
-		__git_eread "$g/rebase-merge/end" total
-		if [ -f "$g/rebase-merge/interactive" ]; then
-			r="|REBASE-i"
-		else
-			r="|REBASE-m"
-		fi
-	else
-		if [ -d "$g/rebase-apply" ]; then
-			__git_eread "$g/rebase-apply/next" step
-			__git_eread "$g/rebase-apply/last" total
-			if [ -f "$g/rebase-apply/rebasing" ]; then
-				__git_eread "$g/rebase-apply/head-name" b
-				r="|REBASE"
-			elif [ -f "$g/rebase-apply/applying" ]; then
-				r="|AM"
-			else
-				r="|AM/REBASE"
-			fi
-		elif [ -f "$g/MERGE_HEAD" ]; then
-			r="|MERGING"
-		elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
-			r="|CHERRY-PICKING"
-		elif [ -f "$g/REVERT_HEAD" ]; then
-			r="|REVERTING"
-		elif [ -f "$g/BISECT_LOG" ]; then
-			r="|BISECTING"
-		fi
-
-		if [ -n "$b" ]; then
-			:
-		elif [ -h "$g/HEAD" ]; then
-			# symlink symbolic ref
-			b="$(git symbolic-ref HEAD 2>/dev/null)"
-		else
-			local head=""
-			if ! __git_eread "$g/HEAD" head; then
-				if [ $pcmode = yes ]; then
-					PS1="$ps1pc_start$ps1pc_end"
-				fi
-				return
-			fi
-			# is it a symbolic ref?
-			b="${head#ref: }"
-			if [ "$head" = "$b" ]; then
-				detached=yes
-				b="$(
-				case "${GIT_PS1_DESCRIBE_STYLE-}" in
-				(contains)
-					git describe --contains HEAD ;;
-				(branch)
-					git describe --contains --all HEAD ;;
-				(describe)
-					git describe HEAD ;;
-				(* | default)
-					git describe --tags --exact-match HEAD ;;
-				esac 2>/dev/null)" ||
-
-				b="$short_sha..."
-				b="($b)"
-			fi
-		fi
-	fi
-
-	if [ -n "$step" ] && [ -n "$total" ]; then
-		r="$r $step/$total"
-	fi
-
-	local w=""
-	local i=""
-	local s=""
-	local u=""
-	local c=""
-	local p=""
-
-	if [ "true" = "$inside_gitdir" ]; then
-		if [ "true" = "$bare_repo" ]; then
-			c="BARE:"
-		else
-			b="GIT_DIR!"
-		fi
-	elif [ "true" = "$inside_worktree" ]; then
-		if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
-		   [ "$(git config --bool bash.showDirtyState)" != "false" ]
-		then
-			git diff --no-ext-diff --quiet --exit-code || w="*"
-			if [ -n "$short_sha" ]; then
-				git diff-index --cached --quiet HEAD -- || i="+"
-			else
-				i="#"
-			fi
-		fi
-		if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
-		   [ -r "$g/refs/stash" ]; then
-			s="$"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
-		   [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
-		   git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
-		then
-			u="%${ZSH_VERSION+%}"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
-			__git_ps1_show_upstream
-		fi
-	fi
-
-	local z="${GIT_PS1_STATESEPARATOR-" "}"
-
-	# NO color option unless in PROMPT_COMMAND mode
-	if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
-		__git_ps1_colorize_gitstring
-	fi
-
-	b=${b##refs/heads/}
-	if [ $pcmode = yes ]; then
-		# In pcmode (and only pcmode) the contents of
-		# $gitstring are subject to expansion by the shell.
-		# Avoid putting the raw ref name in the prompt to
-		# protect the user from arbitrary code execution via
-		# specially crafted ref names (e.g., a ref named
-		# '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute
-		# 'sudo rm -rf /' when the prompt is drawn).  Instead,
-		# put the ref name in a new global variable (in the
-		# __git_ps1_* namespace to avoid colliding with the
-		# user's environment) and reference that variable from
-		# PS1.
-		__git_ps1_branch_name=$b
-		# note that the $ is escaped -- the variable will be
-		# expanded later (when it's time to draw the prompt)
-		b="\${__git_ps1_branch_name}"
-	fi
-
-	local f="$w$i$s$u"
-	local gitstring="$c$b${f:+$z$f}$r$p"
-
-	if [ $pcmode = yes ]; then
-		if [ "${__git_printf_supports_v-}" != yes ]; then
-			gitstring=$(printf -- "$printf_format" "$gitstring")
-		else
-			printf -v gitstring -- "$printf_format" "$gitstring"
-		fi
-		PS1="$ps1pc_start$gitstring$ps1pc_end"
-	else
-		printf -- "$printf_format" "$gitstring"
-	fi
-}
diff --git a/puphpet/files/dot/.vimrc b/puphpet/files/dot/.vimrc
deleted file mode 100644
index 2ff1aa60..00000000
--- a/puphpet/files/dot/.vimrc
+++ /dev/null
@@ -1,414 +0,0 @@
-set rtp+=$GOROOT/misc/vim
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Maintainer:
-"       Amir Salihefendic
-"       http://amix.dk - amix@amix.dk
-"
-" Version:
-"       5.0 - 29/05/12 15:43:36
-"
-" Blog_post:
-"       http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
-"
-" Awesome_version:
-"       Get this config, nice color schemes and lots of plugins!
-"
-"       Install the awesome version from:
-"
-"           https://github.com/amix/vimrc
-"
-" Syntax_highlighted:
-"       http://amix.dk/vim/vimrc.html
-"
-" Raw_version:
-"       http://amix.dk/vim/vimrc.txt
-"
-" Sections:
-"    -> General
-"    -> VIM user interface
-"    -> Colors and Fonts
-"    -> Files and backups
-"    -> Text, tab and indent related
-"    -> Visual mode related
-"    -> Moving around, tabs and buffers
-"    -> Status line
-"    -> Editing mappings
-"    -> vimgrep searching and cope displaying
-"    -> Spell checking
-"    -> Misc
-"    -> Helper functions
-"
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => General
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Sets how many lines of history VIM has to remember
-set history=700
-
-" Enable filetype plugins
-filetype plugin on
-filetype indent on
-
-" Set to auto read when a file is changed from the outside
-set autoread
-
-" With a map leader it's possible to do extra key combinations
-" like w saves the current file
-let mapleader = ","
-let g:mapleader = ","
-
-" Fast saving
-nmap w :w!
-
-" :W sudo saves the file
-" (useful for handling the permission-denied error)
-command W w !sudo tee % > /dev/null
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => VIM user interface
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Set 7 lines to the cursor - when moving vertically using j/k
-set so=7
-
-" Turn on the WiLd menu
-set wildmenu
-
-" Ignore compiled files
-set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
-    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-else
-    set wildignore+=.git\*,.hg\*,.svn\*
-endif
-
-"Always show current position
-set ruler
-
-" Height of the command bar
-set cmdheight=2
-
-" A buffer becomes hidden when it is abandoned
-set hid
-
-" Configure backspace so it acts as it should act
-set backspace=eol,start,indent
-set whichwrap+=<,>,h,l
-
-" Ignore case when searching
-set ignorecase
-
-" When searching try to be smart about cases
-set smartcase
-
-" Highlight search results
-set hlsearch
-
-" Makes search act like search in modern browsers
-set incsearch
-
-" Don't redraw while executing macros (good performance config)
-set lazyredraw
-
-" For regular expressions turn magic on
-set magic
-
-" Show matching brackets when text indicator is over them
-set showmatch
-" How many tenths of a second to blink when matching brackets
-set mat=2
-
-" No annoying sound on errors
-set noerrorbells
-set novisualbell
-set t_vb=
-set tm=500
-
-" Add a bit extra margin to the left
-set foldcolumn=1
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Colors and Fonts
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Enable syntax highlighting
-syntax enable
-
-try
-    colorscheme desert
-catch
-endtry
-
-set background=dark
-
-" Set extra options when running in GUI mode
-if has("gui_running")
-    set guioptions-=T
-    set guioptions-=e
-    set t_Co=256
-    set guitablabel=%M\ %t
-endif
-
-" Set utf8 as standard encoding and en_US as the standard language
-set encoding=utf8
-
-" Use Unix as the standard file type
-set ffs=unix,dos,mac
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Files, backups and undo
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Turn backup off, since most stuff is in SVN, git et.c anyway...
-set nobackup
-set nowb
-set noswapfile
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Text, tab and indent related
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Use spaces instead of tabs
-set expandtab
-
-" Be smart when using tabs ;)
-set smarttab
-
-" 1 tab == 4 spaces
-set shiftwidth=4
-set tabstop=4
-
-" Linebreak on 500 characters
-set lbr
-set tw=500
-
-set ai "Auto indent
-set si "Smart indent
-set wrap "Wrap lines
-
-
-""""""""""""""""""""""""""""""
-" => Visual mode related
-""""""""""""""""""""""""""""""
-" Visual mode pressing * or # searches for the current selection
-" Super useful! From an idea by Michael Naumann
-vnoremap  * :call VisualSelection('f', '')
-vnoremap  # :call VisualSelection('b', '')
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Moving around, tabs, windows and buffers
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Treat long lines as break lines (useful when moving around in them)
-map j gj
-map k gk
-
-" Map  to / (search) and Ctrl- to ? (backwards search)
-map  /
-map  ?
-
-" Disable highlight when  is pressed
-map   :noh
-
-" Smart way to move between windows
-map  j
-map  k
-map  h
-map  l
-
-" Close the current buffer
-map bd :Bclose
-
-" Close all the buffers
-map ba :1,1000 bd!
-
-" Useful mappings for managing tabs
-map tn :tabnew
-map to :tabonly
-map tc :tabclose
-map tm :tabmove
-map t :tabnext
-
-" Opens a new tab with the current buffer's path
-" Super useful when editing files in the same directory
-map te :tabedit =expand("%:p:h")/
-
-" Switch CWD to the directory of the open buffer
-map cd :cd %:p:h:pwd
-
-" Specify the behavior when switching between buffers
-try
-  set switchbuf=useopen,usetab,newtab
-  set stal=2
-catch
-endtry
-
-" Return to last edit position when opening files (You want this!)
-autocmd BufReadPost *
-     \ if line("'\"") > 0 && line("'\"") <= line("$") |
-     \   exe "normal! g`\"" |
-     \ endif
-" Remember info about open buffers on close
-set viminfo^=%
-
-
-""""""""""""""""""""""""""""""
-" => Status line
-""""""""""""""""""""""""""""""
-" Always show the status line
-set laststatus=2
-
-" Format the status line
-set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Editing mappings
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remap VIM 0 to first non-blank character
-map 0 ^
-
-" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
-nmap  mz:m+`z
-nmap  mz:m-2`z
-vmap  :m'>+`mzgv`yo`z
-vmap  :m'<-2`>my` 
-  nmap  
-  vmap  
-  vmap  
-endif
-
-" Delete trailing white space on save, useful for Python and CoffeeScript ;)
-func! DeleteTrailingWS()
-  exe "normal mz"
-  %s/\s\+$//ge
-  exe "normal `z"
-endfunc
-autocmd BufWrite *.py :call DeleteTrailingWS()
-autocmd BufWrite *.coffee :call DeleteTrailingWS()
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => vimgrep searching and cope displaying
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" When you press gv you vimgrep after the selected text
-vnoremap  gv :call VisualSelection('gv', '')
-
-" Open vimgrep and put the cursor in the right position
-map g :vimgrep // **/*.
-
-" Vimgreps in the current file
-map  :vimgrep // %
-
-" When you press r you can search and replace the selected text
-vnoremap  r :call VisualSelection('replace', '')
-
-" Do :help cope if you are unsure what cope is. It's super useful!
-"
-" When you search with vimgrep, display your results in cope by doing:
-"   cc
-"
-" To go to the next search result do:
-"   n
-"
-" To go to the previous search results do:
-"   p
-"
-map cc :botright cope
-map co ggVGy:tabnew:set syntax=qfpgg
-map n :cn
-map p :cp
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Spell checking
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Pressing ,ss will toggle and untoggle spell checking
-map ss :setlocal spell!
-
-" Shortcuts using 
-map sn ]s
-map sp [s
-map sa zg
-map s? z=
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Misc
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remove the Windows ^M - when the encodings gets messed up
-noremap m mmHmt:%s///ge'tzt'm
-
-" Quickly open a buffer for scripbble
-map q :e ~/buffer
-
-" Toggle paste mode on and off
-map pp :setlocal paste!
-
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Helper functions
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-function! CmdLine(str)
-    exe "menu Foo.Bar :" . a:str
-    emenu Foo.Bar
-    unmenu Foo
-endfunction
-
-function! VisualSelection(direction, extra_filter) range
-    let l:saved_reg = @"
-    execute "normal! vgvy"
-
-    let l:pattern = escape(@", '\\/.*$^~[]')
-    let l:pattern = substitute(l:pattern, "\n$", "", "")
-
-    if a:direction == 'b'
-        execute "normal ?" . l:pattern . "^M"
-    elseif a:direction == 'gv'
-        call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
-    elseif a:direction == 'replace'
-        call CmdLine("%s" . '/'. l:pattern . '/')
-    elseif a:direction == 'f'
-        execute "normal /" . l:pattern . "^M"
-    endif
-
-    let @/ = l:pattern
-    let @" = l:saved_reg
-endfunction
-
-
-" Returns true if paste mode is enabled
-function! HasPaste()
-    if &paste
-        return 'PASTE MODE  '
-    en
-    return ''
-endfunction
-
-" Don't close window, when deleting a buffer
-command! Bclose call BufcloseCloseIt()
-function! BufcloseCloseIt()
-   let l:currentBufNum = bufnr("%")
-   let l:alternateBufNum = bufnr("#")
-
-   if buflisted(l:alternateBufNum)
-     buffer #
-   else
-     bnext
-   endif
-
-   if bufnr("%") == l:currentBufNum
-     new
-   endif
-
-   if buflisted(l:currentBufNum)
-     execute("bdelete! ".l:currentBufNum)
-   endif
-endfunction
diff --git a/puphpet/files/dot/ssh/insecure_private_key b/puphpet/files/dot/ssh/insecure_private_key
deleted file mode 100644
index 7d6a0839..00000000
--- a/puphpet/files/dot/ssh/insecure_private_key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
-w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
-kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
-hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
-Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
-yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
-ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
-Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
-TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
-iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
-sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
-4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
-cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
-EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
-CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
-3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
-YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
-3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
-dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
-6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
-P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
-llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
-kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
-+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
-NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
------END RSA PRIVATE KEY-----
diff --git a/puphpet/files/exec-always/empty b/puphpet/files/exec-always/empty
deleted file mode 100644
index e69de29b..00000000
diff --git a/puphpet/files/exec-once/psminstall.sh b/puphpet/files/exec-once/psminstall.sh
deleted file mode 100644
index 055e04d1..00000000
--- a/puphpet/files/exec-once/psminstall.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-cd /var/www/default/psm && make install
-echo "" > /var/www/default/psm/config.php
-
-echo "" > /var/www/default/index.php
diff --git a/puphpet/files/startup-always/empty b/puphpet/files/startup-always/empty
deleted file mode 100644
index e69de29b..00000000
diff --git a/puphpet/files/startup-once/empty b/puphpet/files/startup-once/empty
deleted file mode 100644
index e69de29b..00000000
diff --git a/puphpet/puppet/Puppetfile b/puphpet/puppet/Puppetfile
deleted file mode 100644
index 1c5d059a..00000000
--- a/puphpet/puppet/Puppetfile
+++ /dev/null
@@ -1,88 +0,0 @@
-forge "https://forgeapi.puppetlabs.com"
-
-mod 'puppetlabs/apache',
-    :git => 'https://github.com/puphpet/puppetlabs-apache.git',
-    :ref => 'f12483b'
-mod 'puppetlabs/apt',
-    :git => 'https://github.com/puppetlabs/puppetlabs-apt.git',
-    :ref => '1.4.2'
-mod 'puphpet/beanstalkd',
-    :git => 'https://github.com/puphpet/puppet-beanstalkd.git',
-    :ref => '5a530ff'
-mod 'tPl0ch/composer',
-    :git => 'https://github.com/tPl0ch/puppet-composer.git',
-    :ref => '1.2.1'
-mod 'puppetlabs/concat',
-    :git => 'https://github.com/puppetlabs/puppetlabs-concat.git',
-    :ref => '1.1.0'
-mod 'elasticsearch/elasticsearch',
-    :git => 'https://github.com/puphpet/puppet-elasticsearch.git',
-    :ref => '0.2.2'
-mod 'garethr/erlang',
-    :git => 'https://github.com/garethr/garethr-erlang.git',
-    :ref => '91d8ec73c3'
-mod 'puppetlabs/firewall',
-    :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git',
-    :ref => '1.1.1'
-mod 'puppetlabs/java',
-    :git => 'https://github.com/puppetlabs/puppetlabs-java.git',
-    :ref => '1.2.0'
-mod 'actionjack/mailcatcher',
-    :git => 'https://github.com/puphpet/puppet-mailcatcher.git',
-    :ref => 'dcc8c3d357'
-mod 'puppetlabs/mongodb',
-    :git => 'https://github.com/puppetlabs/puppetlabs-mongodb.git',
-    :ref => '0.8.0'
-mod 'puppetlabs/mysql',
-    :git => 'https://github.com/puppetlabs/puppetlabs-mysql.git',
-    :ref => '2.3.1'
-mod 'jfryman/nginx',
-    :git => 'https://github.com/jfryman/puppet-nginx.git',
-    :ref => 'v0.0.10'
-mod 'puppetlabs/ntp',
-    :git => 'https://github.com/puppetlabs/puppetlabs-ntp.git',
-    :ref => '3.0.4'
-mod 'puphpet/php',
-    :git => 'https://github.com/puphpet/puppet-php.git',
-    :ref => 'a1dad7828d'
-mod 'puppetlabs/postgresql',
-    :git => 'https://github.com/puppetlabs/puppetlabs-postgresql.git',
-    :ref => '3.3.3'
-mod 'puphpet/puphpet',
-    :git => 'https://github.com/puphpet/puppet-puphpet.git',
-    :ref => 'c2d5fdf'
-mod 'example42/puppi',
-    :git => 'https://github.com/example42/puppi.git',
-    :ref => 'v2.1.9'
-mod 'daenney/pyenv',
-    :git => 'https://github.com/puphpet/puppet-pyenv.git',
-    :ref => '062ae72'
-mod 'puppetlabs/rabbitmq',
-    :git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq.git',
-    :ref => '5ce33f4968'
-mod 'puphpet/redis',
-    :git => 'https://github.com/puphpet/puppet-redis.git',
-    :ref => 'd9b3b23b0c'
-mod 'maestrodev/rvm'
-mod 'puppetlabs/sqlite',
-    :git => 'https://github.com/puppetlabs/puppetlabs-sqlite.git',
-    :ref => 'v0.0.1'
-mod 'example42/solr',
-    :git => 'https://github.com/example42/puppet-solr.git',
-    :ref => 'v2.0.7'
-mod 'petems/swap_file',
-    :git => 'https://github.com/petems/puppet-swap_file.git',
-    :ref => '39582afda5'
-mod 'nanliu/staging',
-    :git => 'https://github.com/nanliu/puppet-staging.git',
-    :ref => '0.4.0'
-mod 'ajcrowe/supervisord',
-    :git => 'https://github.com/puphpet/puppet-supervisord.git',
-    :ref => '17643f1'
-mod 'puppetlabs/stdlib'
-mod 'puppetlabs/vcsrepo',
-    :git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo.git',
-    :ref => '0.2.0'
-mod 'example42/yum',
-    :git => 'https://github.com/example42/puppet-yum.git',
-    :ref => 'v2.1.10'
diff --git a/puphpet/puppet/Puppetfile.lock b/puphpet/puppet/Puppetfile.lock
deleted file mode 100644
index 389a3010..00000000
--- a/puphpet/puppet/Puppetfile.lock
+++ /dev/null
@@ -1,275 +0,0 @@
-FORGE
-  remote: https://forgeapi.puppetlabs.com
-  specs:
-    example42-monitor (2.0.1)
-      example42-puppi (>= 2.0.0)
-    maestrodev-rvm (1.7.1)
-      puppetlabs-stdlib (>= 3.2.0)
-    puppetlabs-git (0.3.0)
-      puppetlabs-vcsrepo (>= 0.1.0)
-    puppetlabs-stdlib (4.4.0)
-    stahnma-epel (1.0.0)
-    thias-sysctl (0.3.0)
-
-GIT
-  remote: https://github.com/example42/puppet-solr.git
-  ref: v2.0.7
-  sha: dd1a31391d6565c39c360124201e4ff8beeee62a
-  specs:
-    example42-solr (2.0.6)
-      example42-monitor (>= 2.0.0)
-      example42-puppi (>= 2.0.0)
-      puppetlabs-stdlib (>= 2.0.0)
-
-GIT
-  remote: https://github.com/example42/puppet-yum.git
-  ref: v2.1.10
-  sha: 1592a98614ae343328b8f627039db3316f0cf000
-  specs:
-    example42-yum (2.1.9)
-      example42-puppi (>= 2.0.0)
-
-GIT
-  remote: https://github.com/example42/puppi.git
-  ref: v2.1.9
-  sha: 620883d691931a54c1f2bf75b0679ea56fd7820c
-  specs:
-    example42-puppi (2.1.8)
-
-GIT
-  remote: https://github.com/garethr/garethr-erlang.git
-  ref: 91d8ec73c3
-  sha: 91d8ec73c321f818da1fcfda8364a39aed444ac5
-  specs:
-    garethr-erlang (0.3.0)
-      puppetlabs-apt (>= 0)
-      puppetlabs-stdlib (>= 0)
-      stahnma-epel (>= 0)
-
-GIT
-  remote: https://github.com/jfryman/puppet-nginx.git
-  ref: v0.0.10
-  sha: 3427ab91609d753446ab8fcfde4ff25cd9c5c290
-  specs:
-    jfryman-nginx (0.0.10)
-      puppetlabs-apt (>= 1.0.0)
-      puppetlabs-concat (>= 1.1.0)
-      puppetlabs-stdlib (>= 3.0.0)
-
-GIT
-  remote: https://github.com/nanliu/puppet-staging.git
-  ref: 0.4.0
-  sha: 9cb98720f3f268feec52a0f7cb38625cbc959a05
-  specs:
-    nanliu-staging (0.4.0)
-
-GIT
-  remote: https://github.com/petems/puppet-swap_file.git
-  ref: 39582afda5
-  sha: 39582afda5fc98982977cf595883d90d63886d80
-  specs:
-    petems-swap_file (0.1.3)
-      puppetlabs-stdlib (>= 3.2.0)
-
-GIT
-  remote: https://github.com/puphpet/puppet-beanstalkd.git
-  ref: 5a530ff
-  sha: 5a530ffec1f3fd79a1c0bdc8ba2201c33d86f4ab
-  specs:
-    puphpet-beanstalkd (0.0.1)
-
-GIT
-  remote: https://github.com/puphpet/puppet-elasticsearch.git
-  ref: 0.2.2
-  sha: b8a47db04e2edb4916448f09032042e8b53ec6e4
-  specs:
-    elasticsearch-elasticsearch (0.2.2)
-      puppetlabs-stdlib (>= 3.0.0)
-
-GIT
-  remote: https://github.com/puphpet/puppet-mailcatcher.git
-  ref: dcc8c3d357
-  sha: dcc8c3d357353e07b4a4ef5fb984ff9019992d38
-  specs:
-    actionjack-mailcatcher (0.1.5)
-      puppetlabs-stdlib (>= 2.2.1)
-
-GIT
-  remote: https://github.com/puphpet/puppet-php.git
-  ref: a1dad7828d
-  sha: a1dad7828d997bbd97db32883baef6003ac1c33e
-  specs:
-    puphpet-php (2.0.17)
-      example42-puppi (>= 2.0.0)
-
-GIT
-  remote: https://github.com/puphpet/puppet-puphpet.git
-  ref: c2d5fdf
-  sha: c2d5fdfe53495edcc45af18a9214c7d23f93b8d4
-  specs:
-    puphpet-puphpet (1.0)
-
-GIT
-  remote: https://github.com/puphpet/puppet-pyenv.git
-  ref: 062ae72
-  sha: 062ae728ae0ddcb76d6d60c3c268fc13b022106e
-  specs:
-    daenney-pyenv (3.0.3)
-      puppetlabs-stdlib (>= 0.1.6)
-
-GIT
-  remote: https://github.com/puphpet/puppet-redis.git
-  ref: d9b3b23b0c
-  sha: d9b3b23b0c74d51fb8a4e06067c8766d4868bad8
-  specs:
-    puphpet-redis (0.0.11)
-      thias-sysctl (= 0.3.0)
-
-GIT
-  remote: https://github.com/puphpet/puppet-supervisord.git
-  ref: 17643f1
-  sha: 17643f10c2322bfab349108e02b7f5a9992dbdde
-  specs:
-    ajcrowe-supervisord (0.4.1)
-      puppetlabs-concat (< 2.0.0, >= 1.0.0)
-      puppetlabs-stdlib (>= 4.1.0)
-
-GIT
-  remote: https://github.com/puphpet/puppetlabs-apache.git
-  ref: f12483b
-  sha: f12483b9aed2428211577c39b5a6aeaa1d7f9070
-  specs:
-    puppetlabs-apache (1.1.1)
-      puppetlabs-concat (>= 1.0.0)
-      puppetlabs-stdlib (>= 2.4.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-apt.git
-  ref: 1.4.2
-  sha: 7cc875aadc6460b8ca635c38078dcd824c0bc877
-  specs:
-    puppetlabs-apt (1.4.1)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-concat.git
-  ref: 1.1.0
-  sha: a50226b4ec5d6f2ba0df9e4f8a31df3e1160ff89
-  specs:
-    puppetlabs-concat (1.1.0)
-      puppetlabs-stdlib (>= 4.0.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-firewall.git
-  ref: 1.1.1
-  sha: 6eab758b4689dc7612be3ed037d028f81597beb8
-  specs:
-    puppetlabs-firewall (1.1.1)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-java.git
-  ref: 1.2.0
-  sha: 92bd03eec3679f8b0c77da55928bf9c3750c67f6
-  specs:
-    puppetlabs-java (1.2.0)
-      puppetlabs-stdlib (>= 2.4.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-mongodb.git
-  ref: 0.8.0
-  sha: de93beb8c2cee6b981e7f181ce10b51c60577e98
-  specs:
-    puppetlabs-mongodb (0.8.0)
-      puppetlabs-apt (>= 1.0.0)
-      puppetlabs-stdlib (>= 2.2.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-mysql.git
-  ref: 2.3.1
-  sha: c0f4372df06e89d416be68465c7d11ede645f692
-  specs:
-    puppetlabs-mysql (2.3.1)
-      puppetlabs-stdlib (>= 3.2.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-ntp.git
-  ref: 3.0.4
-  sha: 7cfa3fda5028b693553a27f0e55ce2b9a2a919ae
-  specs:
-    puppetlabs-ntp (3.0.4)
-      puppetlabs-stdlib (>= 0.1.6)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-postgresql.git
-  ref: 3.3.3
-  sha: f2b4e4d8b181b7f674235076aaab2b759d9d71df
-  specs:
-    puppetlabs-postgresql (3.3.3)
-      puppetlabs-apt (< 2.0.0, >= 1.1.0)
-      puppetlabs-concat (< 2.0.0, >= 1.0.0)
-      puppetlabs-firewall (>= 0.0.4)
-      puppetlabs-stdlib (< 5.0.0, >= 3.2.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-rabbitmq.git
-  ref: 5ce33f4968
-  sha: 5ce33f4968c05a9b447024eca0fa0d9648d4046e
-  specs:
-    puppetlabs-rabbitmq (4.0.0)
-      nanliu-staging (>= 0.3.1)
-      puppetlabs-apt (>= 1.0.0)
-      puppetlabs-stdlib (>= 2.0.0)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-sqlite.git
-  ref: v0.0.1
-  sha: 8957339fc7a9d8c89843d99a30e8ac00ac294beb
-  specs:
-    puppetlabs-sqlite (0.0.1)
-
-GIT
-  remote: https://github.com/puppetlabs/puppetlabs-vcsrepo.git
-  ref: 0.2.0
-  sha: f2f1a82d72ec8afb50c32206abeaa32923ee410b
-  specs:
-    puppetlabs-vcsrepo (0.2.0)
-
-GIT
-  remote: https://github.com/tPl0ch/puppet-composer.git
-  ref: 1.2.1
-  sha: 75b79cde1ca4d586ca95aae97769342bb441fdd9
-  specs:
-    tPl0ch-composer (1.2.1)
-      puppetlabs-git (>= 0.0.2)
-
-DEPENDENCIES
-  actionjack-mailcatcher (>= 0)
-  ajcrowe-supervisord (>= 0)
-  daenney-pyenv (>= 0)
-  elasticsearch-elasticsearch (>= 0)
-  example42-puppi (>= 0)
-  example42-solr (>= 0)
-  example42-yum (>= 0)
-  garethr-erlang (>= 0)
-  jfryman-nginx (>= 0)
-  maestrodev-rvm (>= 0)
-  nanliu-staging (>= 0)
-  petems-swap_file (>= 0)
-  puphpet-beanstalkd (>= 0)
-  puphpet-php (>= 0)
-  puphpet-puphpet (>= 0)
-  puphpet-redis (>= 0)
-  puppetlabs-apache (>= 0)
-  puppetlabs-apt (>= 0)
-  puppetlabs-concat (>= 0)
-  puppetlabs-firewall (>= 0)
-  puppetlabs-java (>= 0)
-  puppetlabs-mongodb (>= 0)
-  puppetlabs-mysql (>= 0)
-  puppetlabs-ntp (>= 0)
-  puppetlabs-postgresql (>= 0)
-  puppetlabs-rabbitmq (>= 0)
-  puppetlabs-sqlite (>= 0)
-  puppetlabs-stdlib (>= 0)
-  puppetlabs-vcsrepo (>= 0)
-  tPl0ch-composer (>= 0)
-
diff --git a/puphpet/puppet/hiera.yaml b/puphpet/puppet/hiera.yaml
deleted file mode 100644
index 0cde1f6a..00000000
--- a/puphpet/puppet/hiera.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-:backends: yaml
-:yaml:
-    :datadir: '/vagrant/puphpet'
-:hierarchy:
-    - config
-:logger: console
diff --git a/puphpet/puppet/modules/apache/.fixtures.yml b/puphpet/puppet/modules/apache/.fixtures.yml
deleted file mode 100644
index b5f76c03..00000000
--- a/puphpet/puppet/modules/apache/.fixtures.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-fixtures:
-  repositories:
-    stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
-    concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
-  symlinks:
-    apache: "#{source_dir}"
diff --git a/puphpet/puppet/modules/apache/.nodeset.yml b/puphpet/puppet/modules/apache/.nodeset.yml
deleted file mode 100644
index 767f9cd2..00000000
--- a/puphpet/puppet/modules/apache/.nodeset.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-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'
diff --git a/puphpet/puppet/modules/apache/.puppet-lint.rc b/puphpet/puppet/modules/apache/.puppet-lint.rc
deleted file mode 100644
index df733ca8..00000000
--- a/puphpet/puppet/modules/apache/.puppet-lint.rc
+++ /dev/null
@@ -1,5 +0,0 @@
---no-single_quote_string_with_variables-check
---no-80chars-check
---no-class_inherits_from_params_class-check
---no-class_parameter_defaults-check
---no-documentation-check
diff --git a/puphpet/puppet/modules/apache/.sync.yml b/puphpet/puppet/modules/apache/.sync.yml
deleted file mode 100644
index 96d3c2bd..00000000
--- a/puphpet/puppet/modules/apache/.sync.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-.travis.yml:
-  extras:
-  - rvm: 1.9.3
-    env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-  - rvm: 2.0.0
-    env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-Rakefile:
-  extra_disabled_lint_checks:
-  - 'disable_only_variable_string'
-spec/spec_helper.rb:
-  unmanaged: true
diff --git a/puphpet/puppet/modules/apache/.travis.yml b/puphpet/puppet/modules/apache/.travis.yml
deleted file mode 100644
index 86222c28..00000000
--- a/puphpet/puppet/modules/apache/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-language: ruby
-bundler_args: --without development
-script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
-matrix:
-  fast_finish: true
-  include:
-  - rvm: 1.8.7
-    env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-  - rvm: 1.8.7
-    env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-  - rvm: 1.9.3
-    env: PUPPET_GEM_VERSION="~> 3.0"
-  - rvm: 2.0.0
-    env: PUPPET_GEM_VERSION="~> 3.0"
-  - rvm: 1.9.3
-    env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-  - rvm: 2.0.0
-    env: PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-notifications:
-  email: false
diff --git a/puphpet/puppet/modules/apache/CHANGELOG.md b/puphpet/puppet/modules/apache/CHANGELOG.md
deleted file mode 100644
index b598fdd2..00000000
--- a/puphpet/puppet/modules/apache/CHANGELOG.md
+++ /dev/null
@@ -1,287 +0,0 @@
-##2014-07-15 - Supported Release 1.1.1
-###Summary
-
-This release merely updates metadata.json so the module can be uninstalled and
-upgraded via the puppet module command.
-
-## 2014-04-14 Supported Release 1.1.0
-
-###Summary
-
-This release primarily focuses on extending the httpd 2.4 support, tested
-through adding RHEL7 and Ubuntu 14.04 support.  It also includes Passenger 
-4 support, as well as several new modules and important bugfixes.
-
-####Features
-
-- Add support for RHEL7 and Ubuntu 14.04
-- More complete apache24 support
-- Passenger 4 support
-- Add support for max_keepalive_requests and log_formats parameters
-- Add mod_pagespeed support
-- Add mod_speling support
-- Added several parameters for mod_passenger
-- Added ssl_cipher parameter to apache::mod::ssl
-- Improved examples in documentation
-- Added docroot_mode, action, and suexec_user_group parameters to apache::vhost
-- Add support for custom extensions for mod_php
-- Improve proxy_html support for Debian
-
-####Bugfixes
-
-- Remove NameVirtualHost directive for apache >= 2.4
-- Order proxy_set option so it doesn't change between runs
-- Fix inverted SSL compression
-- Fix missing ensure on concat::fragment resources
-- Fix bad dependencies in apache::mod and apache::mod::mime
-
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
-
-## 2014-03-04 Supported Release 1.0.1
-###Summary
-
-This is a supported release.  This release removes a testing symlink that can
-cause trouble on systems where /var is on a seperate filesystem from the
-modulepath.
-
-####Features
-####Bugfixes
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
- 
-## 2014-03-04 Supported Release 1.0.0
-###Summary
-
-This is a supported release. This release introduces Apache 2.4 support for
-Debian and RHEL based osfamilies.
-
-####Features
-
-- Add apache24 support
-- Add rewrite_base functionality to rewrites
-- Updated README documentation
-- Add WSGIApplicationGroup and WSGIImportScript directives
-
-####Bugfixes
-
-- Replace mutating hashes with merge() for Puppet 3.5
-- Fix WSGI import_script and mod_ssl issues on Lucid
-
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
-
----
-
-## 2014-01-31 Release 0.11.0
-### Summary:
-
-This release adds preliminary support for Windows compatibility and multiple rewrite support.
-
-#### Backwards-incompatible Changes:
-
-- The rewrite_rule parameter is deprecated in favor of the new rewrite parameter
-  and will be removed in a future release.
-
-#### Features:
-
-- add Match directive
-- quote paths for windows compatibility
-- add auth_group_file option to README.md
-- allow AuthGroupFile directive for vhosts
-- Support Header directives in vhost context
-- Don't purge mods-available dir when separate enable dir is used
-- Fix the servername used in log file name
-- Added support for mod_include
-- Remove index parameters.
-- Support environment variable control for CustomLog
-- added redirectmatch support
-- Setting up the ability to do multiple rewrites and conditions.
-- Convert spec tests to beaker.
-- Support php_admin_(flag|value)s
-
-#### Bugfixes:
-
-- directories are either a Hash or an Array of Hashes
-- Configure Passenger in separate .conf file on RH so PassengerRoot isn't lost
-- (docs) Update list of `apache::mod::[name]` classes
-- (docs) Fix apache::namevirtualhost example call style
-- Fix $ports_file reference in apache::listen.
-- Fix $ports_file reference in Namevirtualhost.
-
-
-## 2013-12-05 Release 0.10.0
-### Summary:
-
-This release adds FreeBSD osfamily support and various other improvements to some mods.
-
-#### Features:
-
-- Add suPHP_UserGroup directive to directory context
-- Add support for ScriptAliasMatch directives
-- Set SSLOptions StdEnvVars in server context
-- No implicit  entry for ScriptAlias path
-- Add support for overriding ErrorDocument
-- Add support for AliasMatch directives
-- Disable default "allow from all" in vhost-directories
-- Add WSGIPythonPath as an optional parameter to mod_wsgi. 
-- Add mod_rpaf support
-- Add directives: IndexOptions, IndexOrderDefault
-- Add ability to include additional external configurations in vhost
-- need to use the provider variable not the provider key value from the directory hash for matches
-- Support for FreeBSD and few other features
-- Add new params to apache::mod::mime class
-- Allow apache::mod to specify module id and path
-- added $server_root parameter
-- Add Allow and ExtendedStatus support to mod_status
-- Expand vhost/_directories.pp directive support
-- Add initial support for nss module (no directives in vhost template yet)
-- added peruser and event mpms
-- added $service_name parameter
-- add parameter for TraceEnable
-- Make LogLevel configurable for server and vhost
-- Add documentation about $ip
-- Add ability to pass ip (instead of wildcard) in default vhost files
-
-#### Bugfixes:
-
-- Don't listen on port or set NameVirtualHost for non-existent vhost
-- only apply Directory defaults when provider is a directory
-- Working mod_authnz_ldap support on Debian/Ubuntu
-
-## 2013-09-06 Release 0.9.0
-### Summary:
-This release adds more parameters to the base apache class and apache defined
-resource to make the module more flexible. It also adds or enhances SuPHP,
-WSGI, and Passenger mod support, and support for the ITK mpm module.
-
-#### Backwards-incompatible Changes:
-- Remove many default mods that are not normally needed.
-- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
-- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
-making explicit)
-- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
-defined resource.
-
-#### Features:
-- `apache` class
-  - Add `httpd_dir` parameter to change the location of the configuration
-  files.
-  - Add `logroot` parameter to change the logroot
-  - Add `ports_file` parameter to changes the `ports.conf` file location
-  - Add `keepalive` parameter to enable persistent connections
-  - Add `keepalive_timeout` parameter to change the timeout
-  - Update `default_mods` to be able to take an array of mods to enable.
-- `apache::vhost`
-  - Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
-  `wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
-  WSGI configuration.
-  - Add `access_log_syslog` parameter to enable syslogging.
-  - Add `error_log_syslog` parameter to enable syslogging of errors.
-  - Add `directories` hash parameter. Please see README for documentation.
-  - Add `sslproxyengine` parameter to enable SSLProxyEngine
-  - Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
-  configuring SuPHP.
-  - Add `custom_fragment` parameter to allow for arbitrary apache
-  configuration injection. (Feature pull requests are prefered over using
-  this, but it is available in a pinch.)
-- Add `apache::mod::suphp` class for configuring SuPHP.
-- Add `apache::mod::itk` class for configuring ITK mpm module.
-- Update `apache::mod::wsgi` class for global WSGI configuration with
-`wsgi_socket_prefix` and `wsgi_python_home` parameters.
-- Add README.passenger.md to document the `apache::mod::passenger` usage.
-Added `passenger_high_performance`, `passenger_pool_idle_time`,
-`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
-and `rails_autodetect` parameters.
-- Separate the httpd service resource into a new `apache::service` class for
-dependency chaining of `Class['apache'] ->  ~>
-Class['apache::service']`
-- Added `apache::mod::proxy_balancer` class for `apache::balancer`
-
-#### Bugfixes:
-- Change dependency to puppetlabs-concat
-- Fix ruby 1.9 bug for `a2mod`
-- Change servername to be `$::hostname` if there is no `$::fqdn`
-- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
-- Make `php` the default php package for RedHat non-5.
-- Made `aliases` able to take a single alias hash instead of requiring an
-array.
-
-## 2013-07-26 Release 0.8.1
-#### Bugfixes:
-- Update `apache::mpm_module` detection for worker/prefork
-- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
-worker/prefork
-
-## 2013-07-16 Release 0.8.0
-#### Features:
-- Add `servername` parameter to `apache` class
-- Add `proxy_set` parameter to `apache::balancer` define
-
-#### Bugfixes:
-- Fix ordering for multiple `apache::balancer` clusters
-- Fix symlinking for sites-available on Debian-based OSs
-- Fix dependency ordering for recursive confdir management
-- Fix `apache::mod::*` to notify the service on config change
-- Documentation updates
-
-## 2013-07-09 Release 0.7.0
-#### Changes:
-- Essentially rewrite the module -- too many to list
-- `apache::vhost` has many abilities -- see README.md for details
-- `apache::mod::*` classes provide httpd mod-loading capabilities
-- `apache` base class is much more configurable
-
-#### Bugfixes:
-- Many. And many more to come
-
-## 2013-03-2 Release 0.6.0
-- update travis tests (add more supported versions)
-- add access log_parameter
-- make purging of vhost dir configurable
-
-## 2012-08-24 Release 0.4.0
-#### Changes:
-- `include apache` is now required when using `apache::mod::*`
-
-#### Bugfixes:
-- Fix syntax for validate_re
-- Fix formatting in vhost template
-- Fix spec tests such that they pass
-
-##2012-05-08 Puppet Labs  - 0.0.4
-* e62e362 Fix broken tests for ssl, vhost, vhost::*
-* 42c6363 Changes to match style guide and pass puppet-lint without error
-* 42bc8ba changed name => path for file resources in order to name namevar by it's name
-* 72e13de One end too much
-* 0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
-* 273f94d fix tests
-* a35ede5 (#13860) Make a2enmod/a2dismo commands optional
-* 98d774e (#13860) Autorequire Package['httpd']
-* 05fcec5 (#13073) Add missing puppet spec tests
-* 541afda (#6899) Remove virtual a2mod definition
-* 976cb69 (#13072) Move mod python and wsgi package names to params
-* 323915a (#13060) Add .gitignore to repo
-* fdf40af (#13060) Remove pkg directory from source tree
-* fd90015 Add LICENSE file and update the ModuleFile
-* d3d0d23 Re-enable local php class
-* d7516c7 Make management of firewalls configurable for vhosts
-* 60f83ba Explicitly lookup scope of apache_name in templates.
-* f4d287f (#12581) Add explicit ordering for vdir directory
-* 88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
-* a776a8b (#11071) Fix to work with latest firewall module
-* 2b79e8b (#11070) Add support for Scientific Linux
-* 405b3e9 Fix for a2mod
-* 57b9048 Commit apache::vhost::redirect Manifest
-* 8862d01 Commit apache::vhost::proxy Manifest
-* d5c1fd0 Commit apache::mod::wsgi Manifest
-* a825ac7 Commit apache::mod::python Manifest
-* b77062f Commit Templates
-* 9a51b4a Vhost File Declarations
-* 6cf7312 Defaults for Parameters
-* 6a5b11a Ensure installed
-* f672e46 a2mod fix
-* 8a56ee9 add pthon support to apache
diff --git a/puphpet/puppet/modules/apache/CONTRIBUTING.md b/puphpet/puppet/modules/apache/CONTRIBUTING.md
deleted file mode 100644
index e1288478..00000000
--- a/puphpet/puppet/modules/apache/CONTRIBUTING.md
+++ /dev/null
@@ -1,234 +0,0 @@
-Checklist (and a short version for the impatient)
-=================================================
-
-  * 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:
-
-      - Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
-
-      - Make sure you have a [GitHub account](https://github.com/join)
-
-      - [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) 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.  Sign the Contributor License Agreement
-
-      Before we can accept your changes, we do need a signed Puppet
-      Labs Contributor License Agreement (CLA).
-
-      You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
-
-      If you have any questions about the CLA, please feel free to
-      contact Puppet Labs via email at cla-submissions@puppetlabs.com.
-
-  3.  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.
-
-
-  4.  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
-% 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
-% rake spec_clean
-% 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://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
-
-* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
-
-* [Patchwork](https://patchwork.puppetlabs.com)
-
-* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
-
-* [General GitHub documentation](http://help.github.com/)
-
-* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
-
diff --git a/puphpet/puppet/modules/apache/Gemfile b/puphpet/puppet/modules/apache/Gemfile
deleted file mode 100644
index e960f7c4..00000000
--- a/puphpet/puppet/modules/apache/Gemfile
+++ /dev/null
@@ -1,27 +0,0 @@
-source ENV['GEM_SOURCE'] || "https://rubygems.org"
-
-group :development, :test do
-  gem 'rake',                    :require => false
-  gem 'rspec-puppet',            :require => false
-  gem 'puppetlabs_spec_helper',  :require => false
-  gem 'serverspec',              :require => false
-  gem 'puppet-lint',             :require => false
-  gem 'beaker',                  :require => false
-  gem 'beaker-rspec',            :require => false
-  gem 'pry',                     :require => false
-  gem 'simplecov',               :require => false
-end
-
-if facterversion = ENV['FACTER_GEM_VERSION']
-  gem 'facter', facterversion, :require => false
-else
-  gem 'facter', :require => false
-end
-
-if puppetversion = ENV['PUPPET_GEM_VERSION']
-  gem 'puppet', puppetversion, :require => false
-else
-  gem 'puppet', :require => false
-end
-
-# vim:ft=ruby
diff --git a/puphpet/puppet/modules/apache/LICENSE b/puphpet/puppet/modules/apache/LICENSE
deleted file mode 100644
index 8961ce8a..00000000
--- a/puphpet/puppet/modules/apache/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-Copyright (C) 2012 Puppet Labs Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/puphpet/puppet/modules/apache/README.md b/puphpet/puppet/modules/apache/README.md
deleted file mode 100644
index 26b92e2b..00000000
--- a/puphpet/puppet/modules/apache/README.md
+++ /dev/null
@@ -1,2130 +0,0 @@
-#apache
-
-[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apache)
-
-####Table of Contents
-
-1. [Overview - What is the apache module?](#overview)
-2. [Module Description - What does the module do?](#module-description)
-3. [Setup - The basics of getting started with apache](#setup)
-    * [Beginning with apache - Installation](#beginning-with-apache)
-    * [Configure a virtual host - Basic options for getting started](#configure-a-virtual-host)
-4. [Usage - The classes and defined types available for configuration](#usage)
-    * [Classes and Defined Types](#classes-and-defined-types)
-        * [Class: apache](#class-apache)
-        * [Class: apache::default_mods](#class-apachedefault_mods)
-        * [Defined Type: apache::mod](#defined-type-apachemod)
-        * [Classes: apache::mod::*](#classes-apachemodname)
-        * [Class: apache::mod::info](#class-apachemodinfo)
-        * [Class: apache::mod::pagespeed](#class-apachemodpagespeed)
-        * [Class: apache::mod::php](#class-apachemodphp)
-        * [Class: apache::mod::ssl](#class-apachemodssl)
-        * [Class: apache::mod::wsgi](#class-apachemodwsgi)
-        * [Class: apache::mod::fcgid](#class-apachemodfcgid)
-        * [Class: apache::mod::negotiation](#class-apachemodnegotiation)
-        * [Class: apache::mod::deflate](#class-apachemoddeflate)
-        * [Defined Type: apache::vhost](#defined-type-apachevhost)
-        * [Parameter: `directories` for apache::vhost](#parameter-directories-for-apachevhost)
-        * [SSL parameters for apache::vhost](#ssl-parameters-for-apachevhost)
-        * [Defined Type: apache::fastcgi::server](#defined-type-fastcgi-server)
-    * [Virtual Host Examples - Demonstrations of some configuration options](#virtual-host-examples)
-    * [Load Balancing](#load-balancing)
-        * [Defined Type: apache::balancer](#defined-type-apachebalancer)
-        * [Defined Type: apache::balancermember](#defined-type-apachebalancermember)
-        * [Examples - Load balancing with exported and non-exported resources](#examples)
-5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
-    * [Classes](#classes)
-        * [Public Classes](#public-classes)
-        * [Private Classes](#private-classes)
-    * [Defined Types](#defined-types)
-        * [Public Defined Types](#public-defined-types)
-        * [Private Defined Types](#private-defined-types)
-    * [Templates](#templates)
-6. [Limitations - OS compatibility, etc.](#limitations)
-7. [Development - Guide for contributing to the module](#development)
-    * [Contributing to the apache module](#contributing)
-    * [Running tests - A quick guide](#running-tests)
-
-##Overview
-
-The apache module allows you to set up virtual hosts and manage web services with minimal effort.
-
-##Module Description
-
-Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.
-
-##Setup
-
-**What apache affects:**
-
-* configuration files and directories (created and written to)
-    * **WARNING**: Configurations that are *not* managed by Puppet will be purged.
-* package/service/configuration files for Apache
-* Apache modules
-* virtual hosts
-* listened-to ports
-* `/etc/make.conf` on FreeBSD 
-
-###Beginning with Apache
-
-To install Apache with the default parameters
-
-```puppet
-    class { 'apache':  }
-```
-
-The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, and RedHat systems have another, as do FreeBSD systems). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters
-
-```puppet
-    class { 'apache':
-      default_mods        => false,
-      default_confd_files => false,
-    }
-```
-
-###Configure a virtual host
-
-Declaring the `apache` class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving `$apache::docroot`.
-
-```puppet
-    class { 'apache': }
-```
-
-To configure a very basic, name-based virtual host
-
-```puppet
-    apache::vhost { 'first.example.com':
-      port    => '80',
-      docroot => '/var/www/first',
-    }
-```
-
-*Note:* The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.
-
-A slightly more complicated example, changes the docroot owner/group from the default 'root'
-
-```puppet
-    apache::vhost { 'second.example.com':
-      port          => '80',
-      docroot       => '/var/www/second',
-      docroot_owner => 'third',
-      docroot_group => 'third',
-    }
-```
-
-To set up a virtual host with SSL and default SSL certificates
-
-```puppet
-    apache::vhost { 'ssl.example.com':
-      port    => '443',
-      docroot => '/var/www/ssl',
-      ssl     => true,
-    }
-```
-
-To set up a virtual host with SSL and specific SSL certificates
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port     => '443',
-      docroot  => '/var/www/fourth',
-      ssl      => true,
-      ssl_cert => '/etc/ssl/fourth.example.com.cert',
-      ssl_key  => '/etc/ssl/fourth.example.com.key',
-    }
-```
-
-Virtual hosts listen on '*' by default. To listen on a specific IP address
-
-```puppet
-    apache::vhost { 'subdomain.example.com':
-      ip      => '127.0.0.1',
-      port    => '80',
-      docroot => '/var/www/subdomain',
-    }
-```
-
-To set up a virtual host with a wildcard alias for the subdomain mapped to a same-named directory, for example: `http://example.com.loc` to `/var/www/example.com`
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot  => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_application_group      => '%{GLOBAL}',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options => { 
-        processes    => '2', 
-        threads      => '15', 
-        display-name => '%{GROUP}',
-       },
-      wsgi_import_script          => '/var/www/demo.wsgi',
-      wsgi_import_script_options  =>
-        { process-group => 'wsgi', application-group => '%{GLOBAL}' },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-Starting in Apache 2.2.16, HTTPD supports [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource), a simple replacement for common RewriteRules.
-
-```puppet
-    apache::vhost { 'wordpress.example.com':
-      port                => '80',
-      docroot             => '/var/www/wordpress',
-      fallbackresource    => '/index.php',
-    }
-```
-
-Please note that the 'disabled' argument to FallbackResource is only supported since Apache 2.2.24.
-
-See a list of all [virtual host parameters](#defined-type-apachevhost). See an extensive list of [virtual host examples](#virtual-host-examples).
-
-##Usage
-
-###Classes and Defined Types
-
-This module modifies Apache configuration files and directories, and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-Puppet configuration files can cause unexpected failures.
-
-It is possible to temporarily disable full Puppet management by setting the [`purge_configs`](#purge_configs) parameter within the base `apache` class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations. See the [`purge_configs` parameter](#purge_configs) for more information.
-
-####Class: `apache`
-
-The apache module's primary class, `apache`, guides the basic setup of Apache on your system.
-
-You may establish a default vhost in this class, the `vhost` class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the `vhost` type.
-
-**Parameters within `apache`:**
-
-#####`apache_version`
-
-Configures the behavior of the module templates, package names, and default mods by setting the Apache version. Default is determined by the class `apache::version` using the OS family and release. It should not be configured manually without special reason.
-
-#####`confd_dir`
-
-Changes the location of the configuration directory your custom configuration files are placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`conf_template`
-
-Overrides the template used for the main apache configuration file. Defaults to 'apache/httpd.conf.erb'.
-
-*Note:* Using this parameter is potentially risky, as the module has been built for a minimal configuration file with the configuration primarily coming from conf.d/ entries.
-
-#####`default_confd_files`
-
-Generates default set of include-able Apache configuration files under  `${apache::confd_dir}` directory. These configuration files correspond to what is usually installed with the Apache package on a given platform.
-
-#####`default_mods`
-
-Sets up Apache with default settings based on your OS. Valid values are 'true', 'false', or an array of mod names. 
-
-Defaults to 'true', which will include the default [HTTPD mods](https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/default_mods.pp).
-
-If false, it will only include the mods required to make HTTPD work, and any other mods can be declared on their own.
-
-If an array, the apache module will include the array of mods listed.
-
-#####`default_ssl_ca`
-
-The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_cert`
-
-The default SSL certification, which is automatically set based on your operating system  ('/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_chain`
-
-The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl`
-
-The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl_path`
-
-The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_key`
-
-The default SSL key, which is automatically set based on your operating system ('/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_vhost`
-
-Sets up a default SSL virtual host. Defaults to 'false'. If set to 'true', will set up the following vhost:
-
-```puppet
-    apache::vhost { 'default-ssl':
-      port            => 443,
-      ssl             => true,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => "ssl_${access_log_file}",
-      }
-```
-
-SSL vhosts only respond to HTTPS queries.
-
-#####`default_vhost`
-
-Sets up a default virtual host. Defaults to 'true', set to 'false' to set up [customized virtual hosts](#configure-a-virtual-host).
-
-#####`error_documents`
-
-Enables custom error documents. Defaults to 'false'.
-
-#####`httpd_dir`
-
-Changes the base location of the configuration directories used for the apache service. This is useful for specially repackaged HTTPD builds, but may have unintended consequences when used in combination with the default distribution packages. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`keepalive`
-
-Enables persistent connections.
-
-#####`keepalive_timeout`
-
-Sets the amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.
-
-#####`max_keepalive_requests`
-
-Sets the limit of the number of requests allowed per connection when KeepAlive is on. Defaults to '100'.
-
-#####`loadfile_name`
-
-Sets the file name for the module loadfile. Should be in the format *.load.  This can be used to set the module load order.
-
-#####`log_level`
-
-Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info', or 'debug'.
-
-#####`log_formats`
-
-Define additional [LogFormats](https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat). This is done in a Hash:
-
-```puppet
-  $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' }
-```
-
-#####`logroot`
-
-Changes the directory where Apache log files for the virtual host are placed. Defaults to '/var/log/httpd' on RedHat, '/var/log/apache2' on Debian, and '/var/log/apache22' on FreeBSD.
-
-#####`logroot_mode`
-
-Overrides the mode the logroot directory is set to. Defaults to undef. Do NOT give people write access to the directory the logs are stored
-in without being aware of the consequences; see http://httpd.apache.org/docs/2.4/logs.html#security for details.
-
-#####`manage_group`
-
-Setting this to 'false' will stop the group resource from being created. This is for when you have a group, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established group would result in a duplicate resource error.
-
-#####`manage_user`
-
-Setting this to 'false' will stop the user resource from being created. 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.
-
-#####`mod_dir`
-
-Changes the location of the configuration directory your Apache modules configuration files are placed in. Defaults to '/etc/httpd/conf.d' for RedHat, '/etc/apache2/mods-available' for Debian, and '/usr/local/etc/apache22/Modules' for FreeBSD.
-
-#####`mpm_module`
-
-Determines which MPM is loaded and configured for the HTTPD process. Valid values are 'event', 'itk', 'peruser', 'prefork', 'worker', or 'false'. Defaults to 'prefork' on RedHat and FreeBSD, and 'worker' on Debian. Must be set 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` 
-
-*Note:* Switching between different MPMs on FreeBSD is possible but quite difficult. Before changing `$mpm_module` you must uninstall all packages that depend on your currently-installed Apache. 
-
-#####`package_ensure`
-
-Allows control over the package ensure attribute. Can be 'present','absent', or a version string.
-
-#####`ports_file`
-
-Changes the name of the file containing Apache ports configuration. Default is `${conf_dir}/ports.conf`.
-
-#####`purge_configs`
-
-Removes all other Apache configs and vhosts, defaults to 'true'. Setting this to 'false' is a stopgap measure to allow the apache module to coexist with existing or otherwise-managed configuration. It is recommended that you move your configuration entirely to resources within this module.
-
-#####`purge_vhost_configs`
-
-If `vhost_dir` != `confd_dir`, this controls the removal of any configurations that are not managed by puppet within `vhost_dir`. It defaults to the value of `purge_configs`. Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise unmanaged configurations within `vhost_dir`
-
-#####`sendfile`
-
-Makes Apache use the Linux kernel sendfile to serve static files. Defaults to 'On'.
-
-#####`serveradmin`
-
-Sets the server administrator. Defaults to 'root@localhost'.
-
-#####`servername`
-
-Sets the server name. Defaults to `fqdn` provided by Facter.
-
-#####`server_root`
-
-Sets the root directory in which the server resides. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local' on FreeBSD.
-
-#####`server_signature`
-
-Configures a trailing footer line under server-generated documents. More information about [ServerSignature](http://httpd.apache.org/docs/current/mod/core.html#serversignature). Defaults to 'On'.
-
-#####`server_tokens`
-
-Controls how much information Apache sends to the browser about itself and the operating system. More information about [ServerTokens](http://httpd.apache.org/docs/current/mod/core.html#servertokens). Defaults to 'OS'.
-
-#####`service_enable`
-
-Determines whether the HTTPD service is enabled when the machine is booted. Defaults to 'true'.
-
-#####`service_ensure`
-
-Determines whether the service should be running. Valid values are true, false, 'running' or 'stopped' when Puppet should manage the service. Any other value will set ensure to false for the Apache service, which is useful when you want to let the service be managed by some other application like Pacemaker. Defaults to 'running'.
-
-#####`service_name`
-
-Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.
-
-#####`trace_enable`
-
-Controls how TRACE requests per RFC 2616 are handled. More information about [TraceEnable](http://httpd.apache.org/docs/current/mod/core.html#traceenable). Defaults to 'On'.
-
-#####`vhost_dir`
-
-Changes the location of the configuration directory your virtual host configuration files are placed in. Defaults to 'etc/httpd/conf.d' on RedHat, '/etc/apache2/sites-available' on Debian, and '/usr/local/etc/apache22/Vhosts' on FreeBSD.
-
-####Class: `apache::default_mods`
-
-Installs default Apache modules based on what OS you are running.
-
-```puppet
-    class { 'apache::default_mods': }
-```
-
-####Defined Type: `apache::mod`
-
-Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class. The `apache::mod` defined type will also install the required packages to enable the module, if any.
-
-```puppet
-    apache::mod { 'rewrite': }
-    apache::mod { 'ldap': }
-```
-
-####Classes: `apache::mod::[name]`
-
-There are many `apache::mod::[name]` classes within this module that can be declared using `include`:
-
-* `actions`
-* `alias`
-* `auth_basic`
-* `auth_kerb`
-* `authnz_ldap`*
-* `autoindex`
-* `cache`
-* `cgi`
-* `cgid`
-* `dav`
-* `dav_fs`
-* `dav_svn`*
-* `deflate`
-* `dev`
-* `dir`*
-* `disk_cache`
-* `event`
-* `expires`
-* `fastcgi`
-* `fcgid`
-* `headers`
-* `include`
-* `info`*
-* `itk`
-* `ldap`
-* `mime`
-* `mime_magic`*
-* `negotiation`
-* `nss`*
-* `pagespeed` (see [`apache::mod::pagespeed`](#class-apachemodpagespeed) below)
-* `passenger`*
-* `perl`
-* `peruser`
-* `php` (requires [`mpm_module`](#mpm_module) set to `prefork`)
-* `prefork`*
-* `proxy`*
-* `proxy_ajp`
-* `proxy_balancer`
-* `proxy_html`
-* `proxy_http`
-* `python`
-* `reqtimeout`
-* `rewrite`
-* `rpaf`*
-* `setenvif`
-* `speling`
-* `ssl`* (see [`apache::mod::ssl`](#class-apachemodssl) below)
-* `status`*
-* `suphp`
-* `userdir`*
-* `vhost_alias`
-* `worker`*
-* `wsgi` (see [`apache::mod::wsgi`](#class-apachemodwsgi) below)
-* `xsendfile`
-
-Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.
-
-The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install and the module will not work without the template. Any module without a template will install the package but drop no files.
-
-####Class: `apache::mod::info`
-
-Installs and manages mod_info which provides a comprehensive overview of the server configuration. 
-
-Full documentation for mod_info is available from [Apache](http://httpd.apache.org/docs/2.2/mod/mod_info.html).
-
-These are the default settings:
-
-```puppet
-  $allow_from      = ['127.0.0.1','::1'],
-  $apache_version  = $::apache::apache_version,
-  $restrict_access = true,
-```
-
-To set the addresses that are allowed to access /server-info add the following:
-
-```puppet
-  class {'apache::mod::info':
-    allow_from      => [
-      '10.10.36',
-      '10.10.38',
-      '127.0.0.1',
-    ],
-  }
-```
-
-To disable the access restrictions add the following:
-
-```puppet
-  class {'apache::mod::info':
-    restrict_access => false,
-  }
-```
-
-It is not recommended to leave this set to false though it can be very useful for testing. For this reason, you can insert this setting in your normal code to temporarily disable the restrictions like so:
-
-```puppet
-  class {'apache::mod::info':
-    restrict_access => false, # false disables the block below
-    allow_from      => [
-      '10.10.36',
-      '10.10.38',
-      '127.0.0.1',
-    ],
-  }
-```
-
-####Class: `apache::mod::pagespeed`
-
-Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth.
-
-This module does *not* manage the software repositories needed to automatically install the
-mod-pagespeed-stable package. The module does however require that the package be installed,
-or be installable using the system's default package provider.  You should ensure that this
-pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.
-
-These are the defaults:
-
-```puppet
-    class { 'apache::mod::pagespeed':
-      inherit_vhost_config          => 'on',
-      filter_xhtml                  => false,
-      cache_path                    => '/var/cache/mod_pagespeed/',
-      log_dir                       => '/var/log/pagespeed',
-      memache_servers               => [],
-      rewrite_level                 => 'CoreFilters',
-      disable_filters               => [],
-      enable_filters                => [],
-      forbid_filters                => [],
-      rewrite_deadline_per_flush_ms => 10,
-      additional_domains            => undef,
-      file_cache_size_kb            => 102400,
-      file_cache_clean_interval_ms  => 3600000,
-      lru_cache_per_process         => 1024,
-      lru_cache_byte_limit          => 16384,
-      css_flatten_max_bytes         => 2048,
-      css_inline_max_bytes          => 2048,
-      css_image_inline_max_bytes    => 2048,
-      image_inline_max_bytes        => 2048,
-      js_inline_max_bytes           => 2048,
-      css_outline_min_bytes         => 3000,
-      js_outline_min_bytes          => 3000,
-      inode_limit                   => 500000,
-      image_max_rewrites_at_once    => 8,
-      num_rewrite_threads           => 4,
-      num_expensive_rewrite_threads => 4,
-      collect_statistics            => 'on',
-      statistics_logging            => 'on',
-      allow_view_stats              => [],
-      allow_pagespeed_console       => [],
-      allow_pagespeed_message       => [],
-      message_buffer_size           => 100000,
-      additional_configuration      => { }
-    }
-```
-
-Full documentation for mod_pagespeed is available from [Google](http://modpagespeed.com).
-
-####Class: `apache::mod::php`
-
-Installs and configures mod_php. The defaults are OS-dependant.
-
-Overriding the package name:
-```
-  class {'::apache::mod::php':
-    package_name => "php54-php",
-    path         => "${::apache::params::lib_path}/libphp54-php5.so",
-  }
-```
-
-Overriding the default configuartion:
-```puppet
-  class {'::apache::mod::php':
-    source => 'puppet:///modules/apache/my_php.conf',
-  }
-```
-
-or 
-```puppet
-  class {'::apache::mod::php':
-    template => 'apache/php.conf.erb',
-  }
-```
-
-or
-
-```puppet
-  class {'::apache::mod::php':
-    content => '
-AddHandler php5-script .php
-AddType text/html .php',
-  }
-```
-####Class: `apache::mod::ssl`
-
-Installs Apache SSL capabilities and uses the ssl.conf.erb template. These are the defaults:
-
-```puppet
-    class { 'apache::mod::ssl':
-      ssl_compression => false,
-      ssl_options     => [ 'StdEnvVars' ],
-  }
-```
-
-To *use* SSL with a virtual host, you must either set the`default_ssl_vhost` parameter in `::apache` to 'true' or set the `ssl` parameter in `apache::vhost` to 'true'.
-
-####Class: `apache::mod::wsgi`
-
-Enables Python support in the WSGI module. To use, simply `include 'apache::mod::wsgi'`. 
-
-For customized parameters, which tell Apache how Python is currently configured on the operating system,
-
-```puppet
-    class { 'apache::mod::wsgi':
-      wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI",
-      wsgi_python_home   => '/path/to/venv',
-      wsgi_python_path   => '/path/to/venv/site-packages',
-    }
-```
-
-More information about [WSGI](http://modwsgi.readthedocs.org/en/latest/).
-
-####Class: `apache::mod::fcgid`
-
-Installs and configures mod_fcgid.
-
-The class makes no effort to list all available options, but rather uses an options hash to allow for ultimate flexibility:
-
-```puppet
-    class { 'apache::mod::fcgid':
-      options => {
-        'FcgidIPCDir'  => '/var/run/fcgidsock',
-        'SharememPath' => '/var/run/fcgid_shm',
-        'AddHandler'   => 'fcgid-script .fcgi',
-      },
-    }
-```
-
-For a full list op options, see the [official mod_fcgid documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html).
-
-It is also possible to set the FcgidWrapper per directory per vhost. You must ensure the fcgid module is loaded because there is no auto loading.
-
-```puppet
-    include apache::mod::fcgid
-    apache::vhost { 'example.org':
-      docroot     => '/var/www/html',
-      directories => {
-        path        => '/var/www/html',
-        fcgiwrapper => {
-          command => '/usr/local/bin/fcgiwrapper',
-        }
-      },
-    }
-```
-
-See [FcgidWrapper documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidwrapper) for more information.
-
-####Class: `apache::mod::negotiation`
-
-Installs and configures mod_negotiation. If there are not provided any
-parameter, default apache mod_negotiation configuration is done.
-
-```puppet
-  class { '::apache::mod::negotiation':
-    force_language_priority => 'Prefer',
-    language_priority       => [ 'es', 'en', 'ca', 'cs', 'da', 'de', 'el', 'eo' ],
-  }
-```
-
-**Parameters within `apache::mod::negotiation`:**
-
-#####`force_language_priority`
-
-A string that sets the `ForceLanguagePriority` option. Defaults to `Prefer Fallback`.
-
-#####`language_priority`
-
-An array of languages to set the `LanguagePriority` option of the module.
-
-####Class: `apache::mod::deflate`
-
-Installs and configures mod_deflate. If no parameters are provided, a default configuration is applied.
-
-```puppet
-  class { '::apache::mod::deflate':
-    types => [ 'text/html', 'text/css' ],
-    notes => {
-      'Input' => 'instream',
-      'Ratio' => 'ratio',
-    },
-  }
-```
-
-#####`types`
-
-An array of mime types that will be deflated.
-
-#####`notes`
-
-A hash where the key represents the type and the value represents the note name.
-
-####Defined Type: `apache::vhost`
-
-The Apache module allows a lot of flexibility in the setup and configuration of virtual hosts. This flexibility is due, in part, to `vhost`'s being a defined resource type, which allows it to be evaluated multiple times with different parameters.
-
-The `vhost` defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base `::apache` class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).
-
-If you have a series of specific configurations and do not want a base `::apache` class default vhost, make sure to set the base class `default_vhost` to 'false'.
-
-```puppet
-    class { 'apache':
-      default_vhost => false,
-    }
-```
-
-**Parameters within `apache::vhost`:**
-
-#####`access_log`
-
-Specifies whether `*_access.log` directives (`*_file`,`*_pipe`, or `*_syslog`) should be configured. Setting the value to 'false' will choose none. Defaults to 'true'. 
-
-#####`access_log_file`
-
-Sets the `*_access.log` filename that is placed in `$logroot`. Given a vhost, example.com, it defaults to 'example.com_ssl.log' for SSL vhosts and 'example.com_access.log' for non-SSL vhosts.
-
-#####`access_log_pipe`
-
-Specifies a pipe to send access log messages to. Defaults to 'undef'.
-
-#####`access_log_syslog`
-
-Sends all access log messages to syslog. Defaults to 'undef'.
-
-#####`access_log_format`
-
-Specifies the use of either a LogFormat nickname or a custom format string for the access log. Defaults to 'combined'. See [these examples](http://httpd.apache.org/docs/current/mod/mod_log_config.html).
-
-#####`access_log_env_var`
-
-Specifies that only requests with particular environment variables be logged. Defaults to 'undef'.
-
-#####`add_listen`
-
-Determines whether the vhost creates a Listen statement. The default value is 'true'.
-
-Setting `add_listen` to 'false' stops the vhost from creating a Listen statement, and this is important when you combine vhosts that are not passed an `ip` parameter with vhosts that *are* passed the `ip` parameter.
-
-#####`additional_includes`
-
-Specifies paths to additional static, vhost-specific Apache configuration files. Useful for implementing a unique, custom configuration not supported by this module. Can be an array. Defaults to '[]'.
-
-#####`aliases`
-
-Passes a list of hashes to the vhost to create Alias or AliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-aliases => [
-  { aliasmatch => '^/image/(.*)\.jpg$', 
-    path       => '/files/jpg.images/$1.jpg',
-  }
-  { alias      => '/image',
-    path       => '/ftp/pub/image', 
-  },
-],
-```
-
-For `alias` and `aliasmatch` to work, each will need a corresponding context, such as '< Directory /path/to/directory>' or ''. The Alias and AliasMatch directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias` or `aliasmatch` parameters should come before the more general ones to avoid shadowing.
-
-*Note:* If `apache::mod::passenger` is loaded and `PassengerHighPerformance => true` is set, then Alias may have issues honoring the `PassengerEnabled => off` statement. See [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
-
-#####`block`
-
-Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories.
-
-#####`custom_fragment`
-
-Passes a string of custom configuration directives to be placed at the end of the vhost configuration. Defaults to 'undef'.
-
-#####`default_vhost`
-
-Sets a given `apache::vhost` as the default to serve requests that do not match any other `apache::vhost` definitions. The default value is 'false'.
-
-#####`directories`
-
-See the [`directories` section](#parameter-directories-for-apachevhost).
-
-#####`directoryindex`
-
-Sets the list of resources to look for when a client requests an index of the directory by specifying a '/' at the end of the directory name. [DirectoryIndex](http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex) has more information. Defaults to 'undef'.
-
-#####`docroot`
-
-Provides the [DocumentRoot](http://httpd.apache.org/docs/current/mod/core.html#documentroot) directive, which identifies the directory Apache serves files from. Required. 
-
-#####`docroot_group`
-
-Sets group access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_owner`
-
-Sets individual user access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_mode`
-
-Sets access permissions of the docroot directory. Defaults to 'undef'.
-
-#####`manage_docroot`
-
-Whether to manage to docroot directory at all. Defaults to 'true'.
-
-#####`error_log`
-
-Specifies whether `*_error.log` directives should be configured. Defaults to 'true'.
-
-#####`error_log_file`
-
-Points to the `*_error.log` file. Given a vhost, example.com, it defaults to 'example.com_ssl_error.log' for SSL vhosts and 'example.com_access_error.log' for non-SSL vhosts.
-
-#####`error_log_pipe`
-
-Specifies a pipe to send error log messages to. Defaults to 'undef'.
-
-#####`error_log_syslog`
-
-Sends all error log messages to syslog. Defaults to 'undef'.
-
-#####`error_documents`
-
-A list of hashes which can be used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for this vhost. Defaults to '[]'. Example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      error_documents => [
-        { 'error_code' => '503', 'document' => '/service-unavail' },
-        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },
-      ],
-    }
-```
-
-#####`ensure`
-
-Specifies if the vhost file is present or absent. Defaults to 'present'.
-
-#####`fallbackresource`
-
-Sets the [FallbackResource](http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource) directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid values must either begin with a / or be 'disabled'. Defaults to 'undef'.
-
-#####`headers`
-
-Adds lines to replace, merge, or remove response headers. See [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) for more information. Can be an array. Defaults to 'undef'.
-
-#####`ip`
-
-Sets the IP address the vhost listens on. Defaults to listen on all IPs.
-
-#####`ip_based`
-
-Enables an [IP-based](http://httpd.apache.org/docs/current/vhosts/ip-based.html) vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.
-
-#####`itk`
-
-Configures [ITK](http://mpm-itk.sesse.net/) in a hash. Keys may be:
-
-* user + group
-* `assignuseridexpr`
-* `assigngroupidexpr`
-* `maxclientvhost`
-* `nice`
-* `limituidrange` (Linux 3.5.0 or newer)
-* `limitgidrange` (Linux 3.5.0 or newer)
-
-Usage will typically look like:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot => '/path/to/directory',
-      itk     => {
-        user  => 'someuser',
-        group => 'somegroup',
-      },
-    }
-```
-
-#####`logroot`
-
-Specifies the location of the virtual host's logfiles. Defaults to '/var/log//'.
-
-#####`log_level`
-
-Specifies the verbosity of the error log. Defaults to 'warn' for the global server configuration and can be overridden on a per-vhost basis. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info' or 'debug'.
-
-#####`no_proxy_uris`
-
-Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with [`proxy_dest`](#proxy_dest).
-
-#####`proxy_preserve_host`
-
-Sets the [ProxyPreserveHost Directive](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost).  true Enables the Host: line from an incoming request to be proxied to the host instead of hostname .  false sets this option to off (default).
-
-#####`options`
-
-Sets the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the specified virtual host. Defaults to '['Indexes','FollowSymLinks','MultiViews']', as demonstrated below:
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      options => ['Indexes','FollowSymLinks','MultiViews'],
-    }
-```
-
-*Note:* If you use [`directories`](#parameter-directories-for-apachevhost), 'Options', 'Override', and 'DirectoryIndex' are ignored because they are parameters within `directories`.
-
-#####`override`
-
-Sets the overrides for the specified virtual host. Accepts an array of [AllowOverride](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) arguments. Defaults to '[none]'.
-
-#####`php_admin_flags & values`
-
-Allows per-vhost setting [`php_admin_value`s or `php_admin_flag`s](http://php.net/manual/en/configuration.changes.php). These flags or values cannot be overwritten by a user or an application. Defaults to '[]'.
-
-#####`port`
-
-Sets the port the host is configured on. The module's defaults ensure the host listens on port 80 for non-SSL vhosts and port 443 for SSL vhosts. The host will only listen on the port set in this parameter. 
-
-#####`priority`
-
-Sets the relative load-order for Apache HTTPD VirtualHost configuration files. Defaults to '25'.
-
-If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.
-
-*Note:* You should not need to use this parameter. However, if you do use it, be aware that the `default_vhost` parameter for `apache::vhost` passes a priority of '15'.
-
-#####`proxy_dest`
-
-Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-#####`proxy_pass`
-
-Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-```puppet
-apache::vhost { 'site.name.fdqn':
-  … 
-  proxy_pass => [
-    { 'path' => '/a', 'url' => 'http://backend-a/' },
-    { 'path' => '/b', 'url' => 'http://backend-b/' },
-    { 'path' => '/c', 'url' => 'http://backend-a/c' },
-  ],
-}
-```
-
-#####`rack_base_uris`
-
-Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for [Phusion Passenger](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri) in the _rack.erb template. Defaults to 'undef'.
-
-#####`redirect_dest`
-
-Specifies the address to redirect to. Defaults to 'undef'.
-
-#####`redirect_source`
-
-Specifies the source URIs that will redirect to the destination specified in `redirect_dest`. If more than one item for redirect is supplied, the source and destination must be the same length and the items will be order-dependent. 
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_source => ['/images','/downloads'],
-      redirect_dest   => ['http://img.example.com/','http://downloads.example.com/'],
-    }
-```
-
-#####`redirect_status`
-
-Specifies the status to append to the redirect. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_status => ['temp','permanent'],
-    }
-```
-
-#####`redirectmatch_regexp` & `redirectmatch_status`
-
-Determines which server status should be raised for a given regular expression. Entered as an array. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirectmatch_status => ['404','404'],
-      redirectmatch_regexp => ['\.git(/.*|$)/','\.svn(/.*|$)'],
-    }
-```
-
-#####`request_headers`
-
-Modifies collected [request headers](http://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader) in various ways, including adding additional request headers, removing request headers, etc. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      request_headers => [
-        'append MirrorID "mirror 12"',
-        'unset MirrorID',
-      ],
-    }
-```
-
-#####`rewrites`
-
-Creates URL rewrite rules. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', or 'rewrite_rule'. Defaults to 'undef'. 
-
-For example, you can specify that anyone trying to access index.html will be served welcome.html
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ]
-    }
-```
-
-The parameter allows rewrite conditions that, when true, will execute the associated rule. For instance, if you wanted to rewrite URLs only if the visitor is using IE
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'redirect IE',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-You can also apply multiple conditions. For instance, rewrite index.html to welcome.html only when the browser is Lynx or Mozilla (version 1 or 2)
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-Multiple rewrites and conditions are also possible
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-        {
-          comment      => 'Internet Explorer',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ /index.IE.html [L]'],
-        },
-        {
-          rewrite_base => /apps/,
-          rewrite_rule => ['^index\.cgi$ index.php', '^index\.html$ index.php', '^index\.asp$ index.html'],
-        },
-     ], 
-    }
-```
-
-Refer to the [`mod_rewrite` documentation](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) for more details on what is possible with rewrite rules and conditions.
-
-#####`scriptalias`
-
-Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for example: '/usr/scripts'. Defaults to 'undef'.
-
-#####`scriptaliases`
-
-Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-    scriptaliases => [
-      {
-        alias => '/myscript',
-        path  => '/usr/share/myscript',
-      },
-      {
-        aliasmatch => '^/foo(.*)',
-        path       => '/usr/share/fooscripts$1',
-      },
-      {
-        aliasmatch => '^/bar/(.*)',
-        path       => '/usr/share/bar/wrapper.sh/$1',
-      },
-      {
-        alias => '/neatscript',
-        path  => '/usr/share/neatscript',
-      },
-    ]
-```
-
-The ScriptAlias and ScriptAliasMatch directives are created in the order specified. As with [Alias and AliasMatch](#aliases) directives, more specific aliases should come before more general ones to avoid shadowing.
-
-#####`serveradmin`
-
-Specifies the email address Apache will display when it renders one of its error pages. Defaults to 'undef'.
-
-#####`serveraliases`
-
-Sets the [ServerAliases](http://httpd.apache.org/docs/current/mod/core.html#serveralias) of the site. Defaults to '[]'.
-
-#####`servername`
-
-Sets the servername corresponding to the hostname you connect to the virtual host at. Defaults to the title of the resource.
-
-#####`setenv`
-
-Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.
-
-#####`setenvif`
-
-Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.
-
-#####`suphp_addhandler`, `suphp_configpath`, & `suphp_engine`
-
-Set up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG). 
-
-`suphp_addhandler` defaults to 'php5-script' on RedHat and FreeBSD, and 'x-httpd-php' on Debian.
-
-`suphp_configpath` defaults to 'undef' on RedHat and FreeBSD, and '/etc/php5/apache2' on Debian.
-
-`suphp_engine` allows values 'on' or 'off'. Defaults to 'off'
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-#####`vhost_name`
-
-Enables name-based virtual hosting. If no IP is passed to the virtual host but the vhost is assigned a port, then the vhost name will be 'vhost_name:port'. If the virtual host has no assigned IP or port, the vhost name will be set to the title of the resource. Defaults to '*'.
-
-#####`virtual_docroot` 
-
-Sets up a virtual host with a wildcard alias subdomain mapped to a directory with the same name. For example, 'http://example.com' would map to '/var/www/example.com'. Defaults to 'false'. 
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot' => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, `wsgi_script_aliases`, & `wsgi_pass_authorization`
-
-Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).
-
-`wsgi_daemon_process` sets the name of the WSGI daemon. It is a hash, accepting [these keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html), and it defaults to 'undef'.
-
-`wsgi_daemon_process_options` is optional and defaults to 'undef'.
-
-`wsgi_process_group` sets the group ID the virtual host will run under. Defaults to 'undef'.
-
-`wsgi_script_aliases` requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.
-
-`wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).  Defaults to 'undef' where apache will set the defaults setting to 'Off'.
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options =>
-        { processes    => '2', 
-          threads      => '15', 
-          display-name => '%{GROUP}',
-         },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-####Parameter `directories` for `apache::vhost`
-
-The `directories` parameter within the `apache::vhost` class passes an array of hashes to the vhost to create [Directory](http://httpd.apache.org/docs/current/mod/core.html#directory), [File](http://httpd.apache.org/docs/current/mod/core.html#files), and [Location](http://httpd.apache.org/docs/current/mod/core.html#location) directive blocks. These blocks take the form, '< Directory /path/to/directory>...< /Directory>'.
-
-Each hash passed to `directories` must contain `path` as one of the keys.  You may also pass in `provider` which, if missing, defaults to 'directory'. (A full list of acceptable keys is below.) General usage will look something like
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path => '/path/to/directory',  =>  },
-        { path => '/path/to/another/directory',  =>  },
-      ],
-    }
-```
-
-*Note:* At least one directory should match the `docroot` parameter. Once you start declaring directories, `apache::vhost` assumes that all required Directory blocks will be declared. If not defined, a single default Directory block will be created that matches the `docroot` parameter.
-
-The `provider` key can be set to 'directory', 'files', or 'location'. If the path starts with a [~](https://httpd.apache.org/docs/current/mod/core.html#files), HTTPD will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch.
-
-```puppet
-    apache::vhost { 'files.example.net':
-      docroot     => '/var/www/files',
-      directories => [
-        { 'path'     => '/var/www/files', 
-          'provider' => 'files', 
-          'deny'     => 'from all' 
-         },
-      ],
-    }
-```
-
-Available handlers, represented as keys, should be placed within the  `directory`,`'files`, or `location` hashes.  This looks like
-
-```puppet
-  apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ { path => '/path/to/directory', handler => value } ],
-}
-```
-
-Any handlers you do not set in these hashes will be considered 'undefined' within Puppet and will not be added to the virtual host, resulting in the module using their default values. Currently this is the list of supported handlers:
-
-######`addhandlers`
-
-Sets [AddHandler](http://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler) directives, which map filename extensions to the specified handler. Accepts a list of hashes, with `extensions` serving to list the extensions being managed by the handler, and takes the form: `{ handler => 'handler-name', extensions => ['extension']}`. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path        => '/path/to/directory',
-          addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}],
-        }, 
-      ],
-    }
-```
-
-######`allow`
-
-Sets an [Allow](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow) directive, which groups authorizations based on hostnames or IPs. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          allow => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`allow_override`
-
-Sets the types of directives allowed in [.htaccess](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) files. Accepts an array.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot      => '/path/to/directory',
-      directories  => [ 
-        { path           => '/path/to/directory', 
-          allow_override => ['AuthConfig', 'Indexes'], 
-        }, 
-      ],
-    }
-```
-
-######`auth_basic_authoritative`
-
-Sets the value for [AuthBasicAuthoritative](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative), which determines whether authorization and authentication are passed to lower level Apache modules.
-
-######`auth_basic_fake`
-
-Sets the value for [AuthBasicFake](http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake), which statically configures authorization credentials for a given directive block.
-
-######`auth_basic_provider`
-
-Sets the value for [AuthBasicProvider] (http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_algorithm`
-
-Sets the value for [AuthDigestAlgorithm](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm), which selects the algorithm used to calculate the challenge and response hashes.
-
-######`auth_digest_domain`
-
-Sets the value for [AuthDigestDomain](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain), which allows you to specify one or more URIs in the same protection space for digest authentication.
-
-######`auth_digest_nonce_lifetime`
-
-Sets the value for [AuthDigestNonceLifetime](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime), which controls how long the server nonce is valid.
-
-######`auth_digest_provider`
-
-Sets the value for [AuthDigestProvider](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_qop`
-
-Sets the value for [AuthDigestQop](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop), which determines the quality-of-protection to use in digest authentication.
-
-######`auth_digest_shmem_size`
-
-Sets the value for [AuthAuthDigestShmemSize](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize), which defines the amount of shared memory allocated to the server for keeping track of clients.
-
-######`auth_group_file`
-
-Sets the value for [AuthGroupFile](https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile), which sets the name of the text file containing the list of user groups for authorization.
-
-######`auth_name`
-
-Sets the value for [AuthName](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname), which sets the name of the authorization realm.
-
-######`auth_require`
-
-Sets the entity name you're requiring to allow access. Read more about [Require](http://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives).
-
-######`auth_type`
-
-Sets the value for [AuthType](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype), which guides the type of user authentication.
-
-######`auth_user_file`
-
-Sets the value for [AuthUserFile](http://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile), which sets the name of the text file containing the users/passwords for authentication.
-
-######`custom_fragment`
-
-Pass a string of custom configuration directives to be placed at the end of the directory configuration.
-
-```puppet
-  apache::vhost { 'monitor':
-    … 
-    custom_fragment => '
-  
-    SetHandler balancer-manager
-    Order allow,deny
-    Allow from all
-  
-  
-    SetHandler server-status
-    Order allow,deny
-    Allow from all
-  
-  ProxyStatus On',
-}
-```
-
-######`deny`
-
-Sets a [Deny](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny) directive, specifying which hosts are denied access to the server. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path => '/path/to/directory', 
-          deny => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`error_documents`
-
-An array of hashes used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for the directory. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      directories => [ 
-        { path            => '/srv/www',
-          error_documents => [
-            { 'error_code' => '503', 
-              'document'   => '/service-unavail',
-            },
-          ],
-        },
-      ],
-    }
-```
-
-######`headers`
-
-Adds lines for [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) directives.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => {
-        path    => '/path/to/directory',
-        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',
-      },
-    }
-```
-
-######`index_options`
-
-Allows configuration settings for [directory indexing](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions).
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path          => '/path/to/directory', 
-          options       => ['Indexes','FollowSymLinks','MultiViews'], 
-          index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'],
-        },
-      ],
-    }
-```
-
-######`index_order_default`
-
-Sets the [default ordering](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault) of the directory index.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path                => '/path/to/directory', 
-          order               => 'Allow,Deny', 
-          index_order_default => ['Descending', 'Date'],
-        }, 
-      ],
-    }
-```
-
-######`options`
-
-Lists the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the given Directory block.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path    => '/path/to/directory', 
-          options => ['Indexes','FollowSymLinks','MultiViews'], 
-        },
-      ],
-    }
-```
-
-######`order`
-
-Sets the order of processing Allow and Deny statements as per [Apache core documentation](httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          order => 'Allow,Deny', 
-        },
-      ],
-    }
-```
-
-######`satisfy`
-
-Sets a `Satisfy` directive as per the [Apache Core documentation](http://httpd.apache.org/docs/2.2/mod/core.html#satisfy). **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path    => '/path/to/directory',
-          satisfy => 'Any',
-        }
-      ],
-    }
-
-######`sethandler`
-
-Sets a `SetHandler` directive as per the [Apache Core documentation](http://httpd.apache.org/docs/2.2/mod/core.html#sethandler). An example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path       => '/path/to/directory', 
-          sethandler => 'None', 
-        }
-      ],
-    }
-```
-
-######`passenger_enabled`
-
-Sets the value for the [PassengerEnabled](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled) directory to 'on' or 'off'. Requires `apache::mod::passenger` to be included.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path              => '/path/to/directory', 
-          passenger_enabled => 'on',
-        }, 
-      ],
-    }
-```
-
-*Note:* Be aware that there is an [issue](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) using the PassengerEnabled directive with the PassengerHighPerformance directive.
-
-######`php_admin_value` and `php_admin_flag`
-
-`php_admin_value` sets the value of the directory, and `php_admin_flag` uses a boolean to configure the directory. Further information can be found [here](http://php.net/manual/en/configuration.changes.php).
-
-######`ssl_options`
-
-String or list of [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions), which configure SSL engine run-time options. This handler takes precedence over SSLOptions set in the parent block of the vhost.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path        => '/path/to/directory', 
-          ssl_options => '+ExportCertData', 
-        },
-        { path        => '/path/to/different/dir', 
-          ssl_options => [ '-StdEnvVars', '+ExportCertData'],
-        },
-      ],
-    }
-```
-
-######`suphp`
-
-A hash containing the 'user' and 'group' keys for the [suPHP_UserGroup](http://www.suphp.org/DocumentationView.html?file=apache/CONFIG) setting. It must be used with `suphp_engine => on` in the vhost declaration, and may only be passed within `directories`.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path  => '/path/to/directory', 
-          suphp => 
-            { user  =>  'myappuser', 
-              group => 'myappgroup', 
-            },
-        },
-      ],
-    }
-```
-
-####SSL parameters for `apache::vhost`
-
-All of the SSL parameters for `::vhost` will default to whatever is set in the base `apache` class. Use the below parameters to tweak individual SSL settings for specific vhosts.
-
-#####`ssl`
-
-Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'. Defaults to 'false'. 
-
-#####`ssl_ca`
-
-Specifies the SSL certificate authority. Defaults to 'undef'.
-
-#####`ssl_cert`
-
-Specifies the SSL certification. Defaults are based on your OS: '/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD.
-
-#####`ssl_protocol`
-
-Specifies [SSLProtocol](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol). Defaults to 'undef'. 
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'all -SSLv2'.
-
-#####`ssl_cipher`
-
-Specifies [SSLCipherSuite](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite). Defaults to 'undef'.
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'HIGH:MEDIUM:!aNULL:!MD5'.
-
-#####`ssl_honorcipherorder`
-
-Sets [SSLHonorCipherOrder](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder), which is used to prefer the server's cipher preference order. Defaults to 'On' in the base `apache` config.
-
-#####`ssl_certs_dir`
-
-Specifies the location of the SSL certification directory. Defaults to '/etc/ssl/certs' on Debian, '/etc/pki/tls/certs' on RedHat, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`ssl_chain`
-
-Specifies the SSL chain. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl`
-
-Specifies the certificate revocation list to use. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl_path`
-
-Specifies the location of the certificate revocation list. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_key`
-
-Specifies the SSL key. Defaults are based on your operating system: '/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_verify_client`
-
-Sets the [SSLVerifyClient](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient) directive, which sets the certificate verification level for client authentication. Valid values are: 'none', 'optional', 'require', and 'optional_no_ca'. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_client => 'optional',
-    }
-```
-
-#####`ssl_verify_depth`
-
-Sets the [SSLVerifyDepth](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth) directive, which specifies the maximum depth of CA certificates in client certificate verification. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_depth => 1,
-    }
-```
-
-#####`ssl_options`
-
-Sets the [SSLOptions](http://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions) directive, which configures various SSL engine run-time options. This is the global setting for the given vhost and can be a string or an array. Defaults to 'undef'. 
-
-A string:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => '+ExportCertData',
-    }
-```
-
-An array:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => [ '+StrictRequire', '+ExportCertData' ],
-    }
-```
-
-#####`ssl_proxyengine`
-
-Specifies whether or not to use [SSLProxyEngine](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine). Valid values are 'true' and 'false'. Defaults to 'false'.
-
-####Defined Type: FastCGI Server
-
-This type is intended for use with mod_fastcgi. It allows you to define one or more external FastCGI servers to handle specific file types.
-
-Ex:
-
-```puppet
-apache::fastcgi::server { 'php':
-  host       => '127.0.0.1:9000',
-  timeout    => 15,
-  flush      => false,
-  faux_path  => '/var/www/php.fcgi',
-  fcgi_alias => '/php.fcgi',
-  file_type  => 'application/x-httpd-php'
-}
-```
-
-Within your virtual host, you can then configure the specified file type to be handled by the fastcgi server specified above.
-
-```puppet
-apache::vhost { 'www':
-  ...
-  custom_fragment = 'AddType application/x-httpd-php .php'
-  ...
-}
-```
-
-#####`host`
-
-The hostname or IP address and TCP port number (1-65535) of the FastCGI server.
-
-#####`timeout`
-
-The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (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 will be aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply.
-
-#####`flush`
-
-Force a 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.
-
-#####`faux_path`
-
-`faux_path` does not have to exist in the local filesystem. URIs that Apache resolves to this filename will be handled by this external FastCGI application.
-
-#####`alias`
-
-A unique alias. This is used internally to link the action with the FastCGI server.
-
-#####`file_type`
-
-The MIME-type of the file's that will be processed by the FastCGI server. 
-
-###Virtual Host Examples
-
-The apache module allows you to set up pretty much any configuration of virtual host you might need. This section will address some common configurations, but look at the [Tests section](https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests) for even more examples.
-
-Configure a vhost with a server administrator
-
-```puppet
-    apache::vhost { 'third.example.com':
-      port        => '80',
-      docroot     => '/var/www/third',
-      serveradmin => 'admin@example.com',
-    }
-```
-
-- - -
-
-Set up a vhost with aliased servers
-
-```puppet
-    apache::vhost { 'sixth.example.com':
-      serveraliases => [
-        'sixth.example.org',
-        'sixth.example.net',
-      ],
-      port          => '80',
-      docroot       => '/var/www/fifth',
-    }
-```
-
-- - -
-
-Configure a vhost with a cgi-bin
-
-```puppet
-    apache::vhost { 'eleventh.example.com':
-      port        => '80',
-      docroot     => '/var/www/eleventh',
-      scriptalias => '/usr/lib/cgi-bin',
-    }
-```
-
-- - -
-
-Set up a vhost with a rack configuration
-
-```puppet
-    apache::vhost { 'fifteenth.example.com':
-      port           => '80',
-      docroot        => '/var/www/fifteenth',
-      rack_base_uris => ['/rackapp1', '/rackapp2'],
-    }
-```
-
-- - -
-
-Set up a mix of SSL and non-SSL vhosts at the same domain
-
-```puppet
-    #The non-ssl vhost
-    apache::vhost { 'first.example.com non-ssl':
-      servername => 'first.example.com',
-      port       => '80',
-      docroot    => '/var/www/first',
-    }
-
-    #The SSL vhost at the same domain
-    apache::vhost { 'first.example.com ssl':
-      servername => 'first.example.com',
-      port       => '443',
-      docroot    => '/var/www/first',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Configure a vhost to redirect non-SSL connections to SSL
-
-```puppet
-    apache::vhost { 'sixteenth.example.com non-ssl':
-      servername      => 'sixteenth.example.com',
-      port            => '80',
-      docroot         => '/var/www/sixteenth',
-      redirect_status => 'permanent',
-      redirect_dest   => 'https://sixteenth.example.com/'
-    }
-    apache::vhost { 'sixteenth.example.com ssl':
-      servername => 'sixteenth.example.com',
-      port       => '443',
-      docroot    => '/var/www/sixteenth',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.
-
-```puppet
-    apache::listen { '80': }
-    apache::listen { '81': }
-```
-
-Then we will set up the IP-based vhosts
-
-```puppet
-    apache::vhost { 'first.example.com':
-      ip       => '10.0.0.10',
-      docroot  => '/var/www/first',
-      ip_based => true,
-    }
-    apache::vhost { 'second.example.com':
-      ip       => '10.0.0.11',
-      docroot  => '/var/www/second',
-      ip_based => true,
-    }
-```
-
-- - -
-
-Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL
-
-```puppet
-    apache::vhost { 'The first IP-based vhost, non-ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '80',
-      ip_based   => true,
-      docroot    => '/var/www/first',
-    }
-    apache::vhost { 'The first IP-based vhost, ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '443',
-      ip_based   => true,
-      docroot    => '/var/www/first-ssl',
-      ssl        => true,
-    }
-```
-
-Then, we will add two name-based vhosts listening on 10.0.0.20
-
-```puppet
-    apache::vhost { 'second.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/second',
-    }
-    apache::vhost { 'third.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/third',
-    }
-```
-
-If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you **MUST** declare `add_listen => 'false'` to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fourth',
-      add_listen => false,
-    }
-    apache::vhost { 'fifth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fifth',
-      add_listen => false,
-    }
-```
-
-###Load Balancing
-
-####Defined Type: `apache::balancer`
-
-`apache::balancer` creates an Apache balancer cluster. Each balancer cluster needs one or more balancer members, which are declared with [`apache::balancermember`](#defined-type-apachebalancermember). 
-
-One `apache::balancer` defined resource should be defined for each Apache load balanced set of servers. The `apache::balancermember` resources for all balancer members can be exported and collected on a single Apache load balancer server using exported resources.
-
-**Parameters within `apache::balancer`:**
-
-#####`name`
-
-Sets the balancer cluster's title. This parameter will also set the title of the conf.d file.
-
-#####`proxy_set`
-
-Configures key-value pairs as [ProxySet](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset) lines. Accepts a hash, and defaults to '{}'.
-
-#####`collect_exported`
-
-Determines whether or not to use exported resources. Valid values 'true' and 'false', defaults to 'true'. 
-
-If you statically declare all of your backend servers, you should set this to 'false' to rely on existing declared balancer member resources. Also make sure to use `apache::balancermember` with array arguments.
-
-If you wish to dynamically declare your backend servers via [exported resources](http://docs.puppetlabs.com/guides/exported_resources.html) collected on a central node, you must set this parameter to 'true' in order to collect the exported balancer member resources that were exported by the balancer member nodes.
-
-If you choose not to use exported resources, all balancer members will be configured in a single puppet run. If you are using exported resources, Puppet has to run on the balanced nodes, then run on the balancer.
-
-####Defined Type: `apache::balancermember`
-
-Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html), which will set up a balancer member inside a listening service configuration block in etc/apache/apache.cfg on the load balancer.
-
-**Parameters within `apache::balancermember`:**
-
-#####`name`
-
-Sets the title of the resource. This name will also set the name of the concat fragment.
-
-#####`balancer_cluster`
-
-Sets the Apache service's instance name. This must match the name of a declared `apache::balancer` resource. Required.
-
-#####`url`
-
-Specifies the URL used to contact the balancer member server. Defaults to 'http://${::fqdn}/'.
-
-#####`options`
-
-An array of [options](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember) to be specified after the URL. Accepts any key-value pairs available to [ProxyPass](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass).
-
-####Examples
-
-To load balance with exported resources, export the `balancermember` from the balancer member
-
-```puppet
-      @@apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then, on the proxy server, create the balancer cluster
-
-```puppet
-      apache::balancer { 'puppet00': }
-```
-
-To load balance without exported resources, declare the following on the proxy
-
-```puppet
-    apache::balancer { 'puppet00': }
-    apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then declare `apache::balancer` and `apache::balancermember` on the proxy server.
-
-If you need to use ProxySet in the balancer config
-
-```puppet
-      apache::balancer { 'puppet01':
-        proxy_set => {'stickysession' => 'JSESSIONID'},
-      }
-```
-
-##Reference
-
-###Classes
-
-####Public Classes
-
-* [`apache`](#class-apache): Guides the basic setup of Apache.
-* `apache::dev`: Installs Apache development libraries. (*Note:* On FreeBSD, you must declare `apache::package` or `apache` before `apache::dev`.)
-* [`apache::mod::[name]`](#classes-apachemodname): Enables specific Apache HTTPD modules.
- 
-####Private Classes
-
-* `apache::confd::no_accf`: Creates the no-accf.conf configuration file in conf.d, required by FreeBSD's Apache 2.4.
-* `apache::default_confd_files`: Includes conf.d files for FreeBSD.
-* `apache::default_mods`: Installs the Apache modules required to run the default configuration.
-* `apache::package`: Installs and configures basic Apache packages.
-* `apache::params`: Manages Apache parameters.
-* `apache::service`: Manages the Apache daemon.
-
-###Defined Types
-
-####Public Defined Types
-
-* `apache::balancer`: Creates an Apache balancer cluster.
-* `apache::balancermember`: Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html).
-* `apache::listen`: Based on the title, controls which ports Apache binds to for listening. Adds [Listen](http://httpd.apache.org/docs/current/bind.html) directives to ports.conf in the Apache HTTPD configuration directory. Titles take the form '', ':', or ':'.
-* `apache::mod`: Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class.
-* `apache::namevirtualhost`: Enables name-based hosting of a virtual host. Adds all [NameVirtualHost](http://httpd.apache.org/docs/current/vhosts/name-based.html) directives to the `ports.conf` file in the Apache HTTPD configuration directory. Titles take the form '\*', '*:', '\_default_:, '', or ':'.
-* `apache::vhost`: Allows specialized configurations for virtual hosts that have requirements outside the defaults. 
-
-####Private Defined Types
-
-* `apache::peruser::multiplexer`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-* `apache::peruser::processor`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-
-###Templates
-
-The Apache module relies heavily on templates to enable the `vhost` and `apache::mod` defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.
-
-##Limitations
-
-###Ubuntu 10.04
-
-The `apache::vhost::WSGIImportScript` parameter creates a statement inside the VirtualHost which is unsupported on older versions of Apache, causing this to fail.  This will be remedied in a future refactoring.
-
-###RHEL/CentOS 5
-
-The `apache::mod::passenger` and `apache::mod::proxy_html` classes are untested since repositories are missing compatible packages.   
-
-###RHEL/CentOS 7
-
-The `apache::mod::passenger` class is untested as the repository does not have packages for EL7 yet.  The fact that passenger packages aren't available also makes us unable to test the `rack_base_uri` parameter in `apache::vhost`.
-
-###General
-
-This module is CI tested on Centos 5 & 6, Ubuntu 12.04 & 14.04, Debian 7, and RHEL 5, 6 & 7 platforms against both the OSS and Enterprise version of Puppet. 
-
-The module contains support for other distributions and operating systems, such as FreeBSD and Amazon Linux, but is not formally tested on those and regressions may occur.
-
-###SELinux and Custom Paths
-
-If you are running with SELinux in enforcing mode and want to use custom paths for your `logroot`, `mod_dir`, `vhost_dir`, and `docroot`, you will need to manage the context for the files yourself.
-
-Something along the lines of:
-
-```puppet
-        exec { 'set_apache_defaults':
-          command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          require => Package['policycoreutils-python'],
-        }
-        package { 'policycoreutils-python': ensure => installed }
-        exec { 'restorecon_apache':
-          command => 'restorecon -Rv /apache_spec',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          before  => Service['httpd'],
-          require => Class['apache'],
-        }
-        class { 'apache': }
-        host { 'test.server': ip => '127.0.0.1' }
-        file { '/custom/path': ensure => directory, }
-        file { '/custom/path/include': ensure => present, content => '#additional_includes' }
-        apache::vhost { 'test.server':
-          docroot             => '/custom/path',
-          additional_includes => '/custom/path/include',
-        }
-```
-
-You need to set the contexts using `semanage fcontext` not `chcon` because `file {...}` resources will reset the context to the values in the database if the resource isn't specifying the context.
-
-##Development
-
-###Contributing
-
-Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
-
-We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
-
-You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
-
-###Running tests
-
-This project contains tests for both [rspec-puppet](http://rspec-puppet.com/) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) to verify functionality. For in-depth information please see their respective documentation.
-
-Quickstart:
-
-    gem install bundler
-    bundle install
-    bundle exec rake spec
-    bundle exec rspec spec/acceptance
-    RS_DEBUG=yes bundle exec rspec spec/acceptance
diff --git a/puphpet/puppet/modules/apache/README.passenger.md b/puphpet/puppet/modules/apache/README.passenger.md
deleted file mode 100644
index 4b4caa8c..00000000
--- a/puphpet/puppet/modules/apache/README.passenger.md
+++ /dev/null
@@ -1,278 +0,0 @@
-# Passenger
-
-Just enabling the Passenger module is insufficient for the use of Passenger in
-production. Passenger should be tunable to better fit the environment in which
-it is run while being aware of the resources it required.
-
-To this end the Apache passenger module has been modified to apply system wide
-Passenger tuning declarations to `passenger.conf`. Declarations specific to a
-virtual host should be passed through when defining a `vhost` (e.g.
-`rack_base_uris` parameter on the `apache::vhost` type, check `README.md`).
-
-Also, general apache module loading parameters can be supplied to enable using
-a customized passenger module in place of a default-package-based version of
-the module.
-
-# Operating system support and Passenger versions
-
-The most important configuration directive for the Apache Passenger module is
-`PassengerRoot`. Its value depends on the Passenger version used (2.x, 3.x or
-4.x) and on the operating system package from which the Apache Passenger module
-is installed.
-
-The following table summarises the current *default versions* and
-`PassengerRoot` settings for the operating systems supported by
-puppetlabs-apache:
-
-OS               | Passenger version  | `PassengerRoot` 
----------------- | ------------------ | ----------------
-Debian 7         | 3.0.13             | /usr
-Ubuntu 12.04     | 2.2.11             | /usr
-Ubuntu 14.04     | 4.0.37             | /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini 
-RHEL with EPEL6  | 3.0.21             | /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21 
-
-As mentioned in `README.md` there are no compatible packages available for
-RHEL/CentOS 5 or RHEL/CentOS 7.
-
-## Configuration files and locations on RHEL/CentOS
-
-Notice two important points:
-
-1. The Passenger version packaged in the EPEL repositories may change over time.
-2. The value of `PassengerRoot` depends on the Passenger version installed.
-
-To prevent the puppetlabs-apache module from having to keep up with these
-package versions the Passenger configuration files installed by the
-packages are left untouched by this module. All configuration is placed in an
-extra configuration file managed by puppetlabs-apache.
-
-This means '/etc/httpd/conf.d/passenger.conf' is installed by the
-`mod_passenger` package and contains correct values for `PassengerRoot` and
-`PassengerRuby`. Puppet will ignore this file. Additional configuration
-directives as described in the remainder of this document are placed in
-'/etc/httpd/conf.d/passenger_extra.conf', managed by Puppet.
-
-This pertains *only* to RHEL/CentOS, *not* Debian and Ubuntu.
-
-## Third-party and custom Passenger packages and versions
-
-The Passenger version distributed by the default OS packages may be too old to
-be useful. Newer versions may be installed via Gems, from source or from
-third-party OS packages.
-
-Most notably the Passenger developers officially provide Debian packages for a
-variety of Debian and Ubuntu releases in the [Passenger APT
-repository](https://oss-binaries.phusionpassenger.com/apt/passenger). Read more
-about [installing these packages in the offical user
-guide](http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu).
-
-If you install custom Passenger packages and newer version make sure to set the
-directives `PassengerRoot`, `PassengerRuby` and/or `PassengerDefaultRuby`
-correctly, or Passenger and Apache will fail to function properly.
-
-For Passenger 4.x packages on Debian and Ubuntu the `PassengerRoot` directive
-should almost universally be set to
-`/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini`.
-
-# Parameters for `apache::mod::passenger`
-
-The following class parameters configure Passenger in a global, server-wide
-context.
-
-Example:
-
-```puppet
-class { 'apache::mod::passenger':
-  passenger_root             => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini',
-  passenger_default_ruby     => '/usr/bin/ruby1.9.3',
-  passenger_high_performance => 'on',
-  rails_autodetect           => 'off',
-  mod_lib_path               => '/usr/lib/apache2/custom_modules',
-}
-```
-
-The general form is using the all lower-case version of the configuration
-directive, with underscores instead of CamelCase.
-
-## Parameters used with passenger.conf
-
-If you pass a default value to `apache::mod::passenger` it will be ignored and
-not passed through to the configuration file. 
-
-### passenger_root
-
-The location to the Phusion Passenger root directory. This configuration option
-is essential to Phusion Passenger, and allows Phusion Passenger to locate its
-own data files. 
-
-The default depends on the Passenger version and the means of installation. See
-the above section on operating system support, versions and packages for more
-information.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerroot_lt_directory_gt
-
-### passenger_default_ruby
-
-This option specifies the default Ruby interpreter to use for web apps as well
-as for all sorts of internal Phusion Passenger helper scripts, e.g. the one
-used by PassengerPreStart.
-
-This directive was introduced in Passenger 4.0.0 and will not work in versions
-< 4.x. Do not set this parameter if your Passenger version is older than 4.0.0.
-
-Defaults to `undef` for all operating systems except Ubuntu 14.04, where it is
-set to '/usr/bin/ruby'.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultRuby
-
-### passenger_ruby
-
-This directive is the same as `passenger_default_ruby` for Passenger versions
-< 4.x and must be used instead of `passenger_default_ruby` for such versions.
-
-It makes no sense to set `PassengerRuby` for Passenger >= 4.x. That
-directive should only be used to override the value of `PassengerDefaultRuby`
-on a non-global context, i.e. in ``, ``, ``
-and so on.
-
-Defaults to `/usr/bin/ruby` for all supported operating systems except Ubuntu
-14.04, where it is set to `undef`.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby
-
-### passenger_high_performance
-
-Default is `off`. When turned `on` Passenger runs in a higher performance mode
-that can be less compatible with other Apache modules.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerHighPerformance
-
-### passenger_max_pool_size
-
-Sets the maximum number of Passenger application processes that may
-simultaneously run. The default value is 6.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt
-
-### passenger_pool_idle_time
-
-The maximum number of seconds a Passenger Application process will be allowed
-to remain idle before being shut down. The default value is 300.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime
-
-### passenger_max_requests
-
-The maximum number of request a Passenger application will process before being
-restarted. The default value is 0, which indicates that a process will only
-shut down if the Pool Idle Time (see above) expires.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMaxRequests
-
-### passenger_stat_throttle_rate
-
-Sets how often Passenger performs file system checks, at most once every _x_
-seconds. Default is 0, which means the checks are performed with every request.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt
-
-### rack_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rack application. Not set by default (`undef`). Note that this directive has
-been removed in Passenger 4.0.0 and `PassengerEnabled` should be used instead.
-Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_rackautodetect_lt_on_off_gt
-
-### rails_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rails application.  Not set by default (`undef`). Note that this directive
-has been removed in Passenger 4.0.0 and `PassengerEnabled` should be used
-instead. Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsautodetect_lt_on_off_gt
-
-### passenger_use_global_queue
-
-Allows toggling of PassengerUseGlobalQueue.  NOTE: PassengerUseGlobalQueue is
-the default in Passenger 4.x and the versions >= 4.x have disabled this
-configuration option altogether.  Use with caution.
-
-## Parameters used to load the module
-
-Unlike the tuning parameters specified above, the following parameters are only
-used when loading customized passenger modules.
-
-### mod_package
-
-Allows overriding the default package name used for the passenger module
-package.
-
-### mod_package_ensure
-
-Allows overriding the package installation setting used by puppet when
-installing the passenger module. The default is 'present'.
-
-### mod_id
-
-Allows overriding the value used by apache to identify the passenger module.
-The default is 'passenger_module'.
-
-### mod_lib_path
-
-Allows overriding the directory path used by apache when loading the passenger
-module. The default is the value of `$apache::params::lib_path`.
-
-### mod_lib
-
-Allows overriding the library file name used by apache when loading the
-passenger module. The default is 'mod_passenger.so'.
-
-### mod_path
-
-Allows overriding the full path to the library file used by apache when loading
-the passenger module. The default is the concatenation of the `mod_lib_path`
-and `mod_lib` parameters.
-
-# Dependencies
-
-RedHat-based systems will need to configure additional package repositories in
-order to install Passenger, specifically:
-
-* [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL)
-* [Phusion Passenger](http://passenger.stealthymonkeys.com)
-
-Configuration of these repositories is beyond the scope of this module and is
-left to the user.
-
-# Attribution
-
-The Passenger tuning parameters for the `apache::mod::passenger` Puppet class
-was modified by Aaron Hicks (hicksa@landcareresearch.co.nz) for work on the
-NeSI Project and the Tuakiri New Zealand Access Federation as a fork from the
-PuppetLabs Apache module on GitHub.
-
-* https://github.com/puppetlabs/puppetlabs-apache
-* https://github.com/nesi/puppetlabs-apache
-* http://www.nesi.org.nz//
-* https://tuakiri.ac.nz/confluence/display/Tuakiri/Home
-
-# Copyright and License
-
-Copyright (C) 2012 [Puppet Labs](https://www.puppetlabs.com/) Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/puphpet/puppet/modules/apache/Rakefile b/puphpet/puppet/modules/apache/Rakefile
deleted file mode 100644
index e1f7f013..00000000
--- a/puphpet/puppet/modules/apache/Rakefile
+++ /dev/null
@@ -1,11 +0,0 @@
-require 'puppetlabs_spec_helper/rake_tasks'
-require 'puppet-lint/tasks/puppet-lint'
-
-PuppetLint.configuration.fail_on_warnings
-PuppetLint.configuration.send('disable_80chars')
-PuppetLint.configuration.send('disable_class_inherits_from_params_class')
-PuppetLint.configuration.send('disable_class_parameter_defaults')
-PuppetLint.configuration.send('disable_documentation')
-PuppetLint.configuration.send('disable_single_quote_string_with_variables')
-PuppetLint.configuration.send('disable_only_variable_string')
-PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
diff --git a/puphpet/puppet/modules/apache/files/httpd b/puphpet/puppet/modules/apache/files/httpd
deleted file mode 100644
index d65a8d44..00000000
--- a/puphpet/puppet/modules/apache/files/httpd
+++ /dev/null
@@ -1,24 +0,0 @@
-# Configuration file for the httpd service.
-
-#
-# The default processing model (MPM) is the process-based
-# 'prefork' model.  A thread-based model, 'worker', is also
-# available, but does not work with some modules (such as PHP).
-# The service must be stopped before changing this variable.
-#
-#HTTPD=/usr/sbin/httpd.worker
-
-#
-# To pass additional options (for instance, -D definitions) to the
-# httpd binary at startup, set OPTIONS here.
-#
-#OPTIONS=
-#OPTIONS=-DDOWN
-
-#
-# By default, the httpd process is started in the C locale; to 
-# change the locale in which the server runs, the HTTPD_LANG
-# variable can be set.
-#
-#HTTPD_LANG=C
-export SHORTHOST=`hostname -s`
diff --git a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb b/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
deleted file mode 100644
index 670aca3d..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-class Puppet::Provider::A2mod < Puppet::Provider
-  def self.prefetch(mods)
-    instances.each do |prov|
-      if mod = mods[prov.name]
-        mod.provider = prov
-      end
-    end
-  end
-
-  def flush
-    @property_hash.clear
-  end
-
-  def properties
-    if @property_hash.empty?
-      @property_hash = query || {:ensure => :absent}
-      @property_hash[:ensure] = :absent if @property_hash.empty?
-    end
-    @property_hash.dup
-  end
-
-  def query
-    self.class.instances.each do |mod|
-      if mod.name == self.name or mod.name.downcase == self.name
-        return mod.properties
-      end
-    end
-    nil
-  end
-
-  def exists?
-    properties[:ensure] != :absent
-  end
-end
diff --git a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb b/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
deleted file mode 100644
index e257a579..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require 'puppet/provider/a2mod'
-
-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"
-
-    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
-
-      modules.map do |mod|
-        new(
-          :name     => mod,
-          :ensure   => :present,
-          :provider => :a2mod
-        )
-      end
-    end
-
-    def create
-        encmd resource[:name]
-    end
-
-    def destroy
-        discmd resource[:name]
-    end
-end
diff --git a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb b/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
deleted file mode 100644
index 07319dfd..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-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
-
-  def create
-    @property_hash[:ensure] = :present
-  end
-
-  def exists?
-    (!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
-  end
-
-  def destroy
-    @property_hash[:ensure] = :absent
-  end
-
-  def flush
-    self.class.flush
-  end
-
-  class << self
-    attr_reader :conf_file
-  end
-
-  def self.clear
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  def self.initvars
-    @conf_file     = "/etc/conf.d/apache2"
-    @filetype      = Puppet::Util::FileType.filetype(:flat).new(conf_file)
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  self.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
-
-      # Extract all defines
-      while apache2_opts.sub!(/-D\s+(\w+)/, '')
-        @modules << $1.downcase
-      end
-
-      # Hang on to any remaining options.
-      if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
-        @other_args = $1.strip
-      end
-
-      @modules.sort!.uniq!
-    end
-
-    @modules
-  end
-
-  def self.prefetch(resources={})
-    # Match resources with existing providers
-    instances.each do |provider|
-      if resource = resources[provider.name]
-        resource.provider = provider
-      end
-    end
-
-    # Store all resources using this provider for flushing
-    resources.each do |name, resource|
-      @mod_resources << resource
-    end
-  end
-
-  def self.instances
-    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]}
-
-    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+/, ' ')
-
-      apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
-      Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
-
-      records = filetype.read.split(/\n/)
-
-      opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
-      records[opts_index] = apache2_opts
-
-      filetype.backup
-      filetype.write(records.join("\n"))
-      @modules = mod_list
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb b/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
deleted file mode 100644
index 8f35b2e4..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-Puppet::Type.type(:a2mod).provide :modfix do
-    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
-    "
-
-    def self.instances
-        []
-    end
-end
\ No newline at end of file
diff --git a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb b/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
deleted file mode 100644
index ea5494cb..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require 'puppet/provider/a2mod'
-
-Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
-  desc "Manage Apache 2 modules on RedHat family OSs"
-
-  commands :apachectl => "apachectl"
-
-  confine :osfamily => :redhat
-  defaultfor :osfamily => :redhat
-
-  require 'pathname'
-
-  # modpath: Path to default apache modules directory /etc/httpd/mod.d
-  # modfile: Path to module load configuration file; Default: resides under modpath directory
-  # libfile: Path to actual apache module library. Added in modfile LoadModule
-
-  attr_accessor :modfile, :libfile
-  class << self
-    attr_accessor :modpath
-    def preinit
-      @modpath = "/etc/httpd/mod.d"
-    end
-  end
-
-  self.preinit
-
-  def create
-    File.open(modfile,'w') do |f|
-      f.puts "LoadModule #{resource[:identifier]} #{libfile}"
-    end
-  end
-
-  def destroy
-    File.delete(modfile)
-  end
-
-  def self.instances
-    modules = apachectl("-M").lines.collect { |line|
-      m = line.match(/(\w+)_module \(shared\)$/)
-      m[1] if m
-    }.compact
-
-    modules.map do |mod|
-      new(
-        :name     => mod,
-        :ensure   => :present,
-        :provider => :redhat
-      )
-    end
-  end
-
-  def modfile
-    modfile ||= "#{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]}"
-  end
-end
diff --git a/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb b/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
deleted file mode 100644
index 07a911e5..00000000
--- a/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-Puppet::Type.newtype(:a2mod) do
-    @doc = "Manage Apache 2 modules"
-
-    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"
-
-       isnamevar
-
-    end
-
-    newparam(:lib) do
-      desc "The name of the .so library to be loaded"
-
-      defaultto { "mod_#{@resource[:name]}.so" }
-    end
- 
-    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
-
-      defaultto { "#{resource[:name]}_module" }
-    end
-
-    autorequire(:package) { catalog.resource(:package, 'httpd')}
-
-end
diff --git a/puphpet/puppet/modules/apache/manifests/balancer.pp b/puphpet/puppet/modules/apache/manifests/balancer.pp
deleted file mode 100644
index 173aaec2..00000000
--- a/puphpet/puppet/modules/apache/manifests/balancer.pp
+++ /dev/null
@@ -1,83 +0,0 @@
-# == Define Resource Type: apache::balancer
-#
-# 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
-# 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:
-#
-# 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.
-#
-# === Parameters
-#
-# [*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
-#
-# [*proxy_set*]
-# Hash, default empty. If given, each key-value pair will be used as a ProxySet
-# line in the configuration.
-#
-# [*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': }
-#
-define apache::balancer (
-  $proxy_set = {},
-  $collect_exported = true,
-) {
-  include concat::setup
-  include ::apache::mod::proxy_balancer
-
-  $target = "${::apache::params::confd_dir}/balancer_${name}.conf"
-
-  concat { $target:
-    owner  => '0',
-    group  => '0',
-    mode   => '0644',
-    notify => Service['httpd'],
-  }
-
-  concat::fragment { "00-${name}-header":
-    ensure  => present,
-    target  => $target,
-    order   => '01',
-    content => "\n",
-  }
-
-  if $collect_exported {
-    Apache::Balancermember <<| balancer_cluster == $name |>>
-  }
-  # else: the resources have been created and they introduced their
-  # concat fragments. We don't have to do anything about them.
-
-  concat::fragment { "01-${name}-proxyset":
-    ensure  => present,
-    target  => $target,
-    order   => '19',
-    content => inline_template("<% proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= proxy_set[key] %>\n<% end %>"),
-  }
-
-  concat::fragment { "01-${name}-footer":
-    ensure  => present,
-    target  => $target,
-    order   => '20',
-    content => "\n",
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/balancermember.pp b/puphpet/puppet/modules/apache/manifests/balancermember.pp
deleted file mode 100644
index 121e2c55..00000000
--- a/puphpet/puppet/modules/apache/manifests/balancermember.pp
+++ /dev/null
@@ -1,53 +0,0 @@
-# == Define Resource Type: apache::balancermember
-#
-# 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
-# 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:
-#
-# 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.
-#
-# === Parameters
-#
-# [*name*]
-# The title of the resource is arbitrary and only utilized in the concat
-# fragment name.
-#
-# [*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.
-#
-# [*url*]
-# The url used to contact the balancer member server.
-#
-# [*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(
-  $balancer_cluster,
-  $url = "http://${::fqdn}/",
-  $options = [],
-) {
-
-  concat::fragment { "BalancerMember ${url}":
-    ensure  => present,
-    target  => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
-    content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp b/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
deleted file mode 100644
index f35c0c8b..00000000
--- a/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class apache::confd::no_accf {
-  # Template uses no variables
-  file { 'no-accf.conf':
-    ensure  => 'file',
-    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],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/default_confd_files.pp b/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
deleted file mode 100644
index c06b30c8..00000000
--- a/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
+++ /dev/null
@@ -1,15 +0,0 @@
-class apache::default_confd_files (
-  $all = true,
-) {
-  # The rest of the conf.d/* files only get loaded if we want them
-  if $all {
-    case $::osfamily {
-      'freebsd': {
-        include ::apache::confd::no_accf
-      }
-      default: {
-        # do nothing
-      }
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/default_mods.pp b/puphpet/puppet/modules/apache/manifests/default_mods.pp
deleted file mode 100644
index 03696f3d..00000000
--- a/puphpet/puppet/modules/apache/manifests/default_mods.pp
+++ /dev/null
@@ -1,161 +0,0 @@
-class apache::default_mods (
-  $all            = true,
-  $mods           = undef,
-  $apache_version = $::apache::apache_version
-) {
-  # These are modules required to run the default configuration.
-  # They are not configurable at this time, so we just include
-  # them to make sure it works.
-  case $::osfamily {
-    'redhat', 'freebsd': {
-      ::apache::mod { 'log_config': }
-      if versioncmp($apache_version, '2.4') >= 0 {
-        # Lets fork it
-        ::apache::mod { 'systemd': }
-        ::apache::mod { 'unixd': }
-      }
-    }
-    default: {}
-  }
-  ::apache::mod { 'authz_host': }
-
-  # The rest of the modules only get loaded if we want all modules enabled
-  if $all {
-    case $::osfamily {
-      'debian': {
-        include ::apache::mod::reqtimeout
-        if versioncmp($apache_version, '2.4') >= 0 {
-          ::apache::mod { 'authn_core': }
-        }
-      }
-      'redhat': {
-        include ::apache::mod::actions
-        include ::apache::mod::cache
-        include ::apache::mod::mime
-        include ::apache::mod::mime_magic
-        include ::apache::mod::vhost_alias
-        include ::apache::mod::suexec
-        include ::apache::mod::rewrite
-        include ::apache::mod::speling
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'ext_filter': }
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'substitute': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-
-        if versioncmp($apache_version, '2.4') >= 0 {
-          ::apache::mod { 'authn_core': }
-        }
-        else {
-          ::apache::mod { 'authn_alias': }
-          ::apache::mod { 'authn_default': }
-        }
-      }
-      'freebsd': {
-        include ::apache::mod::actions
-        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::vhost_alias
-        include ::apache::mod::speling
-
-        ::apache::mod { 'asis': }
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_alias': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authn_default': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'cern_meta': }
-        ::apache::mod { 'charset_lite': }
-        ::apache::mod { 'dumpio': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'file_cache': }
-        ::apache::mod { 'filter':}
-        ::apache::mod { 'imagemap':}
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'unique_id': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-      }
-      default: {}
-    }
-    case $::apache::mpm_module {
-      'prefork': {
-        include ::apache::mod::cgi
-      }
-      'worker': {
-        include ::apache::mod::cgid
-      }
-      default: {
-        # do nothing
-      }
-    }
-    include ::apache::mod::alias
-    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': }
-    ::apache::mod { 'authn_file': }
-
-      if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-
-      # lots of stuff seems to break without access_compat
-      ::apache::mod { 'access_compat': }
-    } else {
-      ::apache::mod { 'authz_default': }
-    }
-
-    ::apache::mod { 'authz_groupfile': }
-    ::apache::mod { 'authz_user': }
-    ::apache::mod { 'env': }
-  } elsif $mods {
-    ::apache::default_mods::load { $mods: }
-
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  } else {
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/default_mods/load.pp b/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
deleted file mode 100644
index 356e9fa0..00000000
--- a/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-# private define
-define apache::default_mods::load ($module = $title) {
-  if defined("apache::mod::${module}") {
-    include "::apache::mod::${module}"
-  } else {
-    ::apache::mod { $module: }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/dev.pp b/puphpet/puppet/modules/apache/manifests/dev.pp
deleted file mode 100644
index 4eaeb557..00000000
--- a/puphpet/puppet/modules/apache/manifests/dev.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-class apache::dev {
-  if $::osfamily == 'FreeBSD' and !defined(Class['apache::package']) {
-    fail('apache::dev requires apache::package; please include apache or apache::package class first')
-  }
-  include ::apache::params
-  $packages = $::apache::params::dev_packages
-  package { $packages:
-    ensure  => present,
-    require => Package['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/fastcgi/server.pp b/puphpet/puppet/modules/apache/manifests/fastcgi/server.pp
deleted file mode 100644
index afc7c886..00000000
--- a/puphpet/puppet/modules/apache/manifests/fastcgi/server.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-define apache::fastcgi::server (
-  $host          = '127.0.0.1:9000',
-  $timeout       = 15,
-  $flush         = false,
-  $faux_path     = "/var/www/${name}.fcgi",
-  $fcgi_alias    = "/${name}.fcgi",
-  $file_type     = 'application/x-httpd-php'
-) {
-  include apache::mod::fastcgi
-
-  Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title]
-
-  file { "fastcgi-pool-${name}.conf":
-    ensure  => present,
-    path    => "${::apache::confd_dir}/fastcgi-pool-${name}.conf",
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    content => template('apache/fastcgi/server.erb'),
-    require => Exec["mkdir ${::apache::confd_dir}"],
-    before  => File[$::apache::confd_dir],
-    notify  => Class['apache::service'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/init.pp b/puphpet/puppet/modules/apache/manifests/init.pp
deleted file mode 100644
index f6aa7ea3..00000000
--- a/puphpet/puppet/modules/apache/manifests/init.pp
+++ /dev/null
@@ -1,339 +0,0 @@
-# Class: apache
-#
-# This class installs Apache
-#
-# Parameters:
-#
-# Actions:
-#   - Install Apache
-#   - Manage Apache service
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache (
-  $service_name         = $::apache::params::service_name,
-  $default_mods         = true,
-  $default_vhost        = true,
-  $default_confd_files  = true,
-  $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,
-  $ip                   = undef,
-  $service_enable       = true,
-  $service_ensure       = 'running',
-  $purge_configs        = true,
-  $purge_vhost_dir      = undef,
-  $serveradmin          = 'root@localhost',
-  $sendfile             = 'On',
-  $error_documents      = false,
-  $timeout              = '120',
-  $httpd_dir            = $::apache::params::httpd_dir,
-  $server_root          = $::apache::params::server_root,
-  $confd_dir            = $::apache::params::confd_dir,
-  $vhost_dir            = $::apache::params::vhost_dir,
-  $vhost_enable_dir     = $::apache::params::vhost_enable_dir,
-  $mod_dir              = $::apache::params::mod_dir,
-  $mod_enable_dir       = $::apache::params::mod_enable_dir,
-  $mpm_module           = $::apache::params::mpm_module,
-  $conf_template        = $::apache::params::conf_template,
-  $servername           = $::apache::params::servername,
-  $manage_user          = true,
-  $manage_group         = true,
-  $user                 = $::apache::params::user,
-  $group                = $::apache::params::group,
-  $keepalive            = $::apache::params::keepalive,
-  $keepalive_timeout    = $::apache::params::keepalive_timeout,
-  $max_keepalive_requests = $apache::params::max_keepalive_requests,
-  $logroot              = $::apache::params::logroot,
-  $log_level            = $::apache::params::log_level,
-  $log_formats          = {},
-  $ports_file           = $::apache::params::ports_file,
-  $apache_version       = $::apache::version::default,
-  $server_tokens        = 'OS',
-  $server_signature     = 'On',
-  $trace_enable         = 'On',
-  $package_ensure       = 'installed',
-) inherits ::apache::params {
-  validate_bool($default_vhost)
-  validate_bool($default_ssl_vhost)
-  validate_bool($default_confd_files)
-  # true/false is sufficient for both ensure and enable
-  validate_bool($service_enable)
-
-  $valid_mpms_re = $apache_version ? {
-    '2.4'   => '(event|itk|peruser|prefork|worker)',
-    default => '(event|itk|prefork|worker)'
-  }
-
-  if $mpm_module {
-    validate_re($mpm_module, $valid_mpms_re)
-  }
-
-  # NOTE: on FreeBSD it's mpm module's responsibility to install httpd package.
-  # NOTE: the same strategy may be introduced for other OSes. For this, you
-  # should delete the 'if' block below and modify all MPM modules' manifests
-  # such that they include apache::package class (currently event.pp, itk.pp,
-  # peruser.pp, prefork.pp, worker.pp).
-  if $::osfamily != 'FreeBSD' {
-    package { 'httpd':
-      ensure => $package_ensure,
-      name   => $::apache::params::apache_name,
-      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
-  validate_bool($manage_user)
-  if $manage_user {
-    user { $user:
-      ensure  => present,
-      gid     => $group,
-      require => Package['httpd'],
-    }
-  }
-  validate_bool($manage_group)
-  if $manage_group {
-    group { $group:
-      ensure  => present,
-      require => Package['httpd']
-    }
-  }
-
-  $valid_log_level_re = '(emerg|alert|crit|error|warn|notice|info|debug)'
-
-  validate_re($log_level, $valid_log_level_re,
-  "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
-
-  class { '::apache::service':
-    service_name   => $service_name,
-    service_enable => $service_enable,
-    service_ensure => $service_ensure,
-  }
-
-  # Set purge vhostd appropriately
-  if $purge_vhost_dir == undef {
-    $_purge_vhost_dir = $purge_configs
-  } else {
-    $_purge_vhost_dir = $purge_vhost_dir
-  }
-
-  Exec {
-    path => '/bin:/sbin:/usr/bin:/usr/sbin',
-  }
-
-  exec { "mkdir ${confd_dir}":
-    creates => $confd_dir,
-    require => Package['httpd'],
-  }
-  file { $confd_dir:
-    ensure  => directory,
-    recurse => true,
-    purge   => $purge_configs,
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-
-  if ! defined(File[$mod_dir]) {
-    exec { "mkdir ${mod_dir}":
-      creates => $mod_dir,
-      require => Package['httpd'],
-    }
-    # Don't purge available modules if an enable dir is used
-    $purge_mod_dir = $purge_configs and !$mod_enable_dir
-    file { $mod_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_mod_dir,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $mod_enable_dir and ! defined(File[$mod_enable_dir]) {
-    $mod_load_dir = $mod_enable_dir
-    exec { "mkdir ${mod_enable_dir}":
-      creates => $mod_enable_dir,
-      require => Package['httpd'],
-    }
-    file { $mod_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $mod_load_dir = $mod_dir
-  }
-
-  if ! defined(File[$vhost_dir]) {
-    exec { "mkdir ${vhost_dir}":
-      creates => $vhost_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $_purge_vhost_dir,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
-    $vhost_load_dir = $vhost_enable_dir
-    exec { "mkdir ${vhost_load_dir}":
-      creates => $vhost_load_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $_purge_vhost_dir,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $vhost_load_dir = $vhost_dir
-  }
-
-  concat { $ports_file:
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-  concat::fragment { 'Apache ports header':
-    ensure  => present,
-    target  => $ports_file,
-    content => template('apache/ports_header.erb')
-  }
-
-  if $::apache::params::conf_dir and $::apache::params::conf_file {
-    case $::osfamily {
-      'debian': {
-        $docroot              = '/var/www'
-        $pidfile              = '${APACHE_PID_FILE}'
-        $error_log            = 'error.log'
-        $error_documents_path = '/usr/share/apache2/error'
-        $scriptalias          = '/usr/lib/cgi-bin'
-        $access_log_file      = 'access.log'
-      }
-      'redhat': {
-        $docroot              = '/var/www/html'
-        $pidfile              = 'run/httpd.pid'
-        $error_log            = 'error_log'
-        $error_documents_path = '/var/www/error'
-        $scriptalias          = '/var/www/cgi-bin'
-        $access_log_file      = 'access_log'
-      }
-      'freebsd': {
-        $docroot              = '/usr/local/www/apache22/data'
-        $pidfile              = '/var/run/httpd.pid'
-        $error_log            = 'httpd-error.log'
-        $error_documents_path = '/usr/local/www/apache22/error'
-        $scriptalias          = '/usr/local/www/apache22/cgi-bin'
-        $access_log_file      = 'httpd-access.log'
-      }
-      default: {
-        fail("Unsupported osfamily ${::osfamily}")
-      }
-    }
-
-    $apxs_workaround = $::osfamily ? {
-      'freebsd' => true,
-      default   => false
-    }
-
-    # Template uses:
-    # - $pidfile
-    # - $user
-    # - $group
-    # - $logroot
-    # - $error_log
-    # - $sendfile
-    # - $mod_dir
-    # - $ports_file
-    # - $confd_dir
-    # - $vhost_dir
-    # - $error_documents
-    # - $error_documents_path
-    # - $apxs_workaround
-    # - $keepalive
-    # - $keepalive_timeout
-    # - $max_keepalive_requests
-    # - $server_root
-    # - $server_tokens
-    # - $server_signature
-    # - $trace_enable
-    file { "${::apache::params::conf_dir}/${::apache::params::conf_file}":
-      ensure  => file,
-      content => template($conf_template),
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-
-    # 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':
-        all  => false,
-        mods => $default_mods,
-      }
-    } else {
-      class { '::apache::default_mods':
-        all => $default_mods,
-      }
-    }
-    class { '::apache::default_confd_files':
-      all => $default_confd_files
-    }
-    if $mpm_module {
-      class { "::apache::mod::${mpm_module}": }
-    }
-
-    $default_vhost_ensure = $default_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-    $default_ssl_vhost_ensure = $default_ssl_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-
-    ::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,
-    }
-    $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,
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/listen.pp b/puphpet/puppet/modules/apache/manifests/listen.pp
deleted file mode 100644
index e6a8a3c7..00000000
--- a/puphpet/puppet/modules/apache/manifests/listen.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-define apache::listen {
-  $listen_addr_port = $name
-
-  # Template uses: $listen_addr_port
-  concat::fragment { "Listen ${listen_addr_port}":
-    ensure  => present,
-    target  => $::apache::ports_file,
-    content => template('apache/listen.erb'),
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod.pp b/puphpet/puppet/modules/apache/manifests/mod.pp
deleted file mode 100644
index aa5ea3f3..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod.pp
+++ /dev/null
@@ -1,130 +0,0 @@
-define apache::mod (
-  $package        = undef,
-  $package_ensure = 'present',
-  $lib            = undef,
-  $lib_path       = $::apache::params::lib_path,
-  $id             = undef,
-  $path           = undef,
-  $loadfile_name  = undef,
-  $loadfiles      = undef,
-) {
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $mod = $name
-  #include apache #This creates duplicate resources in rspec-puppet
-  $mod_dir = $::apache::mod_dir
-
-  # Determine if we have special lib
-  $mod_libs = $::apache::params::mod_libs
-  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
-  if $lib {
-    $_lib = $lib
-  } elsif $mod_lib {
-    $_lib = $mod_lib
-  } else {
-    $_lib = "mod_${mod}.so"
-  }
-
-  # Determine if declaration specified a path to the module
-  if $path {
-    $_path = $path
-  } else {
-    $_path = "${lib_path}/${_lib}"
-  }
-
-  if $id {
-    $_id = $id
-  } else {
-    $_id = "${mod}_module"
-  }
-
-  if $loadfile_name {
-    $_loadfile_name = $loadfile_name
-  } else {
-    $_loadfile_name = "${mod}.load"
-  }
-
-  # Determine if we have a package
-  $mod_packages = $::apache::params::mod_packages
-  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
-  if $package {
-    $_package = $package
-  } elsif $mod_package {
-    $_package = $mod_package
-  } else {
-    $_package = undef
-  }
-  if $_package and ! defined(Package[$_package]) {
-    # note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
-    # httpd.conf with 'LoadModule' directives; here, by proper resource
-    # ordering, we ensure that our version of httpd.conf is reverted after
-    # the module gets installed.
-    $package_before = $::osfamily ? {
-      'freebsd' => [
-        File[$_loadfile_name],
-        File["${::apache::params::conf_dir}/${::apache::params::conf_file}"]
-      ],
-      default => File[$_loadfile_name],
-    }
-    # $_package may be an array
-    package { $_package:
-      ensure  => $package_ensure,
-      require => Package['httpd'],
-      before  => $package_before,
-    }
-  }
-
-  file { "${_loadfile_name}":
-    ensure  => file,
-    path    => "${mod_dir}/${_loadfile_name}",
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    content => template('apache/mod/load.erb'),
-    require => [
-      Package['httpd'],
-      Exec["mkdir ${mod_dir}"],
-    ],
-    before  => File[$mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  if $::osfamily == 'Debian' {
-    $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    => '0644',
-      require => [
-        File[$_loadfile_name],
-        Exec["mkdir ${enable_dir}"],
-      ],
-      before  => File[$enable_dir],
-      notify  => Service['httpd'],
-    }
-    # Each module may have a .conf file as well, which should be
-    # defined in the class apache::mod::module
-    # Some modules do not require this file.
-    if defined(File["${mod}.conf"]) {
-      file{ "${mod}.conf symlink":
-        ensure  => link,
-        path    => "${enable_dir}/${mod}.conf",
-        target  => "${mod_dir}/${mod}.conf",
-        owner   => 'root',
-        group   => $::apache::params::root_group,
-        mode    => '0644',
-        require => [
-          File["${mod}.conf"],
-          Exec["mkdir ${enable_dir}"],
-        ],
-        before  => File[$enable_dir],
-        notify  => Service['httpd'],
-      }
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/actions.pp b/puphpet/puppet/modules/apache/manifests/mod/actions.pp
deleted file mode 100644
index 3b60f297..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/actions.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::actions {
-  apache::mod { 'actions': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/alias.pp b/puphpet/puppet/modules/apache/manifests/mod/alias.pp
deleted file mode 100644
index ee017b49..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/alias.pp
+++ /dev/null
@@ -1,19 +0,0 @@
-class apache::mod::alias(
-  $apache_version = $apache::apache_version
-) {
-  $icons_path = $::osfamily ? {
-    'debian'  => '/usr/share/apache2/icons',
-    'redhat'  => '/var/www/icons',
-    'freebsd' => '/usr/local/www/apache22/icons',
-  }
-  apache::mod { 'alias': }
-  # Template uses $icons_path
-  file { 'alias.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/alias.conf",
-    content => template('apache/mod/alias.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp b/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
deleted file mode 100644
index cacfafa4..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::auth_basic {
-  ::apache::mod { 'auth_basic': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp b/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
deleted file mode 100644
index 6b53262a..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::auth_kerb {
-  ::apache::mod { 'auth_kerb': }
-}
-
-
diff --git a/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp b/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
deleted file mode 100644
index 800e656e..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
+++ /dev/null
@@ -1,19 +0,0 @@
-class apache::mod::authnz_ldap (
-  $verifyServerCert = true,
-) {
-  include '::apache::mod::ldap'
-  ::apache::mod { 'authnz_ldap': }
-
-  validate_bool($verifyServerCert)
-
-  # Template uses:
-  # - $verifyServerCert
-  file { 'authnz_ldap.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/authnz_ldap.conf",
-    content => template('apache/mod/authnz_ldap.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp b/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
deleted file mode 100644
index f5f0f074..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::autoindex {
-  ::apache::mod { 'autoindex': }
-  # Template uses no variables
-  file { 'autoindex.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/autoindex.conf",
-    content => template('apache/mod/autoindex.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/cache.pp b/puphpet/puppet/modules/apache/manifests/mod/cache.pp
deleted file mode 100644
index 4ab9f44b..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/cache.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::cache {
-  ::apache::mod { 'cache': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/cgi.pp b/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
deleted file mode 100644
index 6c3c6aec..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::cgi {
-  Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
-  ::apache::mod { 'cgi': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/cgid.pp b/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
deleted file mode 100644
index 5c89251a..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-class apache::mod::cgid {
-  Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
-
-  # Debian specifies it's cgid sock path, but RedHat uses the default value
-  # with no config file
-  $cgisock_path = $::osfamily ? {
-    'debian'  => '${APACHE_RUN_DIR}/cgisock',
-    'freebsd' => 'cgisock',
-    default   => undef,
-  }
-  ::apache::mod { 'cgid': }
-  if $cgisock_path {
-    # Template uses $cgisock_path
-    file { 'cgid.conf':
-      ensure  => file,
-      path    => "${::apache::mod_dir}/cgid.conf",
-      content => template('apache/mod/cgid.conf.erb'),
-      require => Exec["mkdir ${::apache::mod_dir}"],
-      before  => File[$::apache::mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/dav.pp b/puphpet/puppet/modules/apache/manifests/mod/dav.pp
deleted file mode 100644
index ade9c080..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/dav.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::dav {
-  ::apache::mod { 'dav': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp b/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
deleted file mode 100644
index 482f3161..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-class apache::mod::dav_fs {
-  $dav_lock = $::osfamily ? {
-    'debian'  => '${APACHE_LOCK_DIR}/DAVLock',
-    'freebsd' => '/usr/local/var/DavLock',
-    default   => '/var/lib/dav/lockdb',
-  }
-
-  Class['::apache::mod::dav'] -> Class['::apache::mod::dav_fs']
-  ::apache::mod { 'dav_fs': }
-
-  # Template uses: $dav_lock
-  file { 'dav_fs.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/dav_fs.conf",
-    content => template('apache/mod/dav_fs.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp b/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
deleted file mode 100644
index c46976e8..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-class apache::mod::dav_svn (
-  $authz_svn_enabled = false,
-) {
-    Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
-    include ::apache::mod::dav
-    ::apache::mod { 'dav_svn': }
-
-    if $authz_svn_enabled {
-      ::apache::mod { 'authz_svn':
-        loadfile_name => $::osfamily ? {
-          'Debian' => undef,
-          default  => 'dav_svn_authz_svn.load',
-        },
-        require       => Apache::Mod['dav_svn'],
-      }
-    }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/deflate.pp b/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
deleted file mode 100644
index 561cbadb..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class apache::mod::deflate (
-  $types = [
-    'text/html text/plain text/xml',
-    'text/css',
-    'application/x-javascript application/javascript application/ecmascript',
-    'application/rss+xml'
-  ],
-  $notes = {
-    'Input'  => 'instream',
-    'Output' => 'outstream',
-    'Ratio'  => 'ratio'
-  }
-) {
-  ::apache::mod { 'deflate': }
-
-  file { 'deflate.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/deflate.conf",
-    content => template('apache/mod/deflate.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/dev.pp b/puphpet/puppet/modules/apache/manifests/mod/dev.pp
deleted file mode 100644
index 5abdedd3..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/dev.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::dev {
-  # Development packages are not apache modules
-  warning('apache::mod::dev is deprecated; please use apache::dev')
-  include ::apache::dev
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/dir.pp b/puphpet/puppet/modules/apache/manifests/mod/dir.pp
deleted file mode 100644
index 11631305..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/dir.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
-class apache::mod::dir (
-  $dir     = 'public_html',
-  $indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
-) {
-  validate_array($indexes)
-  ::apache::mod { 'dir': }
-
-  # Template uses
-  # - $indexes
-  file { 'dir.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/dir.conf",
-    content => template('apache/mod/dir.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp b/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
deleted file mode 100644
index 13c9c783..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class apache::mod::disk_cache {
-  $cache_root = $::osfamily ? {
-    'debian'  => '/var/cache/apache2/mod_disk_cache',
-    'redhat'  => '/var/cache/mod_proxy',
-    'freebsd' => '/var/cache/mod_disk_cache',
-  }
-  if $::osfamily != 'FreeBSD' {
-    # FIXME: investigate why disk_cache was dependent on proxy
-    # NOTE: on FreeBSD disk_cache is compiled by default but proxy is not
-    Class['::apache::mod::proxy'] -> Class['::apache::mod::disk_cache']
-  }
-  Class['::apache::mod::cache'] -> Class['::apache::mod::disk_cache']
-
-  apache::mod { 'disk_cache': }
-  # Template uses $cache_proxy
-  file { 'disk_cache.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/disk_cache.conf",
-    content => template('apache/mod/disk_cache.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/event.pp b/puphpet/puppet/modules/apache/manifests/mod/event.pp
deleted file mode 100644
index cb7ed96c..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/event.pp
+++ /dev/null
@@ -1,62 +0,0 @@
-class apache::mod::event (
-  $startservers        = '2',
-  $maxclients          = '150',
-  $minsparethreads     = '25',
-  $maxsparethreads     = '75',
-  $threadsperchild     = '25',
-  $maxrequestsperchild = '0',
-  $serverlimit         = '25',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::event and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::event and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::event and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::event and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $maxclients
-  # - $minsparethreads
-  # - $maxsparethreads
-  # - $threadsperchild
-  # - $maxrequestsperchild
-  # - $serverlimit
-  file { "${::apache::mod_dir}/event.conf":
-    ensure  => file,
-    content => template('apache/mod/event.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        apache::mpm{ 'event':
-          apache_version => $apache_version,
-        }
-      }
-    }
-    'debian','freebsd' : {
-      apache::mpm{ 'event':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/expires.pp b/puphpet/puppet/modules/apache/manifests/mod/expires.pp
deleted file mode 100644
index aae4c59d..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/expires.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::expires {
-  ::apache::mod { 'expires': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp b/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
deleted file mode 100644
index a185bb31..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class apache::mod::fastcgi {
-
-  # Debian specifies it's fastcgi lib path, but RedHat uses the default value
-  # with no config file
-  $fastcgi_lib_path = $::apache::params::fastcgi_lib_path
-
-  ::apache::mod { 'fastcgi': }
-
-  if $fastcgi_lib_path {
-    # Template uses:
-    # - $fastcgi_server
-    # - $fastcgi_socket
-    # - $fastcgi_dir
-    file { 'fastcgi.conf':
-      ensure  => file,
-      path    => "${::apache::mod_dir}/fastcgi.conf",
-      content => template('apache/mod/fastcgi.conf.erb'),
-      require => Exec["mkdir ${::apache::mod_dir}"],
-      before  => File[$::apache::mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp b/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
deleted file mode 100644
index 70997768..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-class apache::mod::fcgid(
-  $options = {},
-) {
-  ::apache::mod { 'fcgid': }
-
-  # Template uses:
-  # - $options
-  file { 'fcgid.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/fcgid.conf",
-    content => template('apache/mod/fcgid.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/headers.pp b/puphpet/puppet/modules/apache/manifests/mod/headers.pp
deleted file mode 100644
index d18c5e27..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/headers.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::headers {
-  ::apache::mod { 'headers': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/include.pp b/puphpet/puppet/modules/apache/manifests/mod/include.pp
deleted file mode 100644
index edbe81f3..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/include.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::include {
-  ::apache::mod { 'include': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/info.pp b/puphpet/puppet/modules/apache/manifests/mod/info.pp
deleted file mode 100644
index 2c3d56ed..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/info.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-class apache::mod::info (
-  $allow_from      = ['127.0.0.1','::1'],
-  $apache_version  = $::apache::apache_version,
-  $restrict_access = true,
-){
-  apache::mod { 'info': }
-  # Template uses
-  # $allow_from
-  # $apache_version
-  file { 'info.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/info.conf",
-    content => template('apache/mod/info.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/itk.pp b/puphpet/puppet/modules/apache/manifests/mod/itk.pp
deleted file mode 100644
index 1083e5ed..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/itk.pp
+++ /dev/null
@@ -1,53 +0,0 @@
-class apache::mod::itk (
-  $startservers        = '8',
-  $minspareservers     = '5',
-  $maxspareservers     = '20',
-  $serverlimit         = '256',
-  $maxclients          = '256',
-  $maxrequestsperchild = '4000',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::itk and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::itk and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::itk and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $minspareservers
-  # - $maxspareservers
-  # - $serverlimit
-  # - $maxclients
-  # - $maxrequestsperchild
-  file { "${::apache::mod_dir}/itk.conf":
-    ensure  => file,
-    content => template('apache/mod/itk.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'debian', 'freebsd': {
-      apache::mpm{ 'itk':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/ldap.pp b/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
deleted file mode 100644
index d3b17ff5..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::ldap (
-  $apache_version = $::apache::apache_version,
-){
-  ::apache::mod { 'ldap': }
-  # Template uses $apache_version
-  file { 'ldap.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/ldap.conf",
-    content => template('apache/mod/ldap.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/mime.pp b/puphpet/puppet/modules/apache/manifests/mod/mime.pp
deleted file mode 100644
index ccdb5d4b..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/mime.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-class apache::mod::mime (
-  $mime_support_package = $::apache::params::mime_support_package,
-  $mime_types_config    = $::apache::params::mime_types_config,
-) {
-  apache::mod { 'mime': }
-  # Template uses $mime_types_config
-  file { 'mime.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/mime.conf",
-    content => template('apache/mod/mime.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-  if $mime_support_package {
-    package { $mime_support_package:
-      ensure => 'installed',
-      before => File['mime.conf'],
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp b/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
deleted file mode 100644
index 9de8bc4b..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::mime_magic (
-  $magic_file = "${::apache::params::conf_dir}/magic"
-) {
-  apache::mod { 'mime_magic': }
-  # Template uses $magic_file
-  file { 'mime_magic.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/mime_magic.conf",
-    content => template('apache/mod/mime_magic.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp b/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
deleted file mode 100644
index 0bdbfdc3..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-class apache::mod::negotiation (
-  $force_language_priority = 'Prefer Fallback',
-  $language_priority = [ 'en', 'ca', 'cs', 'da', 'de', 'el', 'eo', 'es', 'et',
-                        'fr', 'he', 'hr', 'it', 'ja', 'ko', 'ltz', 'nl', 'nn',
-                        'no', 'pl', 'pt', 'pt-BR', 'ru', 'sv', 'zh-CN',
-                        'zh-TW' ],
-) {
-  if !is_array($force_language_priority) and !is_string($force_language_priority) {
-    fail('force_languague_priority must be a string or array of strings')
-  }
-  if !is_array($language_priority) and !is_string($language_priority) {
-    fail('force_languague_priority must be a string or array of strings')
-  }
-
-  ::apache::mod { 'negotiation': }
-  # Template uses no variables
-  file { 'negotiation.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/negotiation.conf",
-    content => template('apache/mod/negotiation.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/nss.pp b/puphpet/puppet/modules/apache/manifests/mod/nss.pp
deleted file mode 100644
index f0eff1cd..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/nss.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-class apache::mod::nss (
-  $transfer_log = "${::apache::params::logroot}/access.log",
-  $error_log    = "${::apache::params::logroot}/error.log",
-  $passwd_file  = undef
-) {
-  include ::apache::mod::mime
-
-  apache::mod { 'nss': }
-
-  $httpd_dir = $::apache::httpd_dir
-
-  # Template uses:
-  # $transfer_log
-  # $error_log
-  # $http_dir
-  # passwd_file
-  file { 'nss.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/nss.conf",
-    content => template('apache/mod/nss.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp b/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
deleted file mode 100644
index 8c1c03bd..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-class apache::mod::pagespeed (
-  $inherit_vhost_config          = 'on',
-  $filter_xhtml                  = false,
-  $cache_path                    = '/var/cache/mod_pagespeed/',
-  $log_dir                       = '/var/log/pagespeed',
-  $memache_servers               = [],
-  $rewrite_level                 = 'CoreFilters',
-  $disable_filters               = [],
-  $enable_filters                = [],
-  $forbid_filters                = [],
-  $rewrite_deadline_per_flush_ms = 10,
-  $additional_domains            = undef,
-  $file_cache_size_kb            = 102400,
-  $file_cache_clean_interval_ms  = 3600000,
-  $lru_cache_per_process         = 1024,
-  $lru_cache_byte_limit          = 16384,
-  $css_flatten_max_bytes         = 2048,
-  $css_inline_max_bytes          = 2048,
-  $css_image_inline_max_bytes    = 2048,
-  $image_inline_max_bytes        = 2048,
-  $js_inline_max_bytes           = 2048,
-  $css_outline_min_bytes         = 3000,
-  $js_outline_min_bytes          = 3000,
-  $inode_limit                   = 500000,
-  $image_max_rewrites_at_once    = 8,
-  $num_rewrite_threads           = 4,
-  $num_expensive_rewrite_threads = 4,
-  $collect_statistics            = 'on',
-  $statistics_logging            = 'on',
-  $allow_view_stats              = [],
-  $allow_pagespeed_console       = [],
-  $allow_pagespeed_message       = [],
-  $message_buffer_size           = 100000,
-  $additional_configuration      = {},
-  $apache_version                = $::apache::apache_version,
-){
-
-  $_lib = $::apache::apache_version ? {
-    '2.4'   => 'mod_pagespeed_ap24.so',
-    default => undef
-  }
-
-  apache::mod { 'pagespeed':
-    lib => $_lib,
-  }
-
-  file { 'pagespeed.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/pagespeed.conf",
-    content => template('apache/mod/pagespeed.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/passenger.pp b/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
deleted file mode 100644
index 12139cb2..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
+++ /dev/null
@@ -1,86 +0,0 @@
-class apache::mod::passenger (
-  $passenger_conf_file            = $::apache::params::passenger_conf_file,
-  $passenger_conf_package_file    = $::apache::params::passenger_conf_package_file,
-  $passenger_high_performance     = undef,
-  $passenger_pool_idle_time       = undef,
-  $passenger_max_requests         = undef,
-  $passenger_stat_throttle_rate   = undef,
-  $rack_autodetect                = undef,
-  $rails_autodetect               = undef,
-  $passenger_root                 = $::apache::params::passenger_root,
-  $passenger_ruby                 = $::apache::params::passenger_ruby,
-  $passenger_default_ruby         = $::apache::params::passenger_default_ruby,
-  $passenger_max_pool_size        = undef,
-  $passenger_use_global_queue     = undef,
-  $mod_package                    = undef,
-  $mod_package_ensure             = undef,
-  $mod_lib                        = undef,
-  $mod_lib_path                   = undef,
-  $mod_id                         = undef,
-  $mod_path                       = undef,
-) {
-  # Managed by the package, but declare it to avoid purging
-  if $passenger_conf_package_file {
-    file { 'passenger_package.conf':
-      path => "${::apache::mod_dir}/${passenger_conf_package_file}",
-    }
-  } else {
-    # Remove passenger_extra.conf left over from before Passenger support was
-    # reworked for Debian. This is a temporary fix for users running this
-    # module from master after release 1.0.1 It will be removed in two
-    # releases from now.
-    $passenger_package_conf_ensure = $::osfamily ? {
-      'Debian' => 'absent',
-      default  => undef,
-    }
-
-    file { 'passenger_package.conf':
-      ensure => $passenger_package_conf_ensure,
-      path   => "${::apache::mod_dir}/passenger_extra.conf",
-    }
-  }
-
-  $_package = $mod_package
-  $_package_ensure = $mod_package_ensure
-  $_lib = $mod_lib
-  if $::osfamily == 'FreeBSD' {
-    if $mod_lib_path {
-      $_lib_path = $mod_lib_path
-    } else {
-      $_lib_path = "${passenger_root}/buildout/apache2"
-    }
-  } else {
-    $_lib_path = $mod_lib_path
-  }
-
-  $_id = $mod_id
-  $_path = $mod_path
-  ::apache::mod { 'passenger':
-    package        => $_package,
-    package_ensure => $_package_ensure,
-    lib            => $_lib,
-    lib_path       => $_lib_path,
-    id             => $_id,
-    path           => $_path,
-  }
-
-  # Template uses:
-  # - $passenger_root
-  # - $passenger_ruby
-  # - $passenger_default_ruby
-  # - $passenger_max_pool_size
-  # - $passenger_high_performance
-  # - $passenger_max_requests
-  # - $passenger_stat_throttle_rate
-  # - $passenger_use_global_queue
-  # - $rack_autodetect
-  # - $rails_autodetect
-  file { 'passenger.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/${passenger_conf_file}",
-    content => template('apache/mod/passenger.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/perl.pp b/puphpet/puppet/modules/apache/manifests/mod/perl.pp
deleted file mode 100644
index b57f25fd..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/perl.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::perl {
-  ::apache::mod { 'perl': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/peruser.pp b/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
deleted file mode 100644
index 518655a1..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
+++ /dev/null
@@ -1,73 +0,0 @@
-class apache::mod::peruser (
-  $minspareprocessors = '2',
-  $minprocessors = '2',
-  $maxprocessors = '10',
-  $maxclients = '150',
-  $maxrequestsperchild = '1000',
-  $idletimeout = '120',
-  $expiretimeout = '120',
-  $keepalive = 'Off',
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::peruser and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::peruser and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::peruser and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::peruser and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  $mod_dir = $::apache::mod_dir
-
-  # Template uses:
-  # - $minspareprocessors
-  # - $minprocessors
-  # - $maxprocessors
-  # - $maxclients
-  # - $maxrequestsperchild
-  # - $idletimeout
-  # - $expiretimeout
-  # - $keepalive
-  # - $mod_dir
-  file { "${::apache::mod_dir}/peruser.conf":
-    ensure  => file,
-    content => template('apache/mod/peruser.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-  file { "${::apache::mod_dir}/peruser":
-    ensure  => directory,
-    require => File[$::apache::mod_dir],
-  }
-  file { "${::apache::mod_dir}/peruser/multiplexers":
-    ensure  => directory,
-    require => File["${::apache::mod_dir}/peruser"],
-  }
-  file { "${::apache::mod_dir}/peruser/processors":
-    ensure  => directory,
-    require => File["${::apache::mod_dir}/peruser"],
-  }
-
-  ::apache::peruser::multiplexer { '01-default': }
-
-  case $::osfamily {
-    'freebsd' : {
-      class { '::apache::package':
-        mpm_module => 'peruser'
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/php.pp b/puphpet/puppet/modules/apache/manifests/mod/php.pp
deleted file mode 100644
index a94bfe50..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/php.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-class apache::mod::php (
-  $package_name   = undef,
-  $package_ensure = 'present',
-  $path           = undef,
-  $extensions     = ['.php'],
-  $content        = undef,
-  $template       = 'apache/mod/php5.conf.erb',
-  $source         = undef,
-) {
-  if ! defined(Class['apache::mod::prefork']) {
-    fail('apache::mod::php requires apache::mod::prefork; please enable mpm_module => \'prefork\' on Class[\'apache\']')
-  }
-  validate_array($extensions)
-
-  if $source and ($content or $template != 'apache/mod/php5.conf.erb') {
-    warning('source and content or template parameters are provided. source parameter will be used')
-  } elsif $content and $template != 'apache/mod/php5.conf.erb' {
-    warning('content and template parameters are provided. content parameter will be used')
-  }
-
-  $manage_content = $source ? {
-    undef   => $content ? {
-      undef   => template($template),
-      default => $content,
-    },
-    default => undef,
-  }
-
-  ::apache::mod { 'php5':
-    package        => $package_name,
-    package_ensure => $package_ensure,
-    path           => $path,
-  }
-
-  include ::apache::mod::mime
-  include ::apache::mod::dir
-  Class['::apache::mod::mime'] -> Class['::apache::mod::dir'] -> Class['::apache::mod::php']
-
-  # Template uses $extensions
-  file { 'php5.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/php5.conf",
-    owner   => 'root',
-    group   => 'root',
-    mode    => '0644',
-    content => $manage_content,
-    source  => $source,
-    require => [
-      Class['::apache::mod::prefork'],
-      Exec["mkdir ${::apache::mod_dir}"],
-    ],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/prefork.pp b/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
deleted file mode 100644
index b3adeae8..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
+++ /dev/null
@@ -1,70 +0,0 @@
-class apache::mod::prefork (
-  $startservers        = '8',
-  $minspareservers     = '5',
-  $maxspareservers     = '20',
-  $serverlimit         = '256',
-  $maxclients          = '256',
-  $maxrequestsperchild = '4000',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::prefork and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $minspareservers
-  # - $maxspareservers
-  # - $serverlimit
-  # - $maxclients
-  # - $maxrequestsperchild
-  file { "${::apache::mod_dir}/prefork.conf":
-    ensure  => file,
-    content => template('apache/mod/prefork.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        ::apache::mpm{ 'prefork':
-          apache_version => $apache_version,
-        }
-      }
-      else {
-        file_line { '/etc/sysconfig/httpd prefork enable':
-          ensure  => present,
-          path    => '/etc/sysconfig/httpd',
-          line    => '#HTTPD=/usr/sbin/httpd.worker',
-          match   => '#?HTTPD=/usr/sbin/httpd.worker',
-          require => Package['httpd'],
-          notify  => Service['httpd'],
-        }
-      }
-    }
-    'debian', 'freebsd' : {
-      ::apache::mpm{ 'prefork':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/proxy.pp b/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
deleted file mode 100644
index 03c1e78c..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-class apache::mod::proxy (
-  $proxy_requests = 'Off',
-  $allow_from = undef,
-  $apache_version = $::apache::apache_version,
-) {
-  ::apache::mod { 'proxy': }
-  # Template uses $proxy_requests, $apache_version
-  file { 'proxy.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/proxy.conf",
-    content => template('apache/mod/proxy.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp b/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
deleted file mode 100644
index a011a178..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::proxy_ajp {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_ajp']
-  ::apache::mod { 'proxy_ajp': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp b/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
deleted file mode 100644
index 5a0768d8..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class apache::mod::proxy_balancer {
-
-  include ::apache::mod::proxy
-  include ::apache::mod::proxy_http
-
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_balancer']
-  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_balancer']
-  ::apache::mod { 'proxy_balancer': }
-
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp b/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
deleted file mode 100644
index 549eb117..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
+++ /dev/null
@@ -1,37 +0,0 @@
-class apache::mod::proxy_html {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_html']
-  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_html']
-
-  # Add libxml2
-  case $::osfamily {
-    /RedHat|FreeBSD/: {
-      ::apache::mod { 'xml2enc': }
-      $loadfiles = undef
-    }
-    'Debian': {
-      $gnu_path = $::hardwaremodel ? {
-        'i686'  => 'i386',
-        default => $::hardwaremodel,
-      }
-      $loadfiles = $::apache::params::distrelease ? {
-        '6'     => ['/usr/lib/libxml2.so.2'],
-        '10'    => ['/usr/lib/libxml2.so.2'],
-        default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
-      }
-    }
-  }
-
-  ::apache::mod { 'proxy_html':
-    loadfiles => $loadfiles,
-  }
-
-  # Template uses $icons_path
-  file { 'proxy_html.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/proxy_html.conf",
-    content => template('apache/mod/proxy_html.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp b/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
deleted file mode 100644
index 1579e68e..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::proxy_http {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_http']
-  ::apache::mod { 'proxy_http': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/python.pp b/puphpet/puppet/modules/apache/manifests/mod/python.pp
deleted file mode 100644
index e326c8d7..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/python.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::python {
-  ::apache::mod { 'python': }
-}
-
-
diff --git a/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp b/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
deleted file mode 100644
index 80b30183..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::reqtimeout {
-  ::apache::mod { 'reqtimeout': }
-  # Template uses no variables
-  file { 'reqtimeout.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/reqtimeout.conf",
-    content => template('apache/mod/reqtimeout.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp b/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
deleted file mode 100644
index 694f0b6f..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::rewrite {
-  include ::apache::params
-  ::apache::mod { 'rewrite': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp b/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
deleted file mode 100644
index 6fbc1d4e..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-class apache::mod::rpaf (
-  $sethostname = true,
-  $proxy_ips   = [ '127.0.0.1' ],
-  $header      = 'X-Forwarded-For'
-) {
-  ::apache::mod { 'rpaf': }
-
-  # Template uses:
-  # - $sethostname
-  # - $proxy_ips
-  # - $header
-  file { 'rpaf.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/rpaf.conf",
-    content => template('apache/mod/rpaf.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp b/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
deleted file mode 100644
index 15b1441d..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::setenvif {
-  ::apache::mod { 'setenvif': }
-  # Template uses no variables
-  file { 'setenvif.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/setenvif.conf",
-    content => template('apache/mod/setenvif.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/speling.pp b/puphpet/puppet/modules/apache/manifests/mod/speling.pp
deleted file mode 100644
index eb46d78f..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/speling.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::speling {
-  ::apache::mod { 'speling': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/ssl.pp b/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
deleted file mode 100644
index 01591485..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
+++ /dev/null
@@ -1,56 +0,0 @@
-class apache::mod::ssl (
-  $ssl_compression = false,
-  $ssl_options     = [ 'StdEnvVars' ],
-  $ssl_cipher      = 'HIGH:MEDIUM:!aNULL:!MD5',
-  $apache_version  = $::apache::apache_version,
-) {
-  $session_cache = $::osfamily ? {
-    'debian'  => '${APACHE_RUN_DIR}/ssl_scache(512000)',
-    'redhat'  => '/var/cache/mod_ssl/scache(512000)',
-    'freebsd' => '/var/run/ssl_scache(512000)',
-  }
-
-  case $::osfamily {
-    'debian': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        $ssl_mutex = 'default'
-      } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' {
-        $ssl_mutex = 'file:/var/run/apache2/ssl_mutex'
-      } else {
-        $ssl_mutex = 'file:${APACHE_RUN_DIR}/ssl_mutex'
-      }
-    }
-    'redhat': {
-      $ssl_mutex = 'default'
-    }
-    'freebsd': {
-      $ssl_mutex = 'default'
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-
-  ::apache::mod { 'ssl': }
-
-  if versioncmp($apache_version, '2.4') >= 0 {
-    ::apache::mod { 'socache_shmcb': }
-  }
-
-  # Template uses
-  #
-  # $ssl_compression
-  # $ssl_options
-  # $session_cache,
-  # $ssl_mutex
-  # $apache_version
-  #
-  file { 'ssl.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/ssl.conf",
-    content => template('apache/mod/ssl.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/status.pp b/puphpet/puppet/modules/apache/manifests/mod/status.pp
deleted file mode 100644
index cfab5d58..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/status.pp
+++ /dev/null
@@ -1,43 +0,0 @@
-# Class: apache::mod::status
-#
-# This class enables and configures Apache mod_status
-# See: http://httpd.apache.org/docs/current/mod/mod_status.html
-#
-# Parameters:
-# - $allow_from is an array of hosts, ip addresses, partial network numbers
-#   or networks in CIDR notation specifying what hosts can view the special
-#   /server-status URL.  Defaults to ['127.0.0.1', '::1'].
-# - $extended_status track and display extended status information. Valid
-#   values are 'On' or 'Off'.  Defaults to 'On'.
-#
-# Actions:
-# - Enable and configure Apache mod_status
-#
-# Requires:
-# - The apache class
-#
-# Sample Usage:
-#
-#  # Simple usage allowing access from localhost and a private subnet
-#  class { 'apache::mod::status':
-#    $allow_from => ['127.0.0.1', '10.10.10.10/24'],
-#  }
-#
-class apache::mod::status (
-  $allow_from      = ['127.0.0.1','::1'],
-  $extended_status = 'On',
-  $apache_version = $::apache::apache_version,
-){
-  validate_array($allow_from)
-  validate_re(downcase($extended_status), '^(on|off)$', "${extended_status} is not supported for extended_status.  Allowed values are 'On' and 'Off'.")
-  ::apache::mod { 'status': }
-  # Template uses $allow_from, $extended_status, $apache_version
-  file { 'status.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/status.conf",
-    content => template('apache/mod/status.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/suexec.pp b/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
deleted file mode 100644
index ded013d4..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::suexec {
-  ::apache::mod { 'suexec': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/suphp.pp b/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
deleted file mode 100644
index f9a572f4..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::suphp (
-){
-  ::apache::mod { 'suphp': }
-
-  file {'suphp.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/suphp.conf",
-    content => template('apache/mod/suphp.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd']
-  }
-}
-
diff --git a/puphpet/puppet/modules/apache/manifests/mod/userdir.pp b/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
deleted file mode 100644
index accfe64a..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-class apache::mod::userdir (
-  $home = '/home',
-  $dir = 'public_html',
-  $disable_root = true,
-  $apache_version = $::apache::apache_version,
-) {
-  ::apache::mod { 'userdir': }
-
-  # Template uses $home, $dir, $disable_root, $apache_version
-  file { 'userdir.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/userdir.conf",
-    content => template('apache/mod/userdir.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp b/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
deleted file mode 100644
index 30ae122e..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::vhost_alias {
-  ::apache::mod { 'vhost_alias': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/worker.pp b/puphpet/puppet/modules/apache/manifests/mod/worker.pp
deleted file mode 100644
index 0d281596..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/worker.pp
+++ /dev/null
@@ -1,74 +0,0 @@
-class apache::mod::worker (
-  $startservers        = '2',
-  $maxclients          = '150',
-  $minsparethreads     = '25',
-  $maxsparethreads     = '75',
-  $threadsperchild     = '25',
-  $maxrequestsperchild = '0',
-  $serverlimit         = '25',
-  $threadlimit         = '64',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::worker and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::worker and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::worker and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::worker and apache::mod::prefork on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $maxclients
-  # - $minsparethreads
-  # - $maxsparethreads
-  # - $threadsperchild
-  # - $maxrequestsperchild
-  # - $serverlimit
-  # - $threadLimit
-  file { "${::apache::mod_dir}/worker.conf":
-    ensure  => file,
-    content => template('apache/mod/worker.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        ::apache::mpm{ 'worker':
-          apache_version => $apache_version,
-        }
-      }
-      else {
-        file_line { '/etc/sysconfig/httpd worker enable':
-          ensure  => present,
-          path    => '/etc/sysconfig/httpd',
-          line    => 'HTTPD=/usr/sbin/httpd.worker',
-          match   => '#?HTTPD=/usr/sbin/httpd.worker',
-          require => Package['httpd'],
-          notify  => Service['httpd'],
-        }
-      }
-    }
-    'debian', 'freebsd': {
-      ::apache::mpm{ 'worker':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp b/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
deleted file mode 100644
index 244a3458..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-class apache::mod::wsgi (
-  $wsgi_socket_prefix = undef,
-  $wsgi_python_path   = undef,
-  $wsgi_python_home   = undef,
-){
-  ::apache::mod { 'wsgi': }
-
-  # Template uses:
-  # - $wsgi_socket_prefix
-  # - $wsgi_python_path
-  # - $wsgi_python_home
-  file {'wsgi.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/wsgi.conf",
-    content => template('apache/mod/wsgi.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd']
-  }
-}
-
diff --git a/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp b/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
deleted file mode 100644
index 7c5e8843..00000000
--- a/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::xsendfile {
-  include ::apache::params
-  ::apache::mod { 'xsendfile': }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/mpm.pp b/puphpet/puppet/modules/apache/manifests/mpm.pp
deleted file mode 100644
index 6437016b..00000000
--- a/puphpet/puppet/modules/apache/manifests/mpm.pp
+++ /dev/null
@@ -1,68 +0,0 @@
-define apache::mpm (
-  $lib_path       = $::apache::params::lib_path,
-  $apache_version = $::apache::apache_version,
-) {
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $mpm     = $name
-  $mod_dir = $::apache::mod_dir
-
-  $_lib  = "mod_mpm_${mpm}.so"
-  $_path = "${lib_path}/${_lib}"
-  $_id   = "mpm_${mpm}_module"
-
-  if versioncmp($apache_version, '2.4') >= 0 {
-    file { "${mod_dir}/${mpm}.load":
-      ensure  => file,
-      path    => "${mod_dir}/${mpm}.load",
-      content => "LoadModule ${_id} ${_path}\n",
-      require => [
-        Package['httpd'],
-        Exec["mkdir ${mod_dir}"],
-      ],
-      before  => File[$mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-
-  case $::osfamily {
-    'debian': {
-      file { "${::apache::mod_enable_dir}/${mpm}.conf":
-        ensure  => link,
-        target  => "${::apache::mod_dir}/${mpm}.conf",
-        require => Exec["mkdir ${::apache::mod_enable_dir}"],
-        before  => File[$::apache::mod_enable_dir],
-        notify  => Service['httpd'],
-      }
-
-      if versioncmp($apache_version, '2.4') >= 0 {
-        file { "${::apache::mod_enable_dir}/${mpm}.load":
-          ensure  => link,
-          target  => "${::apache::mod_dir}/${mpm}.load",
-          require => Exec["mkdir ${::apache::mod_enable_dir}"],
-          before  => File[$::apache::mod_enable_dir],
-          notify  => Service['httpd'],
-        }
-      }
-
-      if versioncmp($apache_version, '2.4') < 0 {
-        package { "apache2-mpm-${mpm}":
-          ensure => present,
-        }
-      }
-    }
-    'freebsd': {
-      class { '::apache::package':
-        mpm_module => $mpm
-      }
-    }
-    'redhat': {
-      # so we don't fail
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp b/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
deleted file mode 100644
index f8c3a80d..00000000
--- a/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-define apache::namevirtualhost {
-  $addr_port = $name
-
-  # Template uses: $addr_port
-  concat::fragment { "NameVirtualHost ${addr_port}":
-    ensure  => present,
-    target  => $::apache::ports_file,
-    content => template('apache/namevirtualhost.erb'),
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/package.pp b/puphpet/puppet/modules/apache/manifests/package.pp
deleted file mode 100644
index a4e4015c..00000000
--- a/puphpet/puppet/modules/apache/manifests/package.pp
+++ /dev/null
@@ -1,48 +0,0 @@
-class apache::package (
-  $ensure     = 'present',
-  $mpm_module = $::apache::params::mpm_module,
-) inherits ::apache::params {
-  case $::osfamily {
-    'freebsd' : {
-      $all_mpms = [
-        'www/apache22',
-        'www/apache22-worker-mpm',
-        'www/apache22-event-mpm',
-        'www/apache22-itk-mpm',
-        'www/apache22-peruser-mpm',
-      ]
-      if $mpm_module {
-        $apache_package = $mpm_module ? {
-          'prefork' => 'www/apache22',
-          default   => "www/apache22-${mpm_module}-mpm"
-        }
-      } else {
-        $apache_package = 'www/apache22'
-      }
-      $other_mpms = delete($all_mpms, $apache_package)
-      # Configure ports to have apache module packages dependent on correct
-      # version of apache package (apache22, apache22-worker-mpm, ...)
-      file_line { 'APACHE_PORT in /etc/make.conf':
-        ensure => $ensure,
-        path   => '/etc/make.conf',
-        line   => "APACHE_PORT=${apache_package}",
-        match  => '^\s*#?\s*APACHE_PORT\s*=\s*',
-        before => Package['httpd'],
-      }
-      # remove other packages
-      ensure_resource('package', $other_mpms, {
-        ensure  => absent,
-        before  => Package['httpd'],
-        require => File_line['APACHE_PORT in /etc/make.conf'],
-      })
-    }
-    default: {
-      $apache_package = $::apache::params::apache_name
-    }
-  }
-  package { 'httpd':
-    ensure => $ensure,
-    name   => $apache_package,
-    notify => Class['Apache::Service'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/params.pp b/puphpet/puppet/modules/apache/manifests/params.pp
deleted file mode 100644
index d272afb3..00000000
--- a/puphpet/puppet/modules/apache/manifests/params.pp
+++ /dev/null
@@ -1,258 +0,0 @@
-# Class: apache::params
-#
-# This class manages Apache parameters
-#
-# Parameters:
-# - The $user that Apache runs as
-# - The $group that Apache runs as
-# - The $apache_name is the name of the package and service on the relevant
-#   distribution
-# - The $php_package is the name of the package that provided PHP
-# - The $ssl_package is the name of the Apache SSL package
-# - The $apache_dev is the name of the Apache development libraries package
-# - The $conf_contents is the contents of the Apache configuration file
-#
-# Actions:
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::params inherits ::apache::version {
-  if($::fqdn) {
-    $servername = $::fqdn
-  } else {
-    $servername = $::hostname
-  }
-
-  # The default error log level
-  $log_level = 'warn'
-
-  if $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
-    $user                 = 'apache'
-    $group                = 'apache'
-    $root_group           = 'root'
-    $apache_name          = 'httpd'
-    $service_name         = 'httpd'
-    $httpd_dir            = '/etc/httpd'
-    $server_root          = '/etc/httpd'
-    $conf_dir             = "${httpd_dir}/conf"
-    $confd_dir            = "${httpd_dir}/conf.d"
-    $mod_dir              = "${httpd_dir}/conf.d"
-    $mod_enable_dir       = undef
-    $vhost_dir            = "${httpd_dir}/conf.d"
-    $vhost_enable_dir     = undef
-    $conf_file            = 'httpd.conf'
-    $ports_file           = "${conf_dir}/ports.conf"
-    $logroot              = '/var/log/httpd'
-    $lib_path             = 'modules'
-    $mpm_module           = 'prefork'
-    $dev_packages         = 'httpd-devel'
-    $default_ssl_cert     = '/etc/pki/tls/certs/localhost.crt'
-    $default_ssl_key      = '/etc/pki/tls/private/localhost.key'
-    $ssl_certs_dir        = '/etc/pki/tls/certs'
-    $passenger_conf_file  = 'passenger_extra.conf'
-    $passenger_conf_package_file = 'passenger.conf'
-    $passenger_root       = undef
-    $passenger_ruby       = undef
-    $passenger_default_ruby = undef
-    $suphp_addhandler     = 'php5-script'
-    $suphp_engine         = 'off'
-    $suphp_configpath     = undef
-    $mod_packages         = {
-      'auth_kerb'   => 'mod_auth_kerb',
-      'authnz_ldap' => 'mod_authz_ldap',
-      'fastcgi'     => 'mod_fastcgi',
-      'fcgid'       => 'mod_fcgid',
-      'pagespeed'   => 'mod-pagespeed-stable',
-      'passenger'   => 'mod_passenger',
-      'perl'        => 'mod_perl',
-      'php5'        => $::apache::version::distrelease ? {
-        '5'     => 'php53',
-        default => 'php',
-      },
-      'proxy_html'  => 'mod_proxy_html',
-      'python'      => 'mod_python',
-      'shibboleth'  => 'shibboleth',
-      'ssl'         => 'mod_ssl',
-      'wsgi'        => 'mod_wsgi',
-      'dav_svn'     => 'mod_dav_svn',
-      'suphp'       => 'mod_suphp',
-      'xsendfile'   => 'mod_xsendfile',
-      'nss'         => 'mod_nss',
-    }
-    $mod_libs             = {
-      'php5' => 'libphp5.so',
-      'nss'  => 'libmodnss.so',
-    }
-    $conf_template        = 'apache/httpd.conf.erb'
-    $keepalive            = 'Off'
-    $keepalive_timeout    = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path     = undef
-    $mime_support_package = 'mailcap'
-    $mime_types_config    = '/etc/mime.types'
-  } elsif $::osfamily == 'Debian' {
-    $user                = 'www-data'
-    $group               = 'www-data'
-    $root_group          = 'root'
-    $apache_name         = 'apache2'
-    $service_name        = 'apache2'
-    $httpd_dir           = '/etc/apache2'
-    $server_root         = '/etc/apache2'
-    $conf_dir            = $httpd_dir
-    $confd_dir           = "${httpd_dir}/conf.d"
-    $mod_dir             = "${httpd_dir}/mods-available"
-    $mod_enable_dir      = "${httpd_dir}/mods-enabled"
-    $vhost_dir           = "${httpd_dir}/sites-available"
-    $vhost_enable_dir    = "${httpd_dir}/sites-enabled"
-    $conf_file           = 'apache2.conf'
-    $ports_file          = "${conf_dir}/ports.conf"
-    $logroot             = '/var/log/apache2'
-    $lib_path            = '/usr/lib/apache2/modules'
-    $mpm_module          = 'worker'
-    $dev_packages        = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
-    $default_ssl_cert    = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
-    $default_ssl_key     = '/etc/ssl/private/ssl-cert-snakeoil.key'
-    $ssl_certs_dir       = '/etc/ssl/certs'
-    $suphp_addhandler    = 'x-httpd-php'
-    $suphp_engine        = 'off'
-    $suphp_configpath    = '/etc/php5/apache2'
-    $mod_packages        = {
-      'auth_kerb'   => 'libapache2-mod-auth-kerb',
-      'dav_svn'     => 'libapache2-svn',
-      'fastcgi'     => 'libapache2-mod-fastcgi',
-      'fcgid'       => 'libapache2-mod-fcgid',
-      'nss'         => 'libapache2-mod-nss',
-      'pagespeed'   => 'mod-pagespeed-stable',
-      'passenger'   => 'libapache2-mod-passenger',
-      'perl'        => 'libapache2-mod-perl2',
-      'php5'        => 'libapache2-mod-php5',
-      'proxy_html'  => 'libapache2-mod-proxy-html',
-      'python'      => 'libapache2-mod-python',
-      'rpaf'        => 'libapache2-mod-rpaf',
-      'suphp'       => 'libapache2-mod-suphp',
-      'wsgi'        => 'libapache2-mod-wsgi',
-      'xsendfile'   => 'libapache2-mod-xsendfile',
-    }
-    $mod_libs             = {
-      'php5' => 'libphp5.so',
-    }
-    $conf_template          = 'apache/httpd.conf.erb'
-    $keepalive              = 'Off'
-    $keepalive_timeout      = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path       = '/var/lib/apache2/fastcgi'
-    $mime_support_package = 'mime-support'
-    $mime_types_config    = '/etc/mime.types'
-
-    #
-    # Passenger-specific settings
-    #
-
-    $passenger_conf_file         = 'passenger.conf'
-    $passenger_conf_package_file = undef
-
-    case $::operatingsystem {
-      'Ubuntu': {
-        case $::lsbdistrelease {
-          '12.04': {
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-          '14.04': {
-            $passenger_root         = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
-            $passenger_ruby         = undef
-            $passenger_default_ruby = '/usr/bin/ruby'
-          }
-          default: {
-            # The following settings may or may not work on Ubuntu releases not
-            # supported by this module.
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-        }
-      }
-      'Debian': {
-        case $::lsbdistcodename {
-          'wheezy': {
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-          default: {
-            # The following settings may or may not work on Debian releases not
-            # supported by this module.
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-        }
-      }
-    }
-  } elsif $::osfamily == 'FreeBSD' {
-    $user             = 'www'
-    $group            = 'www'
-    $root_group       = 'wheel'
-    $apache_name      = 'apache22'
-    $service_name     = 'apache22'
-    $httpd_dir        = '/usr/local/etc/apache22'
-    $server_root      = '/usr/local'
-    $conf_dir         = $httpd_dir
-    $confd_dir        = "${httpd_dir}/Includes"
-    $mod_dir          = "${httpd_dir}/Modules"
-    $mod_enable_dir   = undef
-    $vhost_dir        = "${httpd_dir}/Vhosts"
-    $vhost_enable_dir = undef
-    $conf_file        = 'httpd.conf'
-    $ports_file       = "${conf_dir}/ports.conf"
-    $logroot          = '/var/log/apache22'
-    $lib_path         = '/usr/local/libexec/apache22'
-    $mpm_module       = 'prefork'
-    $dev_packages     = undef
-    $default_ssl_cert = '/usr/local/etc/apache22/server.crt'
-    $default_ssl_key  = '/usr/local/etc/apache22/server.key'
-    $ssl_certs_dir    = '/usr/local/etc/apache22'
-    $passenger_conf_file = 'passenger.conf'
-    $passenger_conf_package_file = undef
-    $passenger_root   = '/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.10'
-    $passenger_ruby   = '/usr/bin/ruby'
-    $passenger_default_ruby = undef
-    $suphp_addhandler = 'php5-script'
-    $suphp_engine     = 'off'
-    $suphp_configpath = undef
-    $mod_packages     = {
-      # NOTE: I list here only modules that are not included in www/apache22
-      # NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config
-      # NOTE: 'php' needs to enable APACHE option in make config
-      # NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config
-      # NOTE: not sure where the shibboleth should come from
-      # NOTE: don't know where the shibboleth module should come from
-      'auth_kerb'  => 'www/mod_auth_kerb2',
-      'fcgid'      => 'www/mod_fcgid',
-      'passenger'  => 'www/rubygem-passenger',
-      'perl'       => 'www/mod_perl2',
-      'php5'       => 'lang/php5',
-      'proxy_html' => 'www/mod_proxy_html',
-      'python'     => 'www/mod_python3',
-      'wsgi'       => 'www/mod_wsgi',
-      'dav_svn'    => 'devel/subversion',
-      'xsendfile'  => 'www/mod_xsendfile',
-      'rpaf'       => 'www/mod_rpaf2'
-    }
-    $mod_libs         = {
-      'php5' => 'libphp5.so',
-    }
-    $conf_template        = 'apache/httpd.conf.erb'
-    $keepalive            = 'Off'
-    $keepalive_timeout    = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path     = undef # TODO: revisit
-    $mime_support_package = 'misc/mime-support'
-    $mime_types_config    = '/usr/local/etc/mime.types'
-  } else {
-    fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}")
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp b/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
deleted file mode 100644
index 9e57ac30..00000000
--- a/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-define apache::peruser::multiplexer (
-  $user = $::apache::user,
-  $group = $::apache::group,
-  $file = undef,
-) {
-  if ! $file {
-    $filename = "${name}.conf"
-  } else {
-    $filename = $file
-  }
-  file { "${::apache::mod_dir}/peruser/multiplexers/${filename}":
-    ensure  => file,
-    content => "Multiplexer ${user} ${group}\n",
-    require => File["${::apache::mod_dir}/peruser/multiplexers"],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/peruser/processor.pp b/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
deleted file mode 100644
index 1d689346..00000000
--- a/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-define apache::peruser::processor (
-  $user,
-  $group,
-  $file = undef,
-) {
-  if ! $file {
-    $filename = "${name}.conf"
-  } else {
-    $filename = $file
-  }
-  file { "${::apache::mod_dir}/peruser/processors/${filename}":
-    ensure  => file,
-    content => "Processor ${user} ${group}\n",
-    require => File["${::apache::mod_dir}/peruser/processors"],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/php.pp b/puphpet/puppet/modules/apache/manifests/php.pp
deleted file mode 100644
index 9fa9c682..00000000
--- a/puphpet/puppet/modules/apache/manifests/php.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::php
-#
-# This class installs PHP for Apache
-#
-# Parameters:
-# - $php_package
-#
-# Actions:
-#   - Install Apache PHP package
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::php {
-  warning('apache::php is deprecated; please use apache::mod::php')
-  include ::apache::mod::php
-}
diff --git a/puphpet/puppet/modules/apache/manifests/proxy.pp b/puphpet/puppet/modules/apache/manifests/proxy.pp
deleted file mode 100644
index 050f36c2..00000000
--- a/puphpet/puppet/modules/apache/manifests/proxy.pp
+++ /dev/null
@@ -1,15 +0,0 @@
-# Class: apache::proxy
-#
-# This class enabled the proxy module for Apache
-#
-# Actions:
-#   - Enables Apache Proxy module
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::proxy {
-  warning('apache::proxy is deprecated; please use apache::mod::proxy')
-  include ::apache::mod::proxy
-}
diff --git a/puphpet/puppet/modules/apache/manifests/python.pp b/puphpet/puppet/modules/apache/manifests/python.pp
deleted file mode 100644
index 723a753f..00000000
--- a/puphpet/puppet/modules/apache/manifests/python.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::python
-#
-# This class installs Python for Apache
-#
-# Parameters:
-# - $php_package
-#
-# Actions:
-#   - Install Apache Python package
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::python {
-  warning('apache::python is deprecated; please use apache::mod::python')
-  include ::apache::mod::python
-}
diff --git a/puphpet/puppet/modules/apache/manifests/service.pp b/puphpet/puppet/modules/apache/manifests/service.pp
deleted file mode 100644
index 0c1f7b96..00000000
--- a/puphpet/puppet/modules/apache/manifests/service.pp
+++ /dev/null
@@ -1,44 +0,0 @@
-# Class: apache::service
-#
-# Manages the Apache daemon
-#
-# Parameters:
-#
-# Actions:
-#   - Manage Apache service
-#
-# Requires:
-#
-# Sample Usage:
-#
-#    sometype { 'foo':
-#      notify => Class['apache::service'],
-#    }
-#
-#
-class apache::service (
-  $service_name   = $::apache::params::service_name,
-  $service_enable = true,
-  $service_ensure = 'running',
-) {
-  # The base class must be included first because parameter defaults depend on it
-  if ! defined(Class['apache::params']) {
-    fail('You must include the apache::params class before using any apache defined resources')
-  }
-  validate_bool($service_enable)
-
-  case $service_ensure {
-    true, false, 'running', 'stopped': {
-      $_service_ensure = $service_ensure
-    }
-    default: {
-      $_service_ensure = undef
-    }
-  }
-
-  service { 'httpd':
-    ensure => $_service_ensure,
-    name   => $service_name,
-    enable => $service_enable,
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/ssl.pp b/puphpet/puppet/modules/apache/manifests/ssl.pp
deleted file mode 100644
index d0b36593..00000000
--- a/puphpet/puppet/modules/apache/manifests/ssl.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::ssl
-#
-# This class installs Apache SSL capabilities
-#
-# Parameters:
-# - The $ssl_package name from the apache::params class
-#
-# Actions:
-#   - Install Apache SSL capabilities
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::ssl {
-  warning('apache::ssl is deprecated; please use apache::mod::ssl')
-  include ::apache::mod::ssl
-}
diff --git a/puphpet/puppet/modules/apache/manifests/version.pp b/puphpet/puppet/modules/apache/manifests/version.pp
deleted file mode 100644
index a8592d5e..00000000
--- a/puphpet/puppet/modules/apache/manifests/version.pp
+++ /dev/null
@@ -1,35 +0,0 @@
-# Class: apache::version
-#
-# Try to automatically detect the version by OS
-#
-class apache::version {
-  # This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, 3 on Amazon, etc.
-  $osr_array = split($::operatingsystemrelease,'[\/\.]')
-  $distrelease = $osr_array[0]
-  if ! $distrelease {
-    fail("Class['apache::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
-  }
-
-  case $::osfamily {
-    'RedHat': {
-      if ($::operatingsystem == 'Fedora' and $distrelease >= 18) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
-        $default = '2.4'
-      } else {
-        $default = '2.2'
-      }
-    }
-    'Debian': {
-      if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
-        $default = '2.4'
-      } else {
-        $default = '2.2'
-      }
-    }
-    'FreeBSD': {
-      $default = '2.2'
-    }
-    default: {
-      fail("Class['apache::version']: Unsupported osfamily: ${::osfamily}")
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/manifests/vhost.pp b/puphpet/puppet/modules/apache/manifests/vhost.pp
deleted file mode 100644
index 36b94338..00000000
--- a/puphpet/puppet/modules/apache/manifests/vhost.pp
+++ /dev/null
@@ -1,563 +0,0 @@
-# Definition: apache::vhost
-#
-# This class installs Apache Virtual Hosts
-#
-# Parameters:
-# - The $port to configure the host on
-# - The $docroot provides the DocumentRoot variable
-# - The $virtual_docroot provides VirtualDocumentationRoot variable
-# - The $serveradmin will specify an email address for Apache that it will
-#   display when it renders one of it's error pages
-# - The $ssl option is set true or false to enable SSL for this Virtual Host
-# - The $priority of the site
-# - The $servername is the primary name of the virtual host
-# - The $serveraliases of the site
-# - The $ip to configure the host on, defaulting to *
-# - The $options for the given vhost
-# - The $override for the given vhost (list of AllowOverride arguments)
-# - The $vhost_name for name based virtualhosting, defaulting to *
-# - The $logroot specifies the location of the virtual hosts logfiles, default
-#   to /var/log//
-# - The $log_level specifies the verbosity of the error log for this vhost. Not
-#   set by default for the vhost, instead the global server configuration default
-#   of 'warn' is used.
-# - The $access_log specifies if *_access.log directives should be configured.
-# - The $ensure specifies if vhost file is present or absent.
-# - The $headers is a list of Header statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header
-# - The $request_headers is a list of RequestHeader statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
-# - $aliases is a list of Alias hashes for mod_alias as per http://httpd.apache.org/docs/current/mod/mod_alias.html
-#   each statement is a hash in the form of { alias => '/alias', path => '/real/path/to/directory' }
-# - $directories is a lost of hashes for creating  statements as per http://httpd.apache.org/docs/2.2/mod/core.html#directory
-#   each statement is a hash in the form of { path => '/path/to/directory',  => }
-#   see README.md for list of supported directives.
-#
-# Actions:
-# - Install Apache Virtual Hosts
-#
-# Requires:
-# - The apache class
-#
-# Sample Usage:
-#
-#  # Simple vhost definition:
-#  apache::vhost { 'site.name.fqdn':
-#    port => '80',
-#    docroot => '/path/to/docroot',
-#  }
-#
-#  # Multiple Mod Rewrites:
-#  apache::vhost { 'site.name.fqdn':
-#    port => '80',
-#    docroot => '/path/to/docroot',
-#    rewrites => [
-#      {
-#        comment       => 'force www domain',
-#        rewrite_cond => ['%{HTTP_HOST} ^([a-z.]+)?example.com$ [NC]', '%{HTTP_HOST} !^www. [NC]'],
-#        rewrite_rule => ['.? http://www.%1example.com%{REQUEST_URI} [R=301,L]']
-#      },
-#      {
-#        comment       => 'prevent image hotlinking',
-#        rewrite_cond => ['%{HTTP_REFERER} !^$', '%{HTTP_REFERER} !^http://(www.)?example.com/ [NC]'],
-#        rewrite_rule => ['.(gif|jpg|png)$ - [F]']
-#      },
-#    ]
-#  }
-#
-#  # SSL vhost with non-SSL rewrite:
-#  apache::vhost { 'site.name.fqdn':
-#    port    => '443',
-#    ssl     => true,
-#    docroot => '/path/to/docroot',
-#  }
-#  apache::vhost { 'site.name.fqdn':
-#    port            => '80',
-#    docroot         => '/path/to/other_docroot',
-#    custom_fragment => template("${module_name}/my_fragment.erb"),
-#  }
-#
-define apache::vhost(
-    $docroot,
-    $manage_docroot              = true,
-    $virtual_docroot             = false,
-    $port                        = undef,
-    $ip                          = undef,
-    $ip_based                    = false,
-    $add_listen                  = true,
-    $docroot_owner               = 'root',
-    $docroot_group               = $::apache::params::root_group,
-    $docroot_mode                = undef,
-    $serveradmin                 = undef,
-    $ssl                         = false,
-    $ssl_cert                    = $::apache::default_ssl_cert,
-    $ssl_key                     = $::apache::default_ssl_key,
-    $ssl_chain                   = $::apache::default_ssl_chain,
-    $ssl_ca                      = $::apache::default_ssl_ca,
-    $ssl_crl_path                = $::apache::default_ssl_crl_path,
-    $ssl_crl                     = $::apache::default_ssl_crl,
-    $ssl_certs_dir               = $::apache::params::ssl_certs_dir,
-    $ssl_protocol                = undef,
-    $ssl_cipher                  = undef,
-    $ssl_honorcipherorder        = undef,
-    $ssl_verify_client           = undef,
-    $ssl_verify_depth            = undef,
-    $ssl_options                 = undef,
-    $ssl_proxyengine             = false,
-    $priority                    = undef,
-    $default_vhost               = false,
-    $servername                  = $name,
-    $serveraliases               = [],
-    $options                     = ['Indexes','FollowSymLinks','MultiViews'],
-    $override                    = ['None'],
-    $directoryindex              = '',
-    $vhost_name                  = '*',
-    $logroot                     = $::apache::logroot,
-    $logroot_mode                = undef,
-    $log_level                   = undef,
-    $access_log                  = true,
-    $access_log_file             = undef,
-    $access_log_pipe             = undef,
-    $access_log_syslog           = undef,
-    $access_log_format           = undef,
-    $access_log_env_var          = undef,
-    $aliases                     = undef,
-    $directories                 = undef,
-    $error_log                   = true,
-    $error_log_file              = undef,
-    $error_log_pipe              = undef,
-    $error_log_syslog            = undef,
-    $error_documents             = [],
-    $fallbackresource            = undef,
-    $scriptalias                 = undef,
-    $scriptaliases               = [],
-    $proxy_dest                  = undef,
-    $proxy_pass                  = undef,
-    $suphp_addhandler            = $::apache::params::suphp_addhandler,
-    $suphp_engine                = $::apache::params::suphp_engine,
-    $suphp_configpath            = $::apache::params::suphp_configpath,
-    $php_admin_flags             = [],
-    $php_admin_values            = [],
-    $no_proxy_uris               = [],
-    $proxy_preserve_host         = false,
-    $redirect_source             = '/',
-    $redirect_dest               = undef,
-    $redirect_status             = undef,
-    $redirectmatch_status        = undef,
-    $redirectmatch_regexp        = undef,
-    $rack_base_uris              = undef,
-    $headers                     = undef,
-    $request_headers             = undef,
-    $rewrites                    = undef,
-    $rewrite_base                = undef,
-    $rewrite_rule                = undef,
-    $rewrite_cond                = undef,
-    $setenv                      = [],
-    $setenvif                    = [],
-    $block                       = [],
-    $ensure                      = 'present',
-    $wsgi_application_group      = undef,
-    $wsgi_daemon_process         = undef,
-    $wsgi_daemon_process_options = undef,
-    $wsgi_import_script          = undef,
-    $wsgi_import_script_options  = undef,
-    $wsgi_process_group          = undef,
-    $wsgi_script_aliases         = undef,
-    $wsgi_pass_authorization     = undef,
-    $custom_fragment             = undef,
-    $itk                         = undef,
-    $action                      = undef,
-    $fastcgi_server              = undef,
-    $fastcgi_socket              = undef,
-    $fastcgi_dir                 = undef,
-    $additional_includes         = [],
-    $apache_version              = $::apache::apache_version,
-    $suexec_user_group           = undef,
-  ) {
-  # The base class must be included first because it is used by parameter defaults
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $apache_name = $::apache::params::apache_name
-
-  validate_re($ensure, '^(present|absent)$',
-  "${ensure} is not supported for ensure.
-  Allowed values are 'present' and 'absent'.")
-  validate_re($suphp_engine, '^(on|off)$',
-  "${suphp_engine} is not supported for suphp_engine.
-  Allowed values are 'on' and 'off'.")
-  validate_bool($ip_based)
-  validate_bool($access_log)
-  validate_bool($error_log)
-  validate_bool($ssl)
-  validate_bool($default_vhost)
-  validate_bool($ssl_proxyengine)
-  if $rewrites {
-    validate_array($rewrites)
-    validate_hash($rewrites[0])
-  }
-
-  if $suexec_user_group {
-    validate_re($suexec_user_group, '^\w+ \w+$',
-    "${suexec_user_group} is not supported for suexec_user_group.  Must be 'user group'.")
-  }
-
-  # Deprecated backwards-compatibility
-  if $rewrite_base {
-    warning('Apache::Vhost: parameter rewrite_base is deprecated in favor of rewrites')
-  }
-  if $rewrite_rule {
-    warning('Apache::Vhost: parameter rewrite_rule is deprecated in favor of rewrites')
-  }
-  if $rewrite_cond {
-    warning('Apache::Vhost parameter rewrite_cond is deprecated in favor of rewrites')
-  }
-
-  if $wsgi_script_aliases {
-    validate_hash($wsgi_script_aliases)
-  }
-  if $wsgi_daemon_process_options {
-    validate_hash($wsgi_daemon_process_options)
-  }
-  if $wsgi_import_script_options {
-    validate_hash($wsgi_import_script_options)
-  }
-  if $itk {
-    validate_hash($itk)
-  }
-
-  if $log_level {
-    validate_re($log_level, '^(emerg|alert|crit|error|warn|notice|info|debug)$',
-    "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
-  }
-
-  if $access_log_file and $access_log_pipe {
-    fail("Apache::Vhost[${name}]: 'access_log_file' and 'access_log_pipe' cannot be defined at the same time")
-  }
-
-  if $error_log_file and $error_log_pipe {
-    fail("Apache::Vhost[${name}]: 'error_log_file' and 'error_log_pipe' cannot be defined at the same time")
-  }
-
-  if $fallbackresource {
-    validate_re($fallbackresource, '^/|disabled', 'Please make sure fallbackresource starts with a / (or is "disabled")')
-  }
-
-  if $ssl and $ensure == 'present' {
-    include ::apache::mod::ssl
-    # Required for the AddType lines.
-    include ::apache::mod::mime
-  }
-
-  if $virtual_docroot {
-    include ::apache::mod::vhost_alias
-  }
-
-  if $wsgi_daemon_process {
-    include ::apache::mod::wsgi
-  }
-
-  if $suexec_user_group {
-    include ::apache::mod::suexec
-  }
-
-  # This ensures that the docroot exists
-  # But enables it to be specified across multiple vhost resources
-  if ! defined(File[$docroot]) and $manage_docroot {
-    file { $docroot:
-      ensure  => directory,
-      owner   => $docroot_owner,
-      group   => $docroot_group,
-      mode    => $docroot_mode,
-      require => Package['httpd'],
-    }
-  }
-
-  # Same as above, but for logroot
-  if ! defined(File[$logroot]) and $ensure == 'present' {
-    file { $logroot:
-      ensure  => directory,
-      mode    => $logroot_mode,
-      require => Package['httpd'],
-    }
-  }
-
-
-  # Is apache::mod::passenger enabled (or apache::mod['passenger'])
-  $passenger_enabled = defined(Apache::Mod['passenger'])
-
-  # Define log file names
-  if $access_log_file {
-    $access_log_destination = "${logroot}/${access_log_file}"
-  } elsif $access_log_pipe {
-    $access_log_destination = $access_log_pipe
-  } elsif $access_log_syslog {
-    $access_log_destination = $access_log_syslog
-  } else {
-    if $ssl {
-      $access_log_destination = "${logroot}/${name}_access_ssl.log"
-    } else {
-      $access_log_destination = "${logroot}/${name}_access.log"
-    }
-  }
-
-  if $error_log_file {
-    $error_log_destination = "${logroot}/${error_log_file}"
-  } elsif $error_log_pipe {
-    $error_log_destination = $error_log_pipe
-  } elsif $error_log_syslog {
-    $error_log_destination = $error_log_syslog
-  } else {
-    if $ssl {
-      $error_log_destination = "${logroot}/${name}_error_ssl.log"
-    } else {
-      $error_log_destination = "${logroot}/${name}_error.log"
-    }
-  }
-
-  # Set access log format
-  if $access_log_format {
-    $_access_log_format = "\"${access_log_format}\""
-  } else {
-    $_access_log_format = 'combined'
-  }
-
-  if $access_log_env_var {
-    $_access_log_env_var = "env=${access_log_env_var}"
-  }
-
-  if $ip {
-    if $port {
-      $listen_addr_port = "${ip}:${port}"
-      $nvh_addr_port = "${ip}:${port}"
-    } else {
-      $listen_addr_port = undef
-      $nvh_addr_port = $ip
-      if ! $servername and ! $ip_based {
-        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters for name-based vhosts")
-      }
-    }
-  } else {
-    if $port {
-      $listen_addr_port = $port
-      $nvh_addr_port = "${vhost_name}:${port}"
-    } else {
-      $listen_addr_port = undef
-      $nvh_addr_port = $name
-      if ! $servername {
-        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters, and/or 'servername' parameter")
-      }
-    }
-  }
-  if $add_listen {
-    if $ip and defined(Apache::Listen[$port]) {
-      fail("Apache::Vhost[${name}]: Mixing IP and non-IP Listen directives is not possible; check the add_listen parameter of the apache::vhost define to disable this")
-    }
-    if ! defined(Apache::Listen[$listen_addr_port]) and $listen_addr_port and $ensure == 'present' {
-      ::apache::listen { $listen_addr_port: }
-    }
-  }
-  if ! $ip_based {
-    if ! defined(Apache::Namevirtualhost[$nvh_addr_port]) and $ensure == 'present' and (versioncmp($apache_version, '2.4') < 0) {
-      ::apache::namevirtualhost { $nvh_addr_port: }
-    }
-  }
-
-  # Load mod_rewrite if needed and not yet loaded
-  if $rewrites or $rewrite_cond {
-    if ! defined(Class['apache::mod::rewrite']) {
-      include ::apache::mod::rewrite
-    }
-  }
-
-  # Load mod_alias if needed and not yet loaded
-  if ($scriptalias or $scriptaliases != []) or ($redirect_source and $redirect_dest) {
-    if ! defined(Class['apache::mod::alias']) {
-      include ::apache::mod::alias
-    }
-  }
-
-  # Load mod_proxy if needed and not yet loaded
-  if ($proxy_dest or $proxy_pass) {
-    if ! defined(Class['apache::mod::proxy']) {
-      include ::apache::mod::proxy
-    }
-    if ! defined(Class['apache::mod::proxy_http']) {
-      include ::apache::mod::proxy_http
-    }
-  }
-
-  # Load mod_passenger if needed and not yet loaded
-  if $rack_base_uris {
-    if ! defined(Class['apache::mod::passenger']) {
-      include ::apache::mod::passenger
-    }
-  }
-
-  # Load mod_fastci if needed and not yet loaded
-  if $fastcgi_server and $fastcgi_socket {
-    if ! defined(Class['apache::mod::fastcgi']) {
-      include ::apache::mod::fastcgi
-    }
-  }
-
-  # Configure the defaultness of a vhost
-  if $priority {
-    $priority_real = $priority
-  } elsif $default_vhost {
-    $priority_real = '10'
-  } else {
-    $priority_real = '25'
-  }
-
-  # Check if mod_headers is required to process $headers/$request_headers
-  if $headers or $request_headers {
-    if ! defined(Class['apache::mod::headers']) {
-      include ::apache::mod::headers
-    }
-  }
-
-  ## Apache include does not always work with spaces in the filename
-  $filename = regsubst($name, ' ', '_', 'G')
-
-  ## Create a default directory list if none defined
-  if $directories {
-    if !is_hash($directories) and !(is_array($directories) and is_hash($directories[0])) {
-      fail("Apache::Vhost[${name}]: 'directories' must be either a Hash or an Array of Hashes")
-    }
-    $_directories = $directories
-  } else {
-    $_directory = {
-      provider       => 'directory',
-      path           => $docroot,
-      options        => $options,
-      allow_override => $override,
-      directoryindex => $directoryindex,
-    }
-
-    if versioncmp($apache_version, '2.4') >= 0 {
-      $_directory_version = {
-        require => 'all granted',
-      }
-    } else {
-      $_directory_version = {
-        order => 'allow,deny',
-        allow => 'from all',
-      }
-    }
-
-    $_directories = [ merge($_directory, $_directory_version) ]
-  }
-
-  # Template uses:
-  # - $nvh_addr_port
-  # - $servername
-  # - $serveradmin
-  # - $docroot
-  # - $virtual_docroot
-  # - $options
-  # - $override
-  # - $logroot
-  # - $name
-  # - $aliases
-  # - $_directories
-  # - $log_level
-  # - $access_log
-  # - $access_log_destination
-  # - $_access_log_format
-  # - $_access_log_env_var
-  # - $error_log
-  # - $error_log_destination
-  # - $error_documents
-  # - $fallbackresource
-  # - $custom_fragment
-  # - $additional_includes
-  # block fragment:
-  #   - $block
-  # directories fragment:
-  #   - $passenger_enabled
-  #   - $php_admin_flags
-  #   - $php_admin_values
-  #   - $directories (a list of key-value hashes is expected)
-  # fastcgi fragment:
-  #   - $fastcgi_server
-  #   - $fastcgi_socket
-  #   - $fastcgi_dir
-  # proxy fragment:
-  #   - $proxy_dest
-  #   - $no_proxy_uris
-  #   - $proxy_preserve_host (true to set ProxyPreserveHost to on and false to off
-  # rack fragment:
-  #   - $rack_base_uris
-  # redirect fragment:
-  #   - $redirect_source
-  #   - $redirect_dest
-  #   - $redirect_status
-  # header fragment
-  #   - $headers
-  # requestheader fragment:
-  #   - $request_headers
-  # rewrite fragment:
-  #   - $rewrites
-  # scriptalias fragment:
-  #   - $scriptalias
-  #   - $scriptaliases
-  #   - $ssl
-  # serveralias fragment:
-  #   - $serveraliases
-  # setenv fragment:
-  #   - $setenv
-  #   - $setenvif
-  # ssl fragment:
-  #   - $ssl
-  #   - $ssl_cert
-  #   - $ssl_key
-  #   - $ssl_chain
-  #   - $ssl_certs_dir
-  #   - $ssl_ca
-  #   - $ssl_crl
-  #   - $ssl_crl_path
-  #   - $ssl_verify_client
-  #   - $ssl_verify_depth
-  #   - $ssl_options
-  # suphp fragment:
-  #   - $suphp_addhandler
-  #   - $suphp_engine
-  #   - $suphp_configpath
-  # wsgi fragment:
-  #   - $wsgi_application_group
-  #   - $wsgi_daemon_process
-  #   - $wsgi_import_script
-  #   - $wsgi_process_group
-  #   - $wsgi_script_aliases
-  file { "${priority_real}-${filename}.conf":
-    ensure  => $ensure,
-    path    => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
-    content => template('apache/vhost.conf.erb'),
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    require => [
-      Package['httpd'],
-      File[$docroot],
-      File[$logroot],
-    ],
-    notify  => Service['httpd'],
-  }
-  if $::osfamily == 'Debian' {
-    $vhost_enable_dir = $::apache::vhost_enable_dir
-    $vhost_symlink_ensure = $ensure ? {
-      present => link,
-      default => $ensure,
-    }
-    file{ "${priority_real}-${filename}.conf symlink":
-      ensure  => $vhost_symlink_ensure,
-      path    => "${vhost_enable_dir}/${priority_real}-${filename}.conf",
-      target  => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
-      owner   => 'root',
-      group   => $::apache::params::root_group,
-      mode    => '0644',
-      require => File["${priority_real}-${filename}.conf"],
-      notify  => Service['httpd'],
-    }
-  }
-}
diff --git a/puphpet/puppet/modules/apache/metadata.json b/puphpet/puppet/modules/apache/metadata.json
deleted file mode 100644
index f225f70e..00000000
--- a/puphpet/puppet/modules/apache/metadata.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
-  "name": "puppetlabs-apache",
-  "version": "1.1.1",
-  "author": "puppetlabs",
-  "summary": "Puppet module for Apache",
-  "license": "Apache 2.0",
-  "source": "git://github.com/puppetlabs/puppetlabs-apache.git",
-  "project_page": "https://github.com/puppetlabs/puppetlabs-apache",
-  "issues_url": "https://github.com/puppetlabs/puppetlabs-apache/issues",
-  "operatingsystem_support": [
-    {
-      "operatingsystem": "RedHat",
-      "operatingsystemrelease": [
-        "5",
-        "6",
-        "7"
-      ]
-    },
-    {
-      "operatingsystem": "CentOS",
-      "operatingsystemrelease": [
-        "5",
-        "6",
-        "7"
-      ]
-    },
-    {
-      "operatingsystem": "OracleLinux",
-      "operatingsystemrelease": [
-        "5",
-        "6",
-        "7"
-      ]
-    },
-    {
-      "operatingsystem": "Scientific",
-      "operatingsystemrelease": [
-        "5",
-        "6",
-        "7"
-      ]
-    },
-    {
-      "operatingsystem": "Debian",
-      "operatingsystemrelease": [
-        "6",
-        "7"
-      ]
-    },
-    {
-      "operatingsystem": "Ubuntu",
-      "operatingsystemrelease": [
-        "10.04",
-        "12.04",
-        "14.04"
-      ]
-    }
-  ],
-  "requirements": [
-    {
-      "name": "pe",
-      "version_requirement": ">= 3.2.0 < 3.4.0"
-    },
-    {
-      "name": "puppet",
-      "version_requirement": "3.x"
-    }
-  ],
-  "description": "Module for Apache configuration",
-  "dependencies": [
-    {
-      "name": "puppetlabs/stdlib",
-      "version_requirement": ">= 2.4.0"
-    },
-    {
-      "name": "puppetlabs/concat",
-      "version_requirement": ">= 1.0.0"
-    }
-  ]
-}
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
deleted file mode 100644
index 983bbb16..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
+++ /dev/null
@@ -1,458 +0,0 @@
-require 'spec_helper_acceptance'
-require_relative './version.rb'
-
-describe 'apache parameters', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-
-  # Currently this test only does something on FreeBSD.
-  describe 'default_confd_files => false' do
-    it 'doesnt do anything' do
-      pp = "class { 'apache': default_confd_files => false }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    if fact('osfamily') == 'FreeBSD'
-      describe file("#{confd_dir}/no-accf.conf.erb") do
-        it { is_expected.not_to be_file }
-      end
-    end
-  end
-  describe 'default_confd_files => true' do
-    it 'copies conf.d files' do
-      pp = "class { 'apache': default_confd_files => true }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    if fact('osfamily') == 'FreeBSD'
-      describe file("#{$confd_dir}/no-accf.conf.erb") do
-        it { is_expected.to be_file }
-      end
-    end
-  end
-
-  describe 'when set adds a listen statement' do
-    it 'applys cleanly' do
-      pp = "class { 'apache': ip => '10.1.1.1', service_ensure => stopped }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($ports_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'Listen 10.1.1.1' }
-    end
-  end
-
-  describe 'service tests => true' do
-    it 'starts the service' do
-      pp = <<-EOS
-        class { 'apache':
-          service_enable => true,
-          service_ensure => running,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service($service_name) do
-      it { is_expected.to be_running }
-      it { is_expected.to be_enabled }
-    end
-  end
-
-  describe 'service tests => false' do
-    it 'stops the service' do
-      pp = <<-EOS
-        class { 'apache':
-          service_enable => false,
-          service_ensure => stopped,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service($service_name) do
-      it { is_expected.not_to be_running }
-      it { is_expected.not_to be_enabled }
-    end
-  end
-
-  describe 'purge parameters => false' do
-    it 'applies cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          purge_configs   => false,
-          purge_vdir      => false,
-          purge_vhost_dir => false,
-          vhost_dir       => "#{confd_dir}.vhosts"
-        }
-      EOS
-      shell("touch #{$confd_dir}/test.conf")
-      shell("mkdir -p #{$confd_dir}.vhosts && touch #{$confd_dir}.vhosts/test.conf")
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    # Ensure the files didn't disappear.
-    describe file("#{$confd_dir}/test.conf") do
-      it { is_expected.to be_file }
-    end
-    describe file("#{$confd_dir}.vhosts/test.conf") do
-      it { is_expected.to be_file }
-    end
-  end
-
-  if fact('osfamily') != 'Debian'
-    describe 'purge parameters => true' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            purge_configs   => true,
-            purge_vdir      => true,
-            purge_vhost_dir => true,
-            vhost_dir       => "#{confd_dir}.vhosts"
-          }
-        EOS
-        shell("touch #{$confd_dir}/test.conf")
-        shell("mkdir -p #{$confd_dir}.vhosts && touch #{$confd_dir}.vhosts/test.conf")
-        apply_manifest(pp, :catch_failures => true)
-      end
-
-      # File should be gone
-      describe file("#{$confd_dir}/test.conf") do
-        it { is_expected.not_to be_file }
-      end
-      describe file("#{$confd_dir}.vhosts/test.conf") do
-        it { is_expected.not_to be_file }
-      end
-    end
-  end
-
-  describe 'serveradmin' do
-    it 'applies cleanly' do
-      pp = "class { 'apache': serveradmin => 'test@example.com' }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($vhost) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'ServerAdmin test@example.com' }
-    end
-  end
-
-  describe 'sendfile' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': sendfile => 'On' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'EnableSendfile On' }
-    end
-
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': sendfile => 'Off' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'Sendfile Off' }
-    end
-  end
-
-  describe 'error_documents' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': error_documents => true }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'Alias /error/' }
-    end
-  end
-
-  describe 'timeout' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': timeout => '1234' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'Timeout 1234' }
-    end
-  end
-
-  describe 'httpd_dir' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache': httpd_dir => '/tmp', service_ensure => stopped }
-          include 'apache::mod::mime'
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file("#{$confd_dir}/mime.conf") do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'AddLanguage eo .eo' }
-    end
-  end
-
-  describe 'server_root' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': server_root => '/tmp/root', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'ServerRoot "/tmp/root"' }
-    end
-  end
-
-  describe 'confd_dir' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': confd_dir => '/tmp/root', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    if $apache_version == '2.4'
-      describe file($conf_file) do
-        it { is_expected.to be_file }
-        it { is_expected.to contain 'IncludeOptional "/tmp/root/*.conf"' }
-      end
-    else
-      describe file($conf_file) do
-        it { is_expected.to be_file }
-        it { is_expected.to contain 'Include "/tmp/root/*.conf"' }
-      end
-    end
-  end
-
-  describe 'conf_template' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': conf_template => 'another/test.conf.erb', service_ensure => stopped }"
-        shell("mkdir -p #{default['distmoduledir']}/another/templates")
-        shell("echo 'testcontent' >> #{default['distmoduledir']}/another/templates/test.conf.erb")
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'testcontent' }
-    end
-  end
-
-  describe 'servername' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': servername => 'test.server', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'ServerName "test.server"' }
-    end
-  end
-
-  describe 'user' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            manage_user  => true,
-            manage_group => true,
-            user         => 'testweb',
-            group        => 'testweb',
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe user('testweb') do
-      it { is_expected.to exist }
-      it { is_expected.to belong_to_group 'testweb' }
-    end
-
-    describe group('testweb') do
-      it { is_expected.to exist }
-    end
-  end
-
-  describe 'logformats' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            log_formats => {
-              'vhost_common'   => '%v %h %l %u %t \\\"%r\\\" %>s %b',
-              'vhost_combined' => '%v %h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\"',
-            }
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common' }
-      it { is_expected.to contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined' }
-    end
-  end
-
-
-  describe 'keepalive' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': keepalive => 'On', keepalive_timeout => '30', max_keepalive_requests => '200' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'KeepAlive On' }
-      it { is_expected.to contain 'KeepAliveTimeout 30' }
-      it { is_expected.to contain 'MaxKeepAliveRequests 200' }
-    end
-  end
-
-  describe 'logging' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          if $::osfamily == 'RedHat' and $::selinux == 'true' {
-            $semanage_package = $::operatingsystemmajrelease ? {
-              '5'     => 'policycoreutils',
-              default => 'policycoreutils-python',
-            }
-
-            package { $semanage_package: ensure => installed }
-            exec { 'set_apache_defaults':
-              command => 'semanage fcontext -a -t httpd_log_t "/apache_spec(/.*)?"',
-              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-              require => Package[$semanage_package],
-            }
-            exec { 'restorecon_apache':
-              command => 'restorecon -Rv /apache_spec',
-              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-              before  => Service['httpd'],
-              require => Class['apache'],
-            }
-          }
-          file { '/apache_spec': ensure => directory, }
-          class { 'apache': logroot => '/apache_spec' }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file("/apache_spec/#{$error_log}") do
-      it { is_expected.to be_file }
-    end
-  end
-
-  describe 'ports_file' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        file { '/apache_spec': ensure => directory, }
-        class { 'apache':
-          ports_file     => '/apache_spec/ports_file',
-          ip             => '10.1.1.1',
-          service_ensure => stopped
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file('/apache_spec/ports_file') do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'Listen 10.1.1.1' }
-    end
-  end
-
-  describe 'server_tokens' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          server_tokens  => 'Minor',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'ServerTokens Minor' }
-    end
-  end
-
-  describe 'server_signature' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          server_signature  => 'testsig',
-          service_ensure    => stopped,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'ServerSignature testsig' }
-    end
-  end
-
-  describe 'trace_enable' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          trace_enable  => 'Off',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'TraceEnable Off' }
-    end
-  end
-
-  describe 'package_ensure' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          package_ensure  => present,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe package($package_name) do
-      it { is_expected.to be_installed }
-    end
-  end
-
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
deleted file mode 100644
index 3cfe5934..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'RedHat'
-  vhostd = '/etc/httpd/conf.d'
-when 'Debian'
-  vhostd = '/etc/apache2/sites-available'
-end
-
-describe 'apache ssl', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-
-  describe 'ssl parameters' do
-    it 'runs without error' do
-      pp = <<-EOS
-        class { 'apache':
-          service_ensure       => stopped,
-          default_ssl_vhost    => true,
-          default_ssl_cert     => '/tmp/ssl_cert',
-          default_ssl_key      => '/tmp/ssl_key',
-          default_ssl_chain    => '/tmp/ssl_chain',
-          default_ssl_ca       => '/tmp/ssl_ca',
-          default_ssl_crl_path => '/tmp/ssl_crl_path',
-          default_ssl_crl      => '/tmp/ssl_crl',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{vhostd}/15-default-ssl.conf") do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
-      it { is_expected.to contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
-      it { is_expected.to contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
-      it { is_expected.to contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
-      it { is_expected.to contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
-      it { is_expected.to contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
-    end
-  end
-
-  describe 'vhost ssl parameters' do
-    it 'runs without error' do
-      pp = <<-EOS
-        class { 'apache':
-          service_ensure       => stopped,
-        }
-
-        apache::vhost { 'test_ssl':
-          docroot              => '/tmp/test',
-          ssl                  => true,
-          ssl_cert             => '/tmp/ssl_cert',
-          ssl_key              => '/tmp/ssl_key',
-          ssl_chain            => '/tmp/ssl_chain',
-          ssl_ca               => '/tmp/ssl_ca',
-          ssl_crl_path         => '/tmp/ssl_crl_path',
-          ssl_crl              => '/tmp/ssl_crl',
-          ssl_certs_dir        => '/tmp',
-          ssl_protocol         => 'test',
-          ssl_cipher           => 'test',
-          ssl_honorcipherorder => 'test',
-          ssl_verify_client    => 'test',
-          ssl_verify_depth     => 'test',
-          ssl_options          => ['test', 'test1'],
-          ssl_proxyengine      => true,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{vhostd}/25-test_ssl.conf") do
-      it { is_expected.to be_file }
-      it { is_expected.to contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
-      it { is_expected.to contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
-      it { is_expected.to contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
-      it { is_expected.to contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
-      it { is_expected.to contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
-      it { is_expected.to contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
-      it { is_expected.to contain 'SSLProxyEngine On' }
-      it { is_expected.to contain 'SSLProtocol             test' }
-      it { is_expected.to contain 'SSLCipherSuite          test' }
-      it { is_expected.to contain 'SSLHonorCipherOrder     test' }
-      it { is_expected.to contain 'SSLVerifyClient         test' }
-      it { is_expected.to contain 'SSLVerifyDepth          test' }
-      it { is_expected.to contain 'SSLOptions test test1' }
-    end
-  end
-
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
deleted file mode 100644
index 6c2b3f46..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'disable selinux:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  it "because otherwise apache won't work" do
-    apply_manifest(%{
-      exec { "setenforce 0":
-        path   => "/bin:/sbin:/usr/bin:/usr/sbin",
-        onlyif => "which setenforce && getenforce | grep Enforcing",
-      }
-    }, :catch_failures => true)
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
deleted file mode 100644
index e006251c..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
+++ /dev/null
@@ -1,81 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'RedHat'
-    package_name = 'httpd'
-    service_name = 'httpd'
-  when 'Debian'
-    package_name = 'apache2'
-    service_name = 'apache2'
-  when 'FreeBSD'
-    package_name = 'apache22'
-    service_name = 'apache22'
-  end
-
-  context 'default parameters' do
-    it 'should work with no errors' do
-      pp = <<-EOS
-      class { 'apache': }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe package(package_name) do
-      it { is_expected.to be_installed }
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-  end
-
-  context 'custom site/mod dir parameters' do
-    # Using puppet_apply as a helper
-    it 'should work with no errors' do
-      pp = <<-EOS
-      if $::osfamily == 'RedHat' and $::selinux == 'true' {
-        $semanage_package = $::operatingsystemmajrelease ? {
-          '5'     => 'policycoreutils',
-          default => 'policycoreutils-python',
-        }
-
-        package { $semanage_package: ensure => installed }
-        exec { 'set_apache_defaults':
-          command     => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"',
-          path        => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          subscribe   => Package[$semanage_package],
-          refreshonly => true,
-        }
-        exec { 'restorecon_apache':
-          command     => 'restorecon -Rv /apache_spec',
-          path        => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          before      => Service['httpd'],
-          require     => Class['apache'],
-          subscribe   => Exec['set_apache_defaults'],
-          refreshonly => true,
-        }
-      }
-      file { '/apache_spec': ensure => directory, }
-      file { '/apache_spec/apache_custom': ensure => directory, }
-      class { 'apache':
-        mod_dir   => '/apache_spec/apache_custom/mods',
-        vhost_dir => '/apache_spec/apache_custom/vhosts',
-      }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      apply_manifest(pp, :catch_changes => true)
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
deleted file mode 100644
index 2565ce77..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'RedHat'
-  mod_dir     = '/etc/httpd/conf.d'
-  servicename = 'httpd'
-when 'Debian'
-  mod_dir     = '/etc/apache2/mods-available'
-  servicename = 'apache2'
-when 'FreeBSD'
-  mod_dir     = '/usr/local/etc/apache22/Modules'
-  servicename = 'apache22'
-end
-
-describe 'apache::default_mods class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  describe 'no default mods' do
-    # Using puppet_apply as a helper
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => false,
-        }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { is_expected.to be_running }
-    end
-  end
-
-  describe 'no default mods and failing' do
-    # Using puppet_apply as a helper
-    it 'should apply with errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => false,
-        }
-        apache::vhost { 'defaults.example.com':
-          docroot => '/var/www/defaults',
-          aliases => {
-            alias => '/css',
-            path  => '/var/www/css',
-          },
-          setenv  => 'TEST1 one',
-        }
-      EOS
-
-      apply_manifest(pp, { :expect_failures => true })
-    end
-
-    # Are these the same?
-    describe service(servicename) do
-      it { is_expected.not_to be_running }
-    end
-    describe "service #{servicename}" do
-      it 'should not be running' do
-        shell("pidof #{servicename}", {:acceptable_exit_codes => 1})
-      end
-    end
-  end
-
-  describe 'alternative default mods' do
-    # Using puppet_apply as a helper
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => [
-            'info',
-            'alias',
-            'mime',
-            'env',
-            'expires',
-          ],
-        }
-        apache::vhost { 'defaults.example.com':
-          docroot => '/var/www/defaults',
-          aliases => {
-            alias => '/css',
-            path  => '/var/www/css',
-          },
-          setenv  => 'TEST1 one',
-        }
-      EOS
-
-      apply_manifest(pp, :catch_failures => true)
-      shell('sleep 10')
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { is_expected.to be_running }
-    end
-  end
-
-  describe 'change loadfile name' do
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache': default_mods => false }
-        ::apache::mod { 'auth_basic': 
-          loadfile_name => 'zz_auth_basic.load',
-        }
-      EOS
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { is_expected.to be_running }
-    end
-
-    describe file("#{mod_dir}/zz_auth_basic.load") do
-      it { is_expected.to be_file }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
deleted file mode 100644
index b810657e..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'Debian'
-  service_name = 'apache2'
-when 'FreeBSD'
-  service_name = 'apache22'
-else
-  # Not implemented yet
-  service_name = :skip
-end
-
-describe 'apache::mod::itk class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) or service_name.equal? :skip do
-  describe 'running puppet code' do
-    # Using puppet_apply as a helper
-    it 'should work with no errors' do
-      pp = <<-EOS
-          class { 'apache':
-            mpm_module => 'itk',
-          }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-  end
-
-  describe service(service_name) do
-    it { is_expected.to be_running }
-    it { is_expected.to be_enabled }
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
deleted file mode 100644
index 5125ada0..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::dav_svn class' do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir             = '/etc/apache2/mods-available'
-    service_name        = 'apache2'
-    authz_svn_load_file = 'authz_svn.load'
-  when 'RedHat'
-    mod_dir             = '/etc/httpd/conf.d'
-    service_name        = 'httpd'
-    authz_svn_load_file = 'dav_svn_authz_svn.load'
-  when 'FreeBSD'
-    mod_dir             = '/usr/local/etc/apache22/Modules'
-    service_name        = 'apache22'
-    authz_svn_load_file = 'dav_svn_authz_svn.load'
-  end
-
-  context "default dav_svn config" do
-    it 'succeeds in puppeting dav_svn' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::dav_svn
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-
-    describe file("#{mod_dir}/dav_svn.load") do
-      it { is_expected.to contain "LoadModule dav_svn_module" }
-    end
-  end
-
-  context "dav_svn with enabled authz_svn config" do
-    it 'succeeds in puppeting dav_svn' do
-      pp= <<-EOS
-        class { 'apache': }
-        class { 'apache::mod::dav_svn':
-            authz_svn_enabled => true,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-
-    describe file("#{mod_dir}/#{authz_svn_load_file}") do
-      it { is_expected.to contain "LoadModule authz_svn_module" }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
deleted file mode 100644
index 6052cc28..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::deflate class' do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default deflate config" do
-    it 'succeeds in puppeting deflate' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::deflate
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-
-    describe file("#{mod_dir}/deflate.conf") do
-      it { is_expected.to contain "AddOutputFilterByType DEFLATE text/html text/plain text/xml" }
-      it { is_expected.to contain "AddOutputFilterByType DEFLATE text/css" }
-      it { is_expected.to contain "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript" }
-      it { is_expected.to contain "AddOutputFilterByType DEFLATE application/rss+xml" }
-      it { is_expected.to contain "DeflateFilterNote Input instream" }
-      it { is_expected.to contain "DeflateFilterNote Output outstream" }
-      it { is_expected.to contain "DeflateFilterNote Ratio ratio" }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
deleted file mode 100644
index 8e94fa08..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::fcgid class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    # Not implemented
-  when 'RedHat'
-    context "default fcgid config" do
-      it 'succeeds in puppeting fcgid' do
-        pp = <<-EOS
-          class { 'epel': } # mod_fcgid lives in epel
-          class { 'apache': }
-          class { 'apache::mod::php': } # For /usr/bin/php-cgi
-          class { 'apache::mod::fcgid':
-            options => {
-              'FcgidIPCDir'  => '/var/run/fcgidsock',
-            },
-          }
-          apache::vhost { 'fcgid.example.com':
-            port        => '80',
-            docroot     => '/var/www/fcgid',
-            directories => {
-              path        => '/var/www/fcgid',
-              options     => '+ExecCGI',
-              addhandlers => {
-                handler    => 'fcgid-script',
-                extensions => '.php',
-              },
-              fcgiwrapper => {
-                command => '/usr/bin/php-cgi',
-                suffix  => '.php',
-              }
-            },
-          }
-          file { '/var/www/fcgid/index.php':
-            ensure  => file,
-            owner   => 'root',
-            group   => 'root',
-            content => "\\n",
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-
-      describe service('httpd') do
-        it { is_expected.to be_enabled }
-        it { is_expected.to be_running }
-      end
-
-      it 'should answer to fcgid.example.com' do
-        shell("/usr/bin/curl -H 'Host: fcgid.example.com' 127.0.0.1:80") do |r|
-          expect(r.stdout).to match(/^Hello world$/)
-          expect(r.exit_code).to eq(0)
-        end
-      end
-
-      it 'should run a php-cgi process' do
-        shell("pgrep -u apache php-cgi", :acceptable_exit_codes => [0])
-      end
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
deleted file mode 100644
index ff93dbca..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::mime class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default mime config" do
-    it 'succeeds in puppeting mime' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::mime
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { is_expected.to be_enabled }
-      it { is_expected.to be_running }
-    end
-
-    describe file("#{mod_dir}/mime.conf") do
-      it { is_expected.to contain "AddType application/x-compress .Z" }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_negotiation_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_negotiation_spec.rb
deleted file mode 100644
index 33dcdd98..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_negotiation_spec.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::negotiation class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    vhost_dir    = '/etc/apache2/sites-enabled'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    vhost_dir    = '/etc/httpd/conf.d'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    vhost_dir    = '/usr/local/etc/apache22/Vhosts'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default negotiation config" do
-    it 'succeeds in puppeting negotiation' do
-      pp= <<-EOS
-        class { '::apache': }
-        class { '::apache::mod::negotiation': }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{$mod_dir}/negotiation.conf") do
-      it { should contain "LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
-ForceLanguagePriority Prefer Fallback" }
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-  end
-
-  context "with alternative force_language_priority" do
-    it 'succeeds in puppeting negotiation' do
-      pp= <<-EOS
-        class { '::apache': }
-        class { '::apache::mod::negotiation':
-          force_language_priority => 'Prefer',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{$mod_dir}/negotiation.conf") do
-      it { should contain "ForceLanguagePriority Prefer" }
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-  end
-
-  context "with alternative language_priority" do
-    it 'succeeds in puppeting negotiation' do
-      pp= <<-EOS
-        class { '::apache': }
-        class { '::apache::mod::negotiation':
-          language_priority => [ 'en', 'es' ],
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{$mod_dir}/negotiation.conf") do
-      it { should contain "LanguagePriority en es" }
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-  end
-end
diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
deleted file mode 100644
index 0bc07389..00000000
--- a/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::pagespeed class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    vhost_dir    = '/etc/apache2/sites-enabled'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    vhost_dir    = '/etc/httpd/conf.d'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    vhost_dir    = '/usr/local/etc/apache22/Vhosts'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default pagespeed config" do
-    it 'succeeds in puppeting pagespeed' do
-      pp= <<-EOS
-        if $::osfamily == 'Debian' {
-          class { 'apt': }
-
-          apt::source { 'mod-pagespeed':
-            key         => '7FAC5991',
-            key_server  => 'pgp.mit.edu',
-            location    => 'http://dl.google.com/linux/mod-pagespeed/deb/',
-            release     => 'stable',
-            repos       => 'main',
-            include_src => false,
-            before      => Class['apache'],
-          } 
-        } elsif $::osfamily == 'RedHat' {
-         yumrepo { 'mod-pagespeed':
-          baseurl  => "http://dl.google.com/linux/mod-pagespeed/rpm/stable/$::architecture",
-            enabled  => 1,
-            gpgcheck => 1,
-            gpgkey   => 'https://dl-ssl.google.com/linux/linux_signing_key.pub',
-            before   => Class['apache'],
-          }
-        }
-
-        class { 'apache':
-          mpm_module => 'prefork',
-        }
-        class { 'apache::mod::pagespeed':
-          enable_filters  => ['remove_comments'],
-          disable_filters => ['extend_cache'],
-          forbid_filters  => ['rewrite_javascript'],
-        }
-        apache::vhost { 'pagespeed.example.com':
-          port    => '80',
-          docroot => '/var/www/pagespeed',
-        }
-        host { 'pagespeed.example.com': ip => '127.0.0.1', }
-        file { '/var/www/pagespeed/index.html':
-          ensure  => file,
-          content => "\n\n\n

Hello World!

\n\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - describe file("#{mod_dir}/pagespeed.conf") do - it { is_expected.to contain "AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html" } - it { is_expected.to contain "ModPagespeedEnableFilters remove_comments" } - it { is_expected.to contain "ModPagespeedDisableFilters extend_cache" } - it { is_expected.to contain "ModPagespeedForbidFilters rewrite_javascript" } - end - - it 'should answer to pagespeed.example.com and include and be stripped of comments by mod_pagespeed' do - shell("/usr/bin/curl pagespeed.example.com:80") do |r| - expect(r.stdout).to match(//) - expect(r.stdout).not_to match(//) - expect(r.exit_code).to eq(0) - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb deleted file mode 100644 index 54b6a773..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb +++ /dev/null @@ -1,300 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::passenger class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - service_name = 'apache2' - mod_dir = '/etc/apache2/mods-available/' - conf_file = "#{mod_dir}passenger.conf" - load_file = "#{mod_dir}passenger.load" - - case fact('operatingsystem') - when 'Ubuntu' - case fact('lsbdistrelease') - when '10.04' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - when '12.04' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - when '14.04' - passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' - passenger_ruby = '/usr/bin/ruby' - passenger_default_ruby = '/usr/bin/ruby' - else - # This may or may not work on Ubuntu releases other than the above - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - end - when 'Debian' - case fact('lsbdistcodename') - when 'wheezy' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - else - # This may or may not work on Debian releases other than the above - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - end - end - - passenger_module_path = '/usr/lib/apache2/modules/mod_passenger.so' - rackapp_user = 'www-data' - rackapp_group = 'www-data' - when 'RedHat' - service_name = 'httpd' - mod_dir = '/etc/httpd/conf.d/' - conf_file = "#{mod_dir}passenger.conf" - load_file = "#{mod_dir}passenger.load" - # sometimes installs as 3.0.12, sometimes as 3.0.19 - so just check for the stable part - passenger_root = '/usr/lib/ruby/gems/1.8/gems/passenger-3.0.1' - passenger_ruby = '/usr/bin/ruby' - passenger_tempdir = '/var/run/rubygem-passenger' - passenger_module_path = 'modules/mod_passenger.so' - rackapp_user = 'apache' - rackapp_group = 'apache' - end - - pp_rackapp = <<-EOS - /* a simple ruby rack 'hellow world' app */ - file { '/var/www/passenger': - ensure => directory, - owner => '#{rackapp_user}', - group => '#{rackapp_group}', - require => Class['apache::mod::passenger'], - } - file { '/var/www/passenger/config.ru': - ensure => file, - owner => '#{rackapp_user}', - group => '#{rackapp_group}', - content => "app = proc { |env| [200, { \\"Content-Type\\" => \\"text/html\\" }, [\\"hello world\\"]] }\\nrun app", - require => File['/var/www/passenger'] , - } - apache::vhost { 'passenger.example.com': - port => '80', - docroot => '/var/www/passenger/public', - docroot_group => '#{rackapp_group}' , - docroot_owner => '#{rackapp_user}' , - custom_fragment => "PassengerRuby #{passenger_ruby}\\nRailsEnv development" , - require => File['/var/www/passenger/config.ru'] , - } - host { 'passenger.example.com': ip => '127.0.0.1', } - EOS - - case fact('osfamily') - when 'Debian' - context "default passenger config" do - it 'succeeds in puppeting passenger' do - pp = <<-EOS - /* stock apache and mod_passenger */ - class { 'apache': } - class { 'apache::mod::passenger': } - #{pp_rackapp} - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - describe file(conf_file) do - it { is_expected.to contain "PassengerRoot \"#{passenger_root}\"" } - - case fact('operatingsystem') - when 'Ubuntu' - case fact('lsbdistrelease') - when '10.04' - it { is_expected.to contain "PassengerRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerDefaultRuby/" } - when '12.04' - it { is_expected.to contain "PassengerRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerDefaultRuby/" } - when '14.04' - it { is_expected.to contain "PassengerDefaultRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerRuby/" } - else - # This may or may not work on Ubuntu releases other than the above - it { is_expected.to contain "PassengerRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerDefaultRuby/" } - end - when 'Debian' - case fact('lsbdistcodename') - when 'wheezy' - it { is_expected.to contain "PassengerRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerDefaultRuby/" } - else - # This may or may not work on Debian releases other than the above - it { is_expected.to contain "PassengerRuby \"#{passenger_ruby}\"" } - it { is_expected.not_to contain "/PassengerDefaultRuby/" } - end - end - end - - describe file(load_file) do - it { is_expected.to contain "LoadModule passenger_module #{passenger_module_path}" } - end - - it 'should output status via passenger-memory-stats' do - shell("sudo /usr/sbin/passenger-memory-stats") do |r| - expect(r.stdout).to match(/Apache processes/) - expect(r.stdout).to match(/Nginx processes/) - expect(r.stdout).to match(/Passenger processes/) - - # passenger-memory-stats output on Ubuntu 14.04 does not contain - # these two lines - unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' - expect(r.stdout).to match(/### Processes: [0-9]+/) - expect(r.stdout).to match(/### Total private dirty RSS: [0-9\.]+ MB/) - end - - expect(r.exit_code).to eq(0) - end - end - - # passenger-status fails under stock ubuntu-server-12042-x64 + mod_passenger, - # even when the passenger process is successfully installed and running - unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '12.04' - it 'should output status via passenger-status' do - # xml output not available on ubunutu <= 10.04, so sticking with default pool output - shell("/usr/sbin/passenger-status") do |r| - # spacing may vary - expect(r.stdout).to match(/[\-]+ General information [\-]+/) - if fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' - expect(r.stdout).to match(/Max pool size[ ]+: [0-9]+/) - expect(r.stdout).to match(/Processes[ ]+: [0-9]+/) - expect(r.stdout).to match(/Requests in top-level queue[ ]+: [0-9]+/) - else - expect(r.stdout).to match(/max[ ]+= [0-9]+/) - expect(r.stdout).to match(/count[ ]+= [0-9]+/) - expect(r.stdout).to match(/active[ ]+= [0-9]+/) - expect(r.stdout).to match(/inactive[ ]+= [0-9]+/) - expect(r.stdout).to match(/Waiting on global queue: [0-9]+/) - end - - expect(r.exit_code).to eq(0) - end - end - end - - it 'should answer to passenger.example.com' do - shell("/usr/bin/curl passenger.example.com:80") do |r| - expect(r.stdout).to match(/^hello world<\/b>$/) - expect(r.exit_code).to eq(0) - end - end - - end - - when 'RedHat' - # no fedora 18 passenger package yet, and rhel5 packages only exist for ruby 1.8.5 - unless (fact('operatingsystem') == 'Fedora' and fact('operatingsystemrelease').to_f >= 18) or (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5' and fact('rubyversion') != '1.8.5') - - if fact('operatingsystem') == 'RedHat' and fact('operatingsystemmajrelease') == '7' - pending('test passenger - RHEL7 packages don\'t exist') - else - context "default passenger config" do - it 'succeeds in puppeting passenger' do - pp = <<-EOS - /* EPEL and passenger repositories */ - class { 'epel': } - exec { 'passenger.repo GPG key': - command => '/usr/bin/curl -o /etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', - creates => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - } - file { 'passenger.repo GPG key': - ensure => file, - path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - require => Exec['passenger.repo GPG key'], - } - epel::rpm_gpg_key { 'passenger.stealthymonkeys.com': - path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - require => [ - Class['epel'], - File['passenger.repo GPG key'], - ] - } - $releasever_string = $operatingsystem ? { - 'Scientific' => '6', - default => '$releasever', - } - yumrepo { 'passenger': - baseurl => "http://passenger.stealthymonkeys.com/rhel/${releasever_string}/\\$basearch" , - descr => "Red Hat Enterprise ${releasever_string} - Phusion Passenger", - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', - mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors', - require => [ - Epel::Rpm_gpg_key['passenger.stealthymonkeys.com'], - ], - } - /* apache and mod_passenger */ - class { 'apache': - require => [ - Class['epel'], - ], - } - class { 'apache::mod::passenger': - require => [ - Yumrepo['passenger'] - ], - } - #{pp_rackapp} - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - describe file(conf_file) do - it { is_expected.to contain "PassengerRoot #{passenger_root}" } - it { is_expected.to contain "PassengerRuby #{passenger_ruby}" } - it { is_expected.to contain "PassengerTempDir #{passenger_tempdir}" } - end - - describe file(load_file) do - it { is_expected.to contain "LoadModule passenger_module #{passenger_module_path}" } - end - - it 'should output status via passenger-memory-stats' do - shell("sudo /usr/bin/passenger-memory-stats") do |r| - expect(r.stdout).to match(/Apache processes/) - expect(r.stdout).to match(/Nginx processes/) - expect(r.stdout).to match(/Passenger processes/) - expect(r.stdout).to match(/### Processes: [0-9]+/) - expect(r.stdout).to match(/### Total private dirty RSS: [0-9\.]+ MB/) - - expect(r.exit_code).to eq(0) - end - end - - it 'should output status via passenger-status' do - shell("PASSENGER_TMPDIR=/var/run/rubygem-passenger /usr/bin/passenger-status") do |r| - # spacing may vary - r.stdout.should =~ /[\-]+ General information [\-]+/ - r.stdout.should =~ /max[ ]+= [0-9]+/ - r.stdout.should =~ /count[ ]+= [0-9]+/ - r.stdout.should =~ /active[ ]+= [0-9]+/ - r.stdout.should =~ /inactive[ ]+= [0-9]+/ - r.stdout.should =~ /Waiting on global queue: [0-9]+/ - - r.exit_code.should == 0 - end - end - - it 'should answer to passenger.example.com' do - shell("/usr/bin/curl passenger.example.com:80") do |r| - r.stdout.should =~ /^hello world<\/b>$/ - r.exit_code.should == 0 - end - end - end - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb deleted file mode 100644 index 8ce732b9..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::php class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - vhost_dir = '/etc/apache2/sites-enabled' - mod_dir = '/etc/apache2/mods-available' - service_name = 'apache2' - when 'RedHat' - vhost_dir = '/etc/httpd/conf.d' - mod_dir = '/etc/httpd/conf.d' - service_name = 'httpd' - when 'FreeBSD' - vhost_dir = '/usr/local/etc/apache22/Vhosts' - mod_dir = '/usr/local/etc/apache22/Modules' - service_name = 'apache22' - end - - context "default php config" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': } - apache::vhost { 'php.example.com': - port => '80', - docroot => '/var/www/php', - } - host { 'php.example.com': ip => '127.0.0.1', } - file { '/var/www/php/index.php': - ensure => file, - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - describe file("#{mod_dir}/php5.conf") do - it { is_expected.to contain "DirectoryIndex index.php" } - end - - it 'should answer to php.example.com' do - shell("/usr/bin/curl php.example.com:80") do |r| - expect(r.stdout).to match(/PHP Version/) - expect(r.exit_code).to eq(0) - end - end - end - - context "custom extensions, php_admin_flag, and php_admin_value" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': - extensions => ['.php','.php5'], - } - apache::vhost { 'php.example.com': - port => '80', - docroot => '/var/www/php', - php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', }, - php_admin_flags => { 'engine' => 'on', }, - } - host { 'php.example.com': ip => '127.0.0.1', } - file { '/var/www/php/index.php5': - ensure => file, - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - describe file("#{vhost_dir}/25-php.example.com.conf") do - it { is_expected.to contain " php_admin_flag engine on" } - it { is_expected.to contain " php_admin_value open_basedir /var/www/php/:/usr/share/pear/" } - end - - it 'should answer to php.example.com' do - shell("/usr/bin/curl php.example.com:80") do |r| - expect(r.stdout).to match(/\/usr\/share\/pear\//) - expect(r.exit_code).to eq(0) - end - end - end - - context "provide custom config file" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# somecontent" } - end - end - - context "provide content and template config file" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - template => 'apache/mod/php5.conf.erb', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# somecontent" } - end - end - - context "provide source has priority over content" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - source => 'puppet:///modules/apache/spec', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# This is a file only for spec testing" } - end - end - - context "provide source has priority over template" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - template => 'apache/mod/php5.conf.erb', - source => 'puppet:///modules/apache/spec', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# This is a file only for spec testing" } - end - end - -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb deleted file mode 100644 index eab162b1..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::proxy_html class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - service_name = 'apache2' - when 'RedHat' - service_name = 'httpd' - when 'FreeBSD' - service_name = 'apache22' - end - - context "default proxy_html config" do - if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/ - it 'adds epel' do - pp = "class { 'epel': }" - apply_manifest(pp, :catch_failures => true) - end - end - - it 'succeeds in puppeting proxy_html' do - pp= <<-EOS - class { 'apache': } - class { 'apache::mod::proxy': } - class { 'apache::mod::proxy_http': } - # mod_proxy_html doesn't exist in RHEL5 - if $::osfamily == 'RedHat' and $::operatingsystemmajrelease != '5' { - class { 'apache::mod::proxy_html': } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb deleted file mode 100644 index 1b915814..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::suphp class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - context "default suphp config" do - it 'succeeds in puppeting suphp' do - pp = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': } - class { 'apache::mod::suphp': } - apache::vhost { 'suphp.example.com': - port => '80', - docroot => '/var/www/suphp', - } - host { 'suphp.example.com': ip => '127.0.0.1', } - file { '/var/www/suphp/index.php': - ensure => file, - owner => 'daemon', - group => 'daemon', - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service('apache2') do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to suphp.example.com' do - shell("/usr/bin/curl suphp.example.com:80") do |r| - expect(r.stdout).to match(/^daemon$/) - expect(r.exit_code).to eq(0) - end - end - end - when 'RedHat' - # Not implemented yet - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index 2ad90b86..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index ce47212a..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml deleted file mode 100644 index 4e2cb809..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-vbox436-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index e642e099..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index cbbbfb2c..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml deleted file mode 100644 index a38902d8..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-i386: - roles: - - master - platform: debian-7-i386 - box : debian-73-i386-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index f9cf0c9b..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml deleted file mode 100644 index ce47212a..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 086cae99..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml deleted file mode 100644 index a9f01d5f..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - sles-11sp1-x64: - roles: - - master - platform: sles-11-x86_64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml deleted file mode 100644 index f4b2366f..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1310-x64: - roles: - - master - platform: ubuntu-13.10-amd64 - box : ubuntu-server-1310-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index cba1cd04..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box : puppetlabs/ubuntu-14.04-64-nocm - box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb deleted file mode 100644 index 562ff532..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'RedHat' - servicename = 'httpd' -when 'Debian' - servicename = 'apache2' -when 'FreeBSD' - servicename = 'apache22' -end - -case fact('osfamily') -when 'FreeBSD' - describe 'apache::mod::event class' do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'event', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { is_expected.to be_running } - it { is_expected.to be_enabled } - end - end -end - -describe 'apache::mod::worker class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'worker', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { is_expected.to be_running } - it { is_expected.to be_enabled } - end -end - -describe 'apache::mod::prefork class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { is_expected.to be_running } - it { is_expected.to be_enabled } - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb deleted file mode 100644 index b51ca386..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'adding dependencies in between the base class and service class' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': } - file { '/tmp/test': - require => Class['apache'], - notify => Class['apache::service'], - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 085845db..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'should fail' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'test.lan': - docroot => '/var/www', - } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) - end -end diff --git a/puphpet/puppet/modules/apache/spec/acceptance/version.rb b/puphpet/puppet/modules/apache/spec/acceptance/version.rb deleted file mode 100644 index 27498354..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/version.rb +++ /dev/null @@ -1,57 +0,0 @@ -_osfamily = fact('osfamily') -_operatingsystem = fact('operatingsystem') -_operatingsystemrelease = fact('operatingsystemrelease').to_f - -case _osfamily -when 'RedHat' - $confd_dir = '/etc/httpd/conf.d' - $conf_file = '/etc/httpd/conf/httpd.conf' - $ports_file = '/etc/httpd/conf/ports.conf' - $vhost_dir = '/etc/httpd/conf.d' - $vhost = '/etc/httpd/conf.d/15-default.conf' - $run_dir = '/var/run/httpd' - $service_name = 'httpd' - $package_name = 'httpd' - $error_log = 'error_log' - $suphp_handler = 'php5-script' - $suphp_configpath = 'undef' - - if (_operatingsystem == 'Fedora' and _operatingsystemrelease >= 18) or (_operatingsystem != 'Fedora' and _operatingsystemrelease >= 7) - $apache_version = '2.4' - else - $apache_version = '2.2' - end -when 'Debian' - $confd_dir = '/etc/apache2/mods-available' - $conf_file = '/etc/apache2/apache2.conf' - $ports_file = '/etc/apache2/ports.conf' - $vhost = '/etc/apache2/sites-available/15-default.conf' - $vhost_dir = '/etc/apache2/sites-enabled' - $run_dir = '/var/run/apache2' - $service_name = 'apache2' - $package_name = 'apache2' - $error_log = 'error.log' - $suphp_handler = 'x-httpd-php' - $suphp_configpath = '/etc/php5/apache2' - - if _operatingsystem == 'Ubuntu' and _operatingsystemrelease >= 13.10 - $apache_version = '2.4' - else - $apache_version = '2.2' - end -when 'FreeBSD' - $confd_dir = '/usr/local/etc/apache22/Includes' - $conf_file = '/usr/local/etc/apache22/httpd.conf' - $ports_file = '/usr/local/etc/apache22/Includes/ports.conf' - $vhost = '/usr/local/etc/apache22/Vhosts/15-default.conf' - $vhost_dir = '/usr/local/etc/apache22/Vhosts' - $run_dir = '/var/run/apache22' - $service_name = 'apache22' - $package_name = 'apache22' - $error_log = 'http-error.log' - - $apache_version = '2.2' -else - $apache_version = '0' -end - diff --git a/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb b/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb deleted file mode 100644 index 12effe76..00000000 --- a/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb +++ /dev/null @@ -1,1178 +0,0 @@ -require 'spec_helper_acceptance' -require_relative './version.rb' - -describe 'apache::vhost define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'no default vhosts' do - it 'should create no default vhosts' do - pp = <<-EOS - class { 'apache': - default_vhost => false, - default_ssl_vhost => false, - service_ensure => stopped - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { is_expected.not_to be_file } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { is_expected.not_to be_file } - end - end - - context "default vhost without ssl" do - it 'should create a default vhost config' do - pp = <<-EOS - class { 'apache': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { is_expected.to contain '' } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { is_expected.not_to be_file } - end - end - - context 'default vhost with ssl' do - it 'should create default vhost configs' do - pp = <<-EOS - file { '#{$run_dir}': - ensure => 'directory', - recurse => true, - } - - class { 'apache': - default_ssl_vhost => true, - require => File['#{$run_dir}'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { is_expected.to contain '' } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { is_expected.to contain '' } - it { is_expected.to contain "SSLEngine on" } - end - end - - context 'new vhost on port 80' do - it 'should configure an apache vhost' do - pp = <<-EOS - class { 'apache': } - file { '#{$run_dir}': - ensure => 'directory', - recurse => true, - } - - apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', - require => File['#{$run_dir}'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-first.example.com.conf") do - it { is_expected.to contain '' } - it { is_expected.to contain "ServerName first.example.com" } - end - end - - context 'new proxy vhost on port 80' do - it 'should configure an apache proxy vhost' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'proxy.example.com': - port => '80', - docroot => '/var/www/proxy', - proxy_pass => [ - { 'path' => '/foo', 'url' => 'http://backend-foo/'}, - ], - proxy_preserve_host => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-proxy.example.com.conf") do - it { is_expected.to contain '' } - it { is_expected.to contain "ServerName proxy.example.com" } - it { is_expected.to contain "ProxyPass" } - it { is_expected.to contain "ProxyPreserveHost On" } - it { is_expected.not_to contain "" } - end - end - - context 'new vhost on port 80' do - it 'should configure two apache vhosts' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', - } - host { 'first.example.com': ip => '127.0.0.1', } - file { '/var/www/first/index.html': - ensure => file, - content => "Hello from first\\n", - } - apache::vhost { 'second.example.com': - port => '80', - docroot => '/var/www/second', - } - host { 'second.example.com': ip => '127.0.0.1', } - file { '/var/www/second/index.html': - ensure => file, - content => "Hello from second\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to first.example.com' do - shell("/usr/bin/curl first.example.com:80", {:acceptable_exit_codes => 0}) do |r| - expect(r.stdout).to eq("Hello from first\n") - end - end - - it 'should answer to second.example.com' do - shell("/usr/bin/curl second.example.com:80", {:acceptable_exit_codes => 0}) do |r| - expect(r.stdout).to eq("Hello from second\n") - end - end - end - - context 'apache_directories' do - describe 'readme example, adapted' do - it 'should configure a vhost with Files' do - pp = <<-EOS - class { 'apache': } - - if versioncmp($apache::apache_version, '2.4') >= 0 { - $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'require' => 'all denied', } - } else { - $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'deny' => 'from all', } - } - - $_directories = [ - { 'path' => '/var/www/files', }, - $_files_match_directory, - ] - - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => $_directories, - } - file { '/var/www/files/index.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/index.html.bak': - ensure => file, - content => "Hello World\\n", - } - host { 'files.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to files.example.net' do - expect(shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout).to eq("Hello World\n") - expect(shell("/usr/bin/curl -sSf files.example.net:80/index.html.bak", {:acceptable_exit_codes => 22}).stderr).to match(/curl: \(22\) The requested URL returned error: 403/) - end - end - - describe 'other Directory options' do - it 'should configure a vhost with multiple Directory sections' do - pp = <<-EOS - class { 'apache': } - - if versioncmp($apache::apache_version, '2.4') >= 0 { - $_files_match_directory = { 'path' => 'private.html$', 'provider' => 'filesmatch', 'require' => 'all denied' } - } else { - $_files_match_directory = [ - { 'path' => 'private.html$', 'provider' => 'filesmatch', 'deny' => 'from all' }, - { 'path' => '/bar/bar.html', 'provider' => 'location', allow => [ 'from 127.0.0.1', ] }, - ] - } - - $_directories = [ - { 'path' => '/var/www/files', }, - { 'path' => '/foo/', 'provider' => 'location', 'directoryindex' => 'notindex.html', }, - $_files_match_directory, - ] - - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => $_directories, - } - file { '/var/www/files/foo': - ensure => directory, - } - file { '/var/www/files/foo/notindex.html': - ensure => file, - content => "Hello Foo\\n", - } - file { '/var/www/files/private.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/bar': - ensure => directory, - } - file { '/var/www/files/bar/bar.html': - ensure => file, - content => "Hello Bar\\n", - } - host { 'files.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to files.example.net' do - expect(shell("/usr/bin/curl -sSf files.example.net:80/").stdout).to eq("Hello World\n") - expect(shell("/usr/bin/curl -sSf files.example.net:80/foo/").stdout).to eq("Hello Foo\n") - expect(shell("/usr/bin/curl -sSf files.example.net:80/private.html", {:acceptable_exit_codes => 22}).stderr).to match(/curl: \(22\) The requested URL returned error: 403/) - expect(shell("/usr/bin/curl -sSf files.example.net:80/bar/bar.html").stdout).to eq("Hello Bar\n") - end - end - - describe 'SetHandler directive' do - it 'should configure a vhost with a SetHandler directive' do - pp = <<-EOS - class { 'apache': } - apache::mod { 'status': } - host { 'files.example.net': ip => '127.0.0.1', } - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => [ - { path => '/var/www/files', }, - { path => '/server-status', provider => 'location', sethandler => 'server-status', }, - ], - } - file { '/var/www/files/index.html': - ensure => file, - content => "Hello World\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to files.example.net' do - expect(shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout).to eq("Hello World\n") - expect(shell("/usr/bin/curl -sSf files.example.net:80/server-status?auto").stdout).to match(/Scoreboard: /) - end - end - - describe 'Satisfy and Auth directive' do - it 'should configure a vhost with Satisfy and Auth directive' do - pp = <<-EOS - class { 'apache': } - host { 'files.example.net': ip => '127.0.0.1', } - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => [ - { - path => '/var/www/files/foo', - auth_type => 'Basic', - auth_name => 'Basic Auth', - auth_user_file => '/var/www/htpasswd', - auth_require => "valid-user", - }, - { - path => '/var/www/files/bar', - auth_type => 'Basic', - auth_name => 'Basic Auth', - auth_user_file => '/var/www/htpasswd', - auth_require => 'valid-user', - satisfy => 'Any', - }, - { - path => '/var/www/files/baz', - allow => 'from 10.10.10.10', - auth_type => 'Basic', - auth_name => 'Basic Auth', - auth_user_file => '/var/www/htpasswd', - auth_require => 'valid-user', - satisfy => 'Any', - }, - ], - } - file { '/var/www/files/foo': - ensure => directory, - } - file { '/var/www/files/bar': - ensure => directory, - } - file { '/var/www/files/baz': - ensure => directory, - } - file { '/var/www/files/foo/index.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/bar/index.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/baz/index.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/htpasswd': - ensure => file, - content => "login:IZ7jMcLSx0oQk", # "password" as password - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to files.example.net' do - shell("/usr/bin/curl -sSf files.example.net:80/foo/index.html", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 401/) - shell("/usr/bin/curl -sSf -u login:password files.example.net:80/foo/index.html").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf files.example.net:80/bar/index.html").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf -u login:password files.example.net:80/bar/index.html").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf files.example.net:80/baz/index.html", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 401/) - shell("/usr/bin/curl -sSf -u login:password files.example.net:80/baz/index.html").stdout.should eq("Hello World\n") - end - end - end - - case fact('lsbdistcodename') - when 'precise', 'wheezy' - context 'vhost fallbackresouce example' do - it 'should configure a vhost with Fallbackresource' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'fallback.example.net': - docroot => '/var/www/fallback', - fallbackresource => '/index.html' - } - file { '/var/www/fallback/index.html': - ensure => file, - content => "Hello World\\n", - } - host { 'fallback.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to fallback.example.net' do - shell("/usr/bin/curl fallback.example.net:80/Does/Not/Exist") do |r| - expect(r.stdout).to eq("Hello World\n") - end - end - - end - else - # The current stable RHEL release (6.4) comes with Apache httpd 2.2.15 - # That was released March 6, 2010. - # FallbackResource was backported to 2.2.16, and released July 25, 2010. - # Ubuntu Lucid (10.04) comes with apache2 2.2.14, released October 3, 2009. - # https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/STATUS - end - - context 'virtual_docroot hosting separate sites' do - it 'should configure a vhost with VirtualDocumentRoot' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'virt.example.com': - vhost_name => '*', - serveraliases => '*virt.example.com', - port => '80', - docroot => '/var/www/virt', - virtual_docroot => '/var/www/virt/%1', - } - host { 'virt.example.com': ip => '127.0.0.1', } - host { 'a.virt.example.com': ip => '127.0.0.1', } - host { 'b.virt.example.com': ip => '127.0.0.1', } - file { [ '/var/www/virt/a', '/var/www/virt/b', ]: ensure => directory, } - file { '/var/www/virt/a/index.html': ensure => file, content => "Hello from a.virt\\n", } - file { '/var/www/virt/b/index.html': ensure => file, content => "Hello from b.virt\\n", } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should answer to a.virt.example.com' do - shell("/usr/bin/curl a.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| - expect(r.stdout).to eq("Hello from a.virt\n") - end - end - - it 'should answer to b.virt.example.com' do - shell("/usr/bin/curl b.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| - expect(r.stdout).to eq("Hello from b.virt\n") - end - end - end - - context 'proxy_pass for alternative vhost' do - it 'should configure a local vhost and a proxy vhost' do - apply_manifest(%{ - class { 'apache': default_vhost => false, } - apache::vhost { 'localhost': - docroot => '/var/www/local', - ip => '127.0.0.1', - port => '8888', - } - apache::listen { '*:80': } - apache::vhost { 'proxy.example.com': - docroot => '/var/www', - port => '80', - add_listen => false, - proxy_pass => { - 'path' => '/', - 'url' => 'http://localhost:8888/subdir/', - }, - } - host { 'proxy.example.com': ip => '127.0.0.1', } - file { ['/var/www/local', '/var/www/local/subdir']: ensure => directory, } - file { '/var/www/local/subdir/index.html': - ensure => file, - content => "Hello from localhost\\n", - } - }, :catch_failures => true) - end - - describe service($service_name) do - it { is_expected.to be_enabled } - it { is_expected.to be_running } - end - - it 'should get a response from the back end' do - shell("/usr/bin/curl --max-redirs 0 proxy.example.com:80") do |r| - expect(r.stdout).to eq("Hello from localhost\n") - expect(r.exit_code).to eq(0) - end - end - end - - describe 'ip_based' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - ip_based => true, - servername => 'test.server', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { is_expected.to be_file } - it { is_expected.not_to contain 'NameVirtualHost test.server' } - end - end - - describe 'add_listen' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': default_vhost => false } - host { 'testlisten.server': ip => '127.0.0.1' } - apache::listen { '81': } - apache::vhost { 'testlisten.server': - docroot => '/tmp', - port => '80', - add_listen => false, - servername => 'testlisten.server', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { is_expected.to be_file } - it { is_expected.not_to contain 'Listen 80' } - it { is_expected.to contain 'Listen 81' } - end - end - - describe 'docroot' do - it 'applies cleanly' do - pp = <<-EOS - user { 'test_owner': ensure => present, } - group { 'test_group': ensure => present, } - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp/test', - docroot_owner => 'test_owner', - docroot_group => 'test_group', - docroot_mode => '0750', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/tmp/test') do - it { is_expected.to be_directory } - it { is_expected.to be_owned_by 'test_owner' } - it { is_expected.to be_grouped_into 'test_group' } - it { is_expected.to be_mode 750 } - end - end - - describe 'default_vhost' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - default_vhost => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { is_expected.to be_file } - if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '7' - it { is_expected.not_to contain 'NameVirtualHost test.server' } - elsif fact('operatingsystem') == 'Ubuntu' and fact('operatingsystemrelease') =~ /(14\.04|13\.10)/ - it { is_expected.not_to contain 'NameVirtualHost test.server' } - else - it { is_expected.to contain 'NameVirtualHost test.server' } - end - end - - describe file("#{$vhost_dir}/10-test.server.conf") do - it { is_expected.to be_file } - end - end - - describe 'options' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - options => ['Indexes','FollowSymLinks', 'ExecCGI'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'Options Indexes FollowSymLinks ExecCGI' } - end - end - - describe 'override' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - override => ['All'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'AllowOverride All' } - end - end - - describe 'logroot' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain ' CustomLog "/tmp' } - end - end - - ['access', 'error'].each do |logtype| - case logtype - when 'access' - logname = 'CustomLog' - when 'error' - logname = 'ErrorLog' - end - - describe "#{logtype}_log" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log => false, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.not_to contain " #{logname} \"/tmp" } - end - end - - describe "#{logtype}_log_pipe" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log_pipe => '|/bin/sh', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain " #{logname} \"|/bin/sh" } - end - end - - describe "#{logtype}_log_syslog" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log_syslog => 'syslog', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain " #{logname} \"syslog\"" } - end - end - end - - describe 'access_log_format' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - access_log_syslog => 'syslog', - access_log_format => '%h %l', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'CustomLog "syslog" "%h %l"' } - end - end - - describe 'access_log_env_var' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - access_log_syslog => 'syslog', - access_log_env_var => 'admin', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'CustomLog "syslog" combined env=admin' } - end - end - - describe 'aliases' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - aliases => [{ alias => '/image', path => '/ftp/pub/image' }], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'Alias /image "/ftp/pub/image"' } - end - end - - describe 'scriptaliases' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - scriptaliases => [{ alias => '/myscript', path => '/usr/share/myscript', }], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'ScriptAlias /myscript "/usr/share/myscript"' } - end - end - - describe 'proxy' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - proxy_dest => 'test2', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'ProxyPass / test2/' } - end - end - - describe 'actions' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - action => 'php-fastcgi', - } - EOS - pp = pp + "\nclass { 'apache::mod::actions': }" if fact('osfamily') == 'Debian' - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'Action php-fastcgi /cgi-bin virtual' } - end - end - - describe 'suphp' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - suphp_addhandler => '#{$suphp_handler}', - suphp_engine => 'on', - suphp_configpath => '#{$suphp_configpath}', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain "suPHP_AddHandler #{$suphp_handler}" } - it { is_expected.to contain 'suPHP_Engine on' } - it { is_expected.to contain "suPHP_ConfigPath \"#{$suphp_configpath}\"" } - end - end - - describe 'no_proxy_uris' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - proxy_dest => 'http://test2', - no_proxy_uris => [ 'http://test2/test' ], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'ProxyPass / http://test2/' } - it { is_expected.to contain 'ProxyPass http://test2/test !' } - end - end - - describe 'redirect' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - redirect_source => ['/images'], - redirect_dest => ['http://test.server/'], - redirect_status => ['permanent'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'Redirect permanent /images http://test.server/' } - end - end - - # Passenger isn't even in EPEL on el-5 - if default['platform'] !~ /^el-5/ - if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '7' - pending('Since we don\'t have passenger on RHEL7 rack_base_uris tests will fail') - else - describe 'rack_base_uris' do - if fact('osfamily') == 'RedHat' - it 'adds epel' do - pp = "class { 'epel': }" - apply_manifest(pp, :catch_failures => true) - end - end - - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - rack_base_uris => ['/test'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'RackBaseURI /test' } - end - end - end - end - - - describe 'request_headers' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - request_headers => ['append MirrorID "mirror 12"'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'append MirrorID "mirror 12"' } - end - end - - describe 'rewrite rules' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - rewrites => [ - { comment => 'test', - rewrite_cond => '%{HTTP_USER_AGENT} ^Lynx/ [OR]', - rewrite_rule => ['^index\.html$ welcome.html'], - } - ], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain '#test' } - it { is_expected.to contain 'RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]' } - it { is_expected.to contain 'RewriteRule ^index.html$ welcome.html' } - end - end - - describe 'setenv/setenvif' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - setenv => ['TEST /test'], - setenvif => ['Request_URI "\.gif$" object_is_image=gif'] - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'SetEnv TEST /test' } - it { is_expected.to contain 'SetEnvIf Request_URI "\.gif$" object_is_image=gif' } - end - end - - describe 'block' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - block => 'scm', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain '' } - end - end - - describe 'wsgi' do - it 'import_script applies cleanly' do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::wsgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - wsgi_application_group => '%{GLOBAL}', - wsgi_daemon_process => 'wsgi', - wsgi_daemon_process_options => {processes => '2'}, - wsgi_process_group => 'nobody', - wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - it 'import_script applies cleanly', :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::wsgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - wsgi_application_group => '%{GLOBAL}', - wsgi_daemon_process => 'wsgi', - wsgi_daemon_process_options => {processes => '2'}, - wsgi_import_script => '/test1', - wsgi_import_script_options => { application-group => '%{GLOBAL}', process-group => 'wsgi' }, - wsgi_process_group => 'nobody', - wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf"), :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do - it { is_expected.to be_file } - it { is_expected.to contain 'WSGIApplicationGroup %{GLOBAL}' } - it { is_expected.to contain 'WSGIDaemonProcess wsgi processes=2' } - it { is_expected.to contain 'WSGIImportScript /test1 application-group=%{GLOBAL} process-group=wsgi' } - it { is_expected.to contain 'WSGIProcessGroup nobody' } - it { is_expected.to contain 'WSGIScriptAlias /test "/test1"' } - it { is_expected.to contain 'WSGIPassAuthorization On' } - end - end - - describe 'custom_fragment' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - custom_fragment => inline_template('#weird test string'), - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain '#weird test string' } - end - end - - describe 'itk' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - itk => { user => 'nobody', group => 'nobody' } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'AssignUserId nobody nobody' } - end - end - - # So what does this work on? - if default['platform'] !~ /^(debian-(6|7)|el-(5|6|7))/ - describe 'fastcgi' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::fastcgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - fastcgi_server => 'localhost', - fastcgi_socket => '/tmp/fast/1234', - fastcgi_dir => '/tmp/fast', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'FastCgiExternalServer localhost -socket /tmp/fast/1234' } - it { is_expected.to contain '' } - end - end - end - - describe 'additional_includes' do - it 'applies cleanly' do - pp = <<-EOS - if $::osfamily == 'RedHat' and $::selinux == 'true' { - $semanage_package = $::operatingsystemmajrelease ? { - '5' => 'policycoreutils', - default => 'policycoreutils-python', - } - exec { 'set_apache_defaults': - command => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"', - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - require => Package[$semanage_package], - } - package { $semanage_package: ensure => installed } - exec { 'restorecon_apache': - command => 'restorecon -Rv /apache_spec', - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - before => Service['httpd'], - require => Class['apache'], - } - } - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - file { '/apache_spec': ensure => directory, } - file { '/apache_spec/include': ensure => present, content => '#additional_includes' } - apache::vhost { 'test.server': - docroot => '/apache_spec', - additional_includes => '/apache_spec/include', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { is_expected.to be_file } - it { is_expected.to contain 'Include "/apache_spec/include"' } - end - end - -end diff --git a/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb b/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb deleted file mode 100644 index 73411110..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb +++ /dev/null @@ -1,577 +0,0 @@ -require 'spec_helper' - -describe 'apache', :type => :class do - context "on a Debian OS" do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("httpd").with( - 'notify' => 'Class[Apache::Service]', - 'ensure' => 'installed' - ) - } - it { is_expected.to contain_user("www-data") } - it { is_expected.to contain_group("www-data") } - it { is_expected.to contain_class("apache::service") } - it { is_expected.to contain_file("/etc/apache2/sites-enabled").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { is_expected.to contain_file("/etc/apache2/mods-enabled").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { is_expected.to contain_file("/etc/apache2/mods-available").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'false', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { is_expected.to contain_concat("/etc/apache2/ports.conf").with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) - } - # Assert that load files are placed and symlinked for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env' - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with( - 'path' => "/etc/apache2/mods-available/#{modname}.load", - 'ensure' => 'file' - ) } - it { is_expected.to contain_file("#{modname}.load symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.load", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.load" - ) } - it { is_expected.not_to contain_file("#{modname}.conf") } - it { is_expected.not_to contain_file("#{modname}.conf symlink") } - end - - context "with Apache version < 2.4" do - let :params do - { :apache_version => '2.2' } - end - - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^Include "/etc/apache2/conf\.d/\*\.conf"$} } - end - - context "with Apache version >= 2.4" do - let :params do - { :apache_version => '2.4' } - end - - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^IncludeOptional "/etc/apache2/conf\.d/\*\.conf"$} } - end - - # Assert that both load files and conf files are placed and symlinked for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with( - 'path' => "/etc/apache2/mods-available/#{modname}.load", - 'ensure' => 'file' - ) } - it { is_expected.to contain_file("#{modname}.load symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.load", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.load" - ) } - it { is_expected.to contain_file("#{modname}.conf").with( - 'path' => "/etc/apache2/mods-available/#{modname}.conf", - 'ensure' => 'file' - ) } - it { is_expected.to contain_file("#{modname}.conf symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.conf", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.conf" - ) } - end - - describe "Don't create user resource" do - context "when parameter manage_user is false" do - let :params do - { :manage_user => false } - end - - it { is_expected.not_to contain_user('www-data') } - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^User www-data\n} } - end - end - describe "Don't create group resource" do - context "when parameter manage_group is false" do - let :params do - { :manage_group => false } - end - - it { is_expected.not_to contain_group('www-data') } - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^Group www-data\n} } - end - end - - describe "Add extra LogFormats" do - context "When parameter log_formats is a hash" do - let :params do - { :log_formats => { - 'vhost_common' => "%v %h %l %u %t \"%r\" %>s %b", - 'vhost_combined' => "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - } } - end - - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common\n} } - it { is_expected.to contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined\n} } - end - end - - context "on Ubuntu" do - let :facts do - super().merge({ - :operatingsystem => 'Ubuntu' - }) - end - - context "13.10" do - let :facts do - super().merge({ - :lsbdistrelease => '13.10', - :operatingsystemrelease => '13.10' - }) - end - it { is_expected.to contain_class('apache').with_apache_version('2.4') } - end - context "12.04" do - let :facts do - super().merge({ - :lsbdistrelease => '12.04', - :operatingsystemrelease => '12.04' - }) - end - it { is_expected.to contain_class('apache').with_apache_version('2.2') } - end - context "13.04" do - let :facts do - super().merge({ - :lsbdistrelease => '13.04', - :operatingsystemrelease => '13.04' - }) - end - it { is_expected.to contain_class('apache').with_apache_version('2.2') } - end - end - end - context "on a RedHat 5 OS" do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '5', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("httpd").with( - 'notify' => 'Class[Apache::Service]', - 'ensure' => 'installed' - ) - } - it { is_expected.to contain_user("apache") } - it { is_expected.to contain_group("apache") } - it { is_expected.to contain_class("apache::service") } - it { is_expected.to contain_file("/etc/httpd/conf.d").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { is_expected.to contain_concat("/etc/httpd/conf/ports.conf").with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) - } - describe "Alternate confd/mod/vhosts directory" do - let :params do - { - :vhost_dir => '/etc/httpd/site.d', - :confd_dir => '/etc/httpd/conf.d', - :mod_dir => '/etc/httpd/mod.d', - } - end - - ['mod.d','site.d','conf.d'].each do |dir| - it { is_expected.to contain_file("/etc/httpd/#{dir}").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - end - - # Assert that load files are placed for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env', - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with_path( - "/etc/httpd/mod.d/#{modname}.load" - ) } - it { is_expected.not_to contain_file("#{modname}.conf").with_path( - "/etc/httpd/mod.d/#{modname}.conf" - ) } - end - - # Assert that both load files and conf files are placed for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with_path( - "/etc/httpd/mod.d/#{modname}.load" - ) } - it { is_expected.to contain_file("#{modname}.conf").with_path( - "/etc/httpd/mod.d/#{modname}.conf" - ) } - end - - context "with Apache version < 2.4" do - let :params do - { :apache_version => '2.2' } - end - - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/conf\.d/\*\.conf"$} } - end - - context "with Apache version >= 2.4" do - let :params do - { :apache_version => '2.4' } - end - - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^IncludeOptional "/etc/httpd/conf\.d/\*\.conf"$} } - end - - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*"$} } - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} } - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} } - end - - describe "Alternate conf.d directory" do - let :params do - { :confd_dir => '/etc/httpd/special_conf.d' } - end - - it { is_expected.to contain_file("/etc/httpd/special_conf.d").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - end - - describe "Alternate mpm_modules" do - context "when declaring mpm_module is false" do - let :params do - { :mpm_module => false } - end - it 'should not declare mpm modules' do - is_expected.not_to contain_class('apache::mod::event') - is_expected.not_to contain_class('apache::mod::itk') - is_expected.not_to contain_class('apache::mod::peruser') - is_expected.not_to contain_class('apache::mod::prefork') - is_expected.not_to contain_class('apache::mod::worker') - end - end - context "when declaring mpm_module => prefork" do - let :params do - { :mpm_module => 'prefork' } - end - it { is_expected.to contain_class('apache::mod::prefork') } - it { is_expected.not_to contain_class('apache::mod::event') } - it { is_expected.not_to contain_class('apache::mod::itk') } - it { is_expected.not_to contain_class('apache::mod::peruser') } - it { is_expected.not_to contain_class('apache::mod::worker') } - end - context "when declaring mpm_module => worker" do - let :params do - { :mpm_module => 'worker' } - end - it { is_expected.to contain_class('apache::mod::worker') } - it { is_expected.not_to contain_class('apache::mod::event') } - it { is_expected.not_to contain_class('apache::mod::itk') } - it { is_expected.not_to contain_class('apache::mod::peruser') } - it { is_expected.not_to contain_class('apache::mod::prefork') } - end - context "when declaring mpm_module => breakme" do - let :params do - { :mpm_module => 'breakme' } - end - it { expect { subject }.to raise_error Puppet::Error, /does not match/ } - end - end - - describe "different templates for httpd.conf" do - context "with default" do - let :params do - { :conf_template => 'apache/httpd.conf.erb' } - end - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^# Security\n} } - end - context "with non-default" do - let :params do - { :conf_template => 'site_apache/fake.conf.erb' } - end - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Fake template for rspec.$} } - end - end - - describe "default mods" do - context "without" do - let :params do - { :default_mods => false } - end - - it { is_expected.to contain_apache__mod('authz_host') } - it { is_expected.not_to contain_apache__mod('env') } - end - context "custom" do - let :params do - { :default_mods => [ - 'info', - 'alias', - 'mime', - 'env', - 'setenv', - 'expires', - ]} - end - - it { is_expected.to contain_apache__mod('authz_host') } - it { is_expected.to contain_apache__mod('env') } - it { is_expected.to contain_class('apache::mod::info') } - it { is_expected.to contain_class('apache::mod::mime') } - end - end - describe "Don't create user resource" do - context "when parameter manage_user is false" do - let :params do - { :manage_user => false } - end - - it { is_expected.not_to contain_user('apache') } - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^User apache\n} } - end - end - describe "Don't create group resource" do - context "when parameter manage_group is false" do - let :params do - { :manage_group => false } - end - - it { is_expected.not_to contain_group('apache') } - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Group apache\n} } - - end - end - describe "sendfile" do - context "with invalid value" do - let :params do - { :sendfile => 'foo' } - end - it "should fail" do - expect do - subject - end.to raise_error(Puppet::Error, /"foo" does not match/) - end - end - context "On" do - let :params do - { :sendfile => 'On' } - end - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile On\n} } - end - context "Off" do - let :params do - { :sendfile => 'Off' } - end - it { is_expected.to contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile Off\n} } - end - end - end - context "on a FreeBSD OS" do - let :facts do - { - :id => 'root', - :kernel => 'FreeBSD', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_class("apache::package").with({'ensure' => 'present'}) } - it { is_expected.to contain_user("www") } - it { is_expected.to contain_group("www") } - it { is_expected.to contain_class("apache::service") } - it { is_expected.to contain_file("/usr/local/etc/apache22/Vhosts").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - it { is_expected.to contain_concat("/usr/local/etc/apache22/ports.conf").with( - 'owner' => 'root', - 'group' => 'wheel', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) } - # Assert that load files are placed for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env' - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", - 'ensure' => 'file' - ) } - it { is_expected.not_to contain_file("#{modname}.conf") } - end - - # Assert that both load files and conf files are placed for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { is_expected.to contain_file("#{modname}.load").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", - 'ensure' => 'file' - ) } - it { is_expected.to contain_file("#{modname}.conf").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.conf", - 'ensure' => 'file' - ) } - end - end - context 'on all OSes' do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context 'default vhost defaults' do - it { is_expected.to contain_apache__vhost('default').with_ensure('present') } - it { is_expected.to contain_apache__vhost('default-ssl').with_ensure('absent') } - end - context 'without default non-ssl vhost' do - let :params do { - :default_vhost => false - } - end - it { is_expected.to contain_apache__vhost('default').with_ensure('absent') } - end - context 'with default ssl vhost' do - let :params do { - :default_ssl_vhost => true - } - end - it { is_expected.to contain_apache__vhost('default-ssl').with_ensure('present') } - end - end - context 'with unsupported osfamily' do - let :facts do - { :osfamily => 'Darwin', - :operatingsystemrelease => '13.1.0', - :concat_basedir => '/dne', - } - end - - it do - expect { - should compile - }.to raise_error(Puppet::Error, /Unsupported osfamily/) - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb b/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb deleted file mode 100644 index df342d40..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe 'apache::dev', :type => :class do - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("libaprutil1-dev") } - it { is_expected.to contain_package("libapr1-dev") } - it { is_expected.to contain_package("apache2-prefork-dev") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("httpd-devel") } - end - context "on a FreeBSD OS" do - let :pre_condition do - 'include apache::package' - end - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - } - end - it { is_expected.to contain_class("apache::params") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb deleted file mode 100644 index 1706bfb8..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::auth_kerb', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("auth_kerb") } - it { is_expected.to contain_package("libapache2-mod-auth-kerb") } - end - context "on a RedHat OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("auth_kerb") } - it { is_expected.to contain_package("mod_auth_kerb") } - end - context "on a FreeBSD OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'FreeBSD', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("auth_kerb") } - it { is_expected.to contain_package("www/mod_auth_kerb2") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb deleted file mode 100644 index a0a913a6..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::authnz_ldap', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :id => 'root', - :kernel => 'Linux', - :operatingsystem => 'Debian', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_class("apache::mod::ldap") } - it { is_expected.to contain_apache__mod('authnz_ldap') } - - context 'default verifyServerCert' do - it { is_expected.to contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } - end - - context 'verifyServerCert = false' do - let(:params) { { :verifyServerCert => false } } - it { is_expected.to contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } - end - - context 'verifyServerCert = wrong' do - let(:params) { { :verifyServerCert => 'wrong' } } - it 'should raise an error' do - expect { is_expected.to raise_error Puppet::Error } - end - end - end #Debian - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :id => 'root', - :kernel => 'Linux', - :operatingsystem => 'RedHat', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_class("apache::mod::ldap") } - it { is_expected.to contain_apache__mod('authnz_ldap') } - - context 'default verifyServerCert' do - it { is_expected.to contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } - end - - context 'verifyServerCert = false' do - let(:params) { { :verifyServerCert => false } } - it { is_expected.to contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } - end - - context 'verifyServerCert = wrong' do - let(:params) { { :verifyServerCert => 'wrong' } } - it 'should raise an error' do - expect { is_expected.to raise_error Puppet::Error } - end - end - end # Redhat - -end - diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb deleted file mode 100644 index 859174af..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dav_svn', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dav_svn') } - it { is_expected.to contain_package("libapache2-svn") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dav_svn') } - it { is_expected.to contain_package("mod_dav_svn") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dav_svn') } - it { is_expected.to contain_package("devel/subversion") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb deleted file mode 100644 index 164dbfa2..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_deflate_specs - it { is_expected.to contain_apache__mod("deflate") } - - it do - is_expected.to contain_file("deflate.conf").with_content( - "AddOutputFilterByType DEFLATE text/css\n"\ - "AddOutputFilterByType DEFLATE text/html\n"\ - "\n"\ - "DeflateFilterNote Input instream\n"\ - "DeflateFilterNote Ratio ratio\n" - ) - end -end - -describe 'apache::mod::deflate', :type => :class do - let :pre_condition do - 'class { "apache": - default_mods => false, - } - class { "apache::mod::deflate": - types => [ "text/html", "text/css" ], - notes => { - "Input" => "instream", - "Ratio" => "ratio", - } - } - ' - end - - context "On a Debian OS with default params" do - let :facts do - { - :id => 'root', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { is_expected.to contain_file("deflate.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/deflate.conf', - } ) } - it { is_expected.to contain_file("deflate.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/deflate.conf', - } ) } - end - - context "on a RedHat OS with default params" do - let :facts do - { - :id => 'root', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { is_expected.to contain_file("deflate.conf").with_path("/etc/httpd/conf.d/deflate.conf") } - end - - context "On a FreeBSD OS with default params" do - let :facts do - { - :id => 'root', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { is_expected.to contain_file("deflate.conf").with({ - :ensure => 'file', - :path => '/usr/local/etc/apache22/Modules/deflate.conf', - } ) } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb deleted file mode 100644 index 84d80e34..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dev', :type => :class do - [ - ['RedHat', '6', 'Santiago'], - ['Debian', '6', 'squeeze'], - ['FreeBSD', '9', 'FreeBSD'], - ].each do |osfamily, operatingsystemrelease, lsbdistcodename| - if osfamily == 'FreeBSD' - let :pre_condition do - 'include apache::package' - end - end - context "on a #{osfamily} OS" do - let :facts do - { - :lsbdistcodename => lsbdistcodename, - :osfamily => osfamily, - :operatingsystem => osfamily, - :operatingsystemrelease => operatingsystemrelease, - } - end - it { is_expected.to contain_class('apache::dev') } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb deleted file mode 100644 index 1efed2fe..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dir', :type => :class do - let :pre_condition do - 'class { "apache": - default_mods => false, - }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :lsbdistcodename => 'squeeze', - } - end - context "passing no parameters" do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dir') } - it { is_expected.to contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.cgi /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.pl /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.php /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { is_expected.to contain_file('dir.conf').with_content(/ example\.txt /) } - it { is_expected.to contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Redhat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "passing no parameters" do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dir') } - it { is_expected.to contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.cgi /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.pl /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.php /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { is_expected.to contain_file('dir.conf').with_content(/ example\.txt /) } - it { is_expected.to contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "passing no parameters" do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('dir') } - it { is_expected.to contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.cgi /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.pl /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.php /) } - it { is_expected.to contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { is_expected.to contain_file('dir.conf').with_content(/ example\.txt /) } - it { is_expected.to contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb deleted file mode 100644 index 3061ca9b..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::event', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('event') } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules/event.conf").with_ensure('file') } - end - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('event') } - it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file') } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/event.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.not_to contain_file("/etc/apache2/mods-available/event.load") } - it { is_expected.not_to contain_file("/etc/apache2/mods-enabled/event.load") } - - it { is_expected.to contain_package("apache2-mpm-event") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.to contain_file("/etc/apache2/mods-available/event.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so\n" - }) - } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/event.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('worker') } - it { is_expected.not_to contain_apache__mod('prefork') } - - it { is_expected.to contain_file("/etc/httpd/conf.d/event.conf").with_ensure('file') } - - it { is_expected.to contain_file("/etc/httpd/conf.d/event.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_event_module modules/mod_mpm_event.so\n", - }) - } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb deleted file mode 100644 index 126c5cc3..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::fastcgi', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fastcgi') } - it { is_expected.to contain_package("libapache2-mod-fastcgi") } - it { is_expected.to contain_file('fastcgi.conf') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fastcgi') } - it { is_expected.to contain_package("mod_fastcgi") } - it { is_expected.not_to contain_file('fastcgi.conf') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb deleted file mode 100644 index ab47a5a8..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::fcgid', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("libapache2-mod-fcgid") } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe 'without parameters' do - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("mod_fcgid") } - end - - describe 'with parameters' do - let :params do { - :options => { - 'FcgidIPCDir' => '/var/run/fcgidsock', - 'SharememPath' => '/var/run/fcgid_shm', - 'FcgidMinProcessesPerClass' => '0', - 'AddHandler' => 'fcgid-script .fcgi', - } - } end - - it 'should contain the correct config' do - content = subject.resource('file', 'fcgid.conf').send(:parameters)[:content] - expect(content.split("\n").reject { |c| c =~ /(^#|^$)/ }).to eq([ - '', - ' AddHandler fcgid-script .fcgi', - ' FcgidIPCDir /var/run/fcgidsock', - ' FcgidMinProcessesPerClass 0', - ' SharememPath /var/run/fcgid_shm', - '', - ]) - end - end - end - - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('fcgid') } - it { is_expected.to contain_package("www/mod_fcgid") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb deleted file mode 100644 index 20ed127d..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb +++ /dev/null @@ -1,141 +0,0 @@ -# This function is called inside the OS specific contexts -def general_info_specs - it { is_expected.to contain_apache__mod('info') } - - context 'passing no parameters' do - it { - is_expected.to contain_file('info.conf').with_content( - "\n"\ - " SetHandler server-info\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from 127.0.0.1\n"\ - " Allow from ::1\n"\ - "\n" - ) - } - end - context 'passing restrict_access => false' do - let :params do { - :restrict_access => false - } - end - it { - is_expected.to contain_file('info.conf').with_content( - "\n"\ - " SetHandler server-info\n"\ - "\n" - ) - } - end - context "passing allow_from => ['10.10.1.2', '192.168.1.2', '127.0.0.1']" do - let :params do - {:allow_from => ['10.10.1.2', '192.168.1.2', '127.0.0.1']} - end - it { - is_expected.to contain_file('info.conf').with_content( - "\n"\ - " SetHandler server-info\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from 10.10.1.2\n"\ - " Allow from 192.168.1.2\n"\ - " Allow from 127.0.0.1\n"\ - "\n" - ) - } - end - context 'passing both restrict_access and allow_from' do - let :params do - { - :restrict_access => false, - :allow_from => ['10.10.1.2', '192.168.1.2', '127.0.0.1'] - } - end - it { - is_expected.to contain_file('info.conf').with_content( - "\n"\ - " SetHandler server-info\n"\ - "\n" - ) - } - end -end - -describe 'apache::mod::info', :type => :class do - let :pre_condition do - "class { 'apache': default_mods => false, }" - end - - context 'On a Debian OS' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { is_expected.to contain_file('info.conf').with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/info.conf', - } ) } - it { is_expected.to contain_file('info.conf symlink').with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/info.conf', - } ) } - end - - context 'on a RedHat OS' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { is_expected.to contain_file('info.conf').with({ - :ensure => 'file', - :path => '/etc/httpd/conf.d/info.conf', - } ) } - end - - context 'on a FreeBSD OS' do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { is_expected.to contain_file('info.conf').with({ - :ensure => 'file', - :path => '/usr/local/etc/apache22/Modules/info.conf', - } ) } - end - -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb deleted file mode 100644 index b5d50a18..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::itk', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('itk') } - it { is_expected.to contain_file("/etc/apache2/mods-available/itk.conf").with_ensure('file') } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/itk.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.not_to contain_file("/etc/apache2/mods-available/itk.load") } - it { is_expected.not_to contain_file("/etc/apache2/mods-enabled/itk.load") } - - it { is_expected.to contain_package("apache2-mpm-itk") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.to contain_file("/etc/apache2/mods-available/itk.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_itk_module /usr/lib/apache2/modules/mod_mpm_itk.so\n" - }) - } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/itk.load").with_ensure('link') } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('itk') } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules/itk.conf").with_ensure('file') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb deleted file mode 100644 index 5e78230e..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_mime_magic_specs - it { is_expected.to contain_apache__mod("mime_magic") } -end - -describe 'apache::mod::mime_magic', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_magic_specs() - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/apache2/magic\"\n" - ) - end - - it { is_expected.to contain_file("mime_magic.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/mime_magic.conf', - } ) } - it { is_expected.to contain_file("mime_magic.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/mime_magic.conf', - } ) } - - context "with magic_file => /tmp/Debian_magic" do - let :params do - { :magic_file => "/tmp/Debian_magic" } - end - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/Debian_magic\"\n" - ) - end - end - - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_magic_specs() - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/httpd/conf/magic\"\n" - ) - end - - it { is_expected.to contain_file("mime_magic.conf").with_path("/etc/httpd/conf.d/mime_magic.conf") } - - end - - context "with magic_file => /tmp/magic" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - let :params do - { :magic_file => "/tmp/magic" } - end - - it do - is_expected.to contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/magic\"\n" - ) - end - end - - -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb deleted file mode 100644 index 32edbc4b..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific conte, :compilexts -def general_mime_specs - it { is_expected.to contain_apache__mod("mime") } -end - -describe 'apache::mod::mime', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params", :compile do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_specs() - - it { is_expected.to contain_file("mime.conf").with_path('/etc/apache2/mods-available/mime.conf') } - - end - - context "on a RedHat OS with default params", :compile do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_specs() - - it { is_expected.to contain_file("mime.conf").with_path("/etc/httpd/conf.d/mime.conf") } - - end - -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/negotiation_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/negotiation_spec.rb deleted file mode 100644 index 814660e1..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/negotiation_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::negotiation', :type => :class do - describe "OS independent tests" do - - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :lsbdistcodename => 'squeeze', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - context "default params" do - let :pre_condition do - 'class {"::apache": }' - end - it { should contain_class("apache") } - it do - should contain_file('negotiation.conf').with( { - :ensure => 'file', - :content => 'LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW -ForceLanguagePriority Prefer Fallback -', - } ) - end - end - - context 'with force_language_priority parameter' do - let :pre_condition do - 'class {"::apache": default_mods => ["negotiation"]}' - end - let :params do - { :force_language_priority => 'Prefer' } - end - it do - should contain_file('negotiation.conf').with( { - :ensure => 'file', - :content => /^ForceLanguagePriority Prefer$/, - } ) - end - end - - context 'with language_priority parameter' do - let :pre_condition do - 'class {"::apache": default_mods => ["negotiation"]}' - end - let :params do - { :language_priority => [ 'en', 'es' ] } - end - it do - should contain_file('negotiation.conf').with( { - :ensure => 'file', - :content => /^LanguagePriority en es$/, - } ) - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb deleted file mode 100644 index c4abd3e1..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::pagespeed', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('pagespeed') } - it { is_expected.to contain_package("mod-pagespeed-stable") } - it { is_expected.to contain_file('pagespeed.conf') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('pagespeed') } - it { is_expected.to contain_package("mod-pagespeed-stable") } - it { is_expected.to contain_file('pagespeed.conf') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb deleted file mode 100644 index 7fc1e3a6..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb +++ /dev/null @@ -1,230 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::passenger', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('passenger') } - it { is_expected.to contain_package("libapache2-mod-passenger") } - it { is_expected.to contain_file('passenger.load').with({ - 'path' => '/etc/apache2/mods-available/passenger.load', - }) } - it { is_expected.to contain_file('passenger.conf').with({ - 'path' => '/etc/apache2/mods-available/passenger.conf', - }) } - it { is_expected.to contain_file('passenger_package.conf').with_ensure('absent') } - describe "with passenger_root => '/usr/lib/example'" do - let :params do - { :passenger_root => '/usr/lib/example' } - end - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/example"}) } - end - describe "with passenger_ruby => /usr/lib/example/ruby" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby' } - end - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby"}) } - end - describe "with passenger_default_ruby => /usr/lib/example/ruby1.9.3" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby1.9.3' } - end - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby1.9.3"}) } - end - describe "with passenger_high_performance => on" do - let :params do - { :passenger_high_performance => 'on' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerHighPerformance on$/) } - end - describe "with passenger_pool_idle_time => 1200" do - let :params do - { :passenger_pool_idle_time => 1200 } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerPoolIdleTime 1200$/) } - end - describe "with passenger_max_requests => 20" do - let :params do - { :passenger_max_requests => 20 } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerMaxRequests 20$/) } - end - describe "with passenger_stat_throttle_rate => 10" do - let :params do - { :passenger_stat_throttle_rate => 10 } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerStatThrottleRate 10$/) } - end - describe "with passenger_max_pool_size => 16" do - let :params do - { :passenger_max_pool_size => 16 } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerMaxPoolSize 16$/) } - end - describe "with rack_autodetect => on" do - let :params do - { :rack_autodetect => 'on' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ RackAutoDetect on$/) } - end - describe "with rails_autodetect => on" do - let :params do - { :rails_autodetect => 'on' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ RailsAutoDetect on$/) } - end - describe "with passenger_use_global_queue => on" do - let :params do - { :passenger_use_global_queue => 'on' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerUseGlobalQueue on$/) } - end - describe "with mod_path => '/usr/lib/foo/mod_foo.so'" do - let :params do - { :mod_path => '/usr/lib/foo/mod_foo.so' } - end - it { is_expected.to contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_foo\.so$/) } - end - describe "with mod_lib_path => '/usr/lib/foo'" do - let :params do - { :mod_lib_path => '/usr/lib/foo' } - end - it { is_expected.to contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_passenger\.so$/) } - end - describe "with mod_lib => 'mod_foo.so'" do - let :params do - { :mod_lib => 'mod_foo.so' } - end - it { is_expected.to contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/apache2\/modules\/mod_foo\.so$/) } - end - describe "with mod_id => 'mod_foo'" do - let :params do - { :mod_id => 'mod_foo' } - end - it { is_expected.to contain_file('passenger.load').with_content(/^LoadModule mod_foo \/usr\/lib\/apache2\/modules\/mod_passenger\.so$/) } - end - - context "with Ubuntu 12.04 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '12.04', - :operatingsystem => 'Ubuntu', - :lsbdistrelease => '12.04', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } - it { is_expected.to contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } - end - - context "with Ubuntu 14.04 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '14.04', - :operatingsystem => 'Ubuntu', - :lsbdistrelease => '14.04', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini"}) } - it { is_expected.to contain_file('passenger.conf').without_content(/PassengerRuby/) } - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerDefaultRuby "/usr/bin/ruby"}) } - end - - context "with Debian 7 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '7.3', - :operatingsystem => 'Debian', - :lsbdistcodename => 'wheezy', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } - it { is_expected.to contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } - it { is_expected.to contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } - end - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('passenger') } - it { is_expected.to contain_package("mod_passenger") } - it { is_expected.to contain_file('passenger_package.conf').with({ - 'path' => '/etc/httpd/conf.d/passenger.conf', - }) } - it { is_expected.to contain_file('passenger_package.conf').without_content } - it { is_expected.to contain_file('passenger_package.conf').without_source } - it { is_expected.to contain_file('passenger.load').with({ - 'path' => '/etc/httpd/conf.d/passenger.load', - }) } - it { is_expected.to contain_file('passenger.conf').without_content(/PassengerRoot/) } - it { is_expected.to contain_file('passenger.conf').without_content(/PassengerRuby/) } - describe "with passenger_root => '/usr/lib/example'" do - let :params do - { :passenger_root => '/usr/lib/example' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerRoot "\/usr\/lib\/example"$/) } - end - describe "with passenger_ruby => /usr/lib/example/ruby" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby' } - end - it { is_expected.to contain_file('passenger.conf').with_content(/^ PassengerRuby "\/usr\/lib\/example\/ruby"$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('passenger') } - it { is_expected.to contain_package("www/rubygem-passenger") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb deleted file mode 100644 index 2c14c31f..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::perl', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('perl') } - it { is_expected.to contain_package("libapache2-mod-perl2") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('perl') } - it { is_expected.to contain_package("mod_perl") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('perl') } - it { is_expected.to contain_package("www/mod_perl2") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb deleted file mode 100644 index c0dfc96f..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::peruser', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('peruser') } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules/peruser.conf").with_ensure('file') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb deleted file mode 100644 index 76fd6922..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb +++ /dev/null @@ -1,228 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::php', :type => :class do - describe "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('php5') } - it { is_expected.to contain_package("libapache2-mod-php5") } - it { is_expected.to contain_file("php5.load").with( - :content => "LoadModule php5_module /usr/lib/apache2/modules/libphp5.so\n" - ) } - end - context 'with mpm_module => worker' do - let :pre_condition do - 'class { "apache": mpm_module => worker, }' - end - it 'should raise an error' do - expect { subject }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ - end - end - end - describe "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with default params" do - let :pre_condition do - 'class { "apache": }' - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('php5') } - it { is_expected.to contain_package("php") } - it { is_expected.to contain_file("php5.load").with( - :content => "LoadModule php5_module modules/libphp5.so\n" - ) } - end - context "with alternative package name" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :package_name => 'php54'} - end - it { is_expected.to contain_package("php54") } - end - context "with alternative path" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :path => 'alternative-path'} - end - it { is_expected.to contain_file("php5.load").with( - :content => "LoadModule php5_module alternative-path\n" - ) } - end - context "with alternative extensions" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :extensions => ['.php','.php5']} - end - it { is_expected.to contain_file("php5.conf").with_content(/AddHandler php5-script .php .php5\n/) } - end - context "with specific version" do - let :pre_condition do - 'class { "apache": }' - end - let :params do - { :package_ensure => '5.3.13'} - end - it { is_expected.to contain_package("php").with( - :ensure => '5.3.13' - ) } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('php5') } - it { is_expected.to contain_package("php") } - it { is_expected.to contain_file("php5.load").with( - :content => "LoadModule php5_module modules/libphp5.so\n" - ) } - end - end - describe "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { is_expected.to contain_class('apache::params') } - it { is_expected.to contain_apache__mod('php5') } - it { is_expected.to contain_package("lang/php5") } - it { is_expected.to contain_file('php5.load') } - end - # FIXME: not sure about the following context - context 'with mpm_module => worker' do - let :pre_condition do - 'class { "apache": mpm_module => worker, }' - end - it 'should raise an error' do - expect { expect(subject).to contain_apache__mod('php5') }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ - end - end - end - describe "OS independent tests" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :lsbdistcodename => 'squeeze', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context 'with content param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :content => 'somecontent' } - end - it { should contain_file('php5.conf').with( - :content => 'somecontent' - ) } - end - context 'with template param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :template => 'apache/mod/php5.conf.erb' } - end - it { should contain_file('php5.conf').with( - :content => /^# PHP is an HTML-embedded scripting language which attempts to make it/ - ) } - end - context 'with source param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :source => 'some-path' } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - context 'content has priority over template' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :template => 'apache/mod/php5.conf.erb', - :content => 'somecontent' - } - end - it { should contain_file('php5.conf').with( - :content => 'somecontent' - ) } - end - context 'source has priority over template' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :template => 'apache/mod/php5.conf.erb', - :source => 'some-path' - } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - context 'source has priority over content' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :content => 'somecontent', - :source => 'some-path' - } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb deleted file mode 100644 index 34bca08d..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::prefork', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('prefork') } - it { is_expected.to contain_file("/etc/apache2/mods-available/prefork.conf").with_ensure('file') } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/prefork.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.not_to contain_file("/etc/apache2/mods-available/prefork.load") } - it { is_expected.not_to contain_file("/etc/apache2/mods-enabled/prefork.load") } - - it { is_expected.to contain_package("apache2-mpm-prefork") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.to contain_file("/etc/apache2/mods-available/prefork.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so\n" - }) - } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/prefork.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('prefork') } - it { is_expected.to contain_file("/etc/httpd/conf.d/prefork.conf").with_ensure('file') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.to contain_file_line("/etc/sysconfig/httpd prefork enable").with({ - 'require' => 'Package[httpd]', - }) - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.not_to contain_apache__mod('event') } - - it { is_expected.to contain_file("/etc/httpd/conf.d/prefork.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_prefork_module modules/mod_mpm_prefork.so\n", - }) - } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('prefork') } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules/prefork.conf").with_ensure('file') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb deleted file mode 100644 index 81a2bb53..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::proxy_html', :type => :class do - let :pre_condition do - [ - 'include apache', - 'include apache::mod::proxy', - 'include apache::mod::proxy_http', - ] - end - context "on a Debian OS" do - shared_examples "debian" do |loadfiles| - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => loadfiles) } - it { is_expected.to contain_package("libapache2-mod-proxy-html") } - end - let :facts do - { - :osfamily => 'Debian', - :concat_basedir => '/dne', - :architecture => 'i386', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :hardwaremodel => 'i386', - } - end - - context "on squeeze" do - let(:facts) { super().merge({ :operatingsystemrelease => '6' }) } - it_behaves_like "debian", ['/usr/lib/libxml2.so.2'] - end - context "on wheezy" do - let(:facts) { super().merge({ :operatingsystemrelease => '7' }) } - context "i386" do - let(:facts) { super().merge({ - :hardwaremodel => 'i686', - :architecture => 'i386' - })} - it_behaves_like "debian", ["/usr/lib/i386-linux-gnu/libxml2.so.2"] - end - context "x64" do - let(:facts) { super().merge({ - :hardwaremodel => 'x86_64', - :architecture => 'amd64' - })} - it_behaves_like "debian", ["/usr/lib/x86_64-linux-gnu/libxml2.so.2"] - end - end - end - context "on a RedHat OS", :compile do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => nil) } - it { is_expected.to contain_package("mod_proxy_html") } - end - context "on a FreeBSD OS", :compile do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('proxy_html').with(:loadfiles => nil) } - it { is_expected.to contain_package("www/mod_proxy_html") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb deleted file mode 100644 index 17b62d43..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::python', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("python") } - it { is_expected.to contain_package("libapache2-mod-python") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("python") } - it { is_expected.to contain_package("mod_python") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod("python") } - it { is_expected.to contain_package("www/mod_python3") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb deleted file mode 100644 index ca3a5948..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::rpaf', :type => :class do - let :pre_condition do - [ - 'include apache', - ] - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('rpaf') } - it { is_expected.to contain_package("libapache2-mod-rpaf") } - it { is_expected.to contain_file('rpaf.conf').with({ - 'path' => '/etc/apache2/mods-available/rpaf.conf', - }) } - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } - - describe "with sethostname => true" do - let :params do - { :sethostname => 'true' } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } - end - describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do - let :params do - { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } - end - describe "with header => X-Real-IP" do - let :params do - { :header => 'X-Real-IP' } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('rpaf') } - it { is_expected.to contain_package("www/mod_rpaf2") } - it { is_expected.to contain_file('rpaf.conf').with({ - 'path' => '/usr/local/etc/apache22/Modules/rpaf.conf', - }) } - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } - - describe "with sethostname => true" do - let :params do - { :sethostname => 'true' } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } - end - describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do - let :params do - { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } - end - describe "with header => X-Real-IP" do - let :params do - { :header => 'X-Real-IP' } - end - it { is_expected.to contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb deleted file mode 100644 index 814e0d67..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::speling', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_apache__mod('speling') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_apache__mod('speling') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb deleted file mode 100644 index fb6ba4eb..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::ssl', :type => :class do - let :pre_condition do - 'include apache' - end - context 'on an unsupported OS' do - let :facts do - { - :osfamily => 'Magic', - :operatingsystemrelease => '0', - :concat_basedir => '/dne', - :operatingsystem => 'Magic', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { expect { subject }.to raise_error(Puppet::Error, /Unsupported osfamily:/) } - end - - context 'on a RedHat OS' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class('apache::params') } - it { is_expected.to contain_apache__mod('ssl') } - it { is_expected.to contain_package('mod_ssl') } - end - - context 'on a Debian OS' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class('apache::params') } - it { is_expected.to contain_apache__mod('ssl') } - it { is_expected.not_to contain_package('libapache2-mod-ssl') } - end - - context 'on a FreeBSD OS' do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class('apache::params') } - it { is_expected.to contain_apache__mod('ssl') } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb deleted file mode 100644 index adb60861..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb +++ /dev/null @@ -1,198 +0,0 @@ -require 'spec_helper' - -# Helper function for testing the contents of `status.conf` -def status_conf_spec(allow_from, extended_status) - it do - is_expected.to contain_file("status.conf").with_content( - "\n"\ - " SetHandler server-status\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from #{Array(allow_from).join(' ')}\n"\ - "\n"\ - "ExtendedStatus #{extended_status}\n"\ - "\n"\ - "\n"\ - " # Show Proxy LoadBalancer status in mod_status\n"\ - " ProxyStatus On\n"\ - "\n" - ) - end -end - -describe 'apache::mod::status', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_apache__mod("status") } - - status_conf_spec(["127.0.0.1", "::1"], "On") - - it { is_expected.to contain_file("status.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/status.conf', - } ) } - - it { is_expected.to contain_file("status.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/status.conf', - } ) } - - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { is_expected.to contain_apache__mod("status") } - - status_conf_spec(["127.0.0.1", "::1"], "On") - - it { is_expected.to contain_file("status.conf").with_path("/etc/httpd/conf.d/status.conf") } - - end - - context "with custom parameters $allow_from => ['10.10.10.10','11.11.11.11'], $extended_status => 'Off'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { - :allow_from => ['10.10.10.10','11.11.11.11'], - :extended_status => 'Off', - } - end - - status_conf_spec(["10.10.10.10", "11.11.11.11"], "Off") - - end - - context "with valid parameter type $allow_from => ['10.10.10.10']" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :allow_from => ['10.10.10.10'] } - end - it 'should expect to succeed array validation' do - expect { - is_expected.to contain_file("status.conf") - }.not_to raise_error() - end - end - - context "with invalid parameter type $allow_from => '10.10.10.10'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :allow_from => '10.10.10.10' } - end - it 'should expect to fail array validation' do - expect { - is_expected.to contain_file("status.conf") - }.to raise_error(Puppet::Error) - end - end - - # Only On or Off are valid options - ['On', 'Off'].each do |valid_param| - context "with valid value $extended_status => '#{valid_param}'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :extended_status => valid_param } - end - it 'should expect to succeed regular expression validation' do - expect { - is_expected.to contain_file("status.conf") - }.not_to raise_error() - end - end - end - - ['Yes', 'No'].each do |invalid_param| - context "with invalid value $extended_status => '#{invalid_param}'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :extended_status => invalid_param } - end - it 'should expect to fail regular expression validation' do - expect { - is_expected.to contain_file("status.conf") - }.to raise_error(Puppet::Error) - end - end - end - -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb deleted file mode 100644 index b74b4c86..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::suphp', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("libapache2-mod-suphp") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package("mod_suphp") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb deleted file mode 100644 index c2ede28a..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::worker', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('worker') } - it { is_expected.to contain_file("/etc/apache2/mods-available/worker.conf").with_ensure('file') } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/worker.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.not_to contain_file("/etc/apache2/mods-available/worker.load") } - it { is_expected.not_to contain_file("/etc/apache2/mods-enabled/worker.load") } - - it { is_expected.to contain_package("apache2-mpm-worker") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.to contain_file("/etc/apache2/mods-available/worker.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so\n" - }) - } - it { is_expected.to contain_file("/etc/apache2/mods-enabled/worker.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('worker') } - it { is_expected.to contain_file("/etc/httpd/conf.d/worker.conf").with_ensure('file') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { is_expected.to contain_file_line("/etc/sysconfig/httpd worker enable").with({ - 'require' => 'Package[httpd]', - }) - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { is_expected.not_to contain_apache__mod('event') } - - it { is_expected.to contain_file("/etc/httpd/conf.d/worker.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_worker_module modules/mod_mpm_worker.so\n", - }) - } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.not_to contain_apache__mod('worker') } - it { is_expected.to contain_file("/usr/local/etc/apache22/Modules/worker.conf").with_ensure('file') } - end - - # Template config doesn't vary by distro - context "on all distros" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - :operatingsystemrelease => '6', - :id => 'root', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - context 'defaults' do - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+2$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+150$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+75$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+0$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+64$/) } - end - - context 'setting params' do - let :params do - { - :serverlimit => 10, - :startservers => 11, - :maxclients => 12, - :minsparethreads => 13, - :maxsparethreads => 14, - :threadsperchild => 15, - :maxrequestsperchild => 16, - :threadlimit => 17 - } - end - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+10$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+11$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+12$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+13$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+14$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+15$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+16$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+17$/) } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb b/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb deleted file mode 100644 index 5945e3be..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::wsgi', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('wsgi') } - it { is_expected.to contain_package("libapache2-mod-wsgi") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('wsgi') } - it { is_expected.to contain_package("mod_wsgi") } - - describe "with custom WSGISocketPrefix" do - let :params do - { :wsgi_socket_prefix => 'run/wsgi' } - end - it {is_expected.to contain_file('wsgi.conf').with_content(/^ WSGISocketPrefix run\/wsgi$/)} - end - describe "with custom WSGIPythonHome" do - let :params do - { :wsgi_python_home => '/path/to/virtenv' } - end - it {is_expected.to contain_file('wsgi.conf').with_content(/^ WSGIPythonHome "\/path\/to\/virtenv"$/)} - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__mod('wsgi') } - it { is_expected.to contain_package("www/mod_wsgi") } - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/params_spec.rb b/puphpet/puppet/modules/apache/spec/classes/params_spec.rb deleted file mode 100644 index 6f63758a..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/params_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'apache::params', :type => :class do - context "On a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_apache__params } - - # There are 4 resources in this class currently - # there should not be any more resources because it is a params class - # The resources are class[apache::version], class[apache::params], class[main], class[settings], stage[main] - it "Should not contain any resources" do - expect(subject.resources.size).to eq(5) - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/classes/service_spec.rb b/puphpet/puppet/modules/apache/spec/classes/service_spec.rb deleted file mode 100644 index 4d6efbe3..00000000 --- a/puphpet/puppet/modules/apache/spec/classes/service_spec.rb +++ /dev/null @@ -1,127 +0,0 @@ -require 'spec_helper' - -describe 'apache::service', :type => :class do - let :pre_condition do - 'include apache::params' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - - context "with $service_name => 'foo'" do - let (:params) {{ :service_name => 'foo' }} - it { is_expected.to contain_service("httpd").with( - 'name' => 'foo' - ) - } - end - - context "with $service_enable => true" do - let (:params) {{ :service_enable => true }} - it { is_expected.to contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "with $service_enable => false" do - let (:params) {{ :service_enable => false }} - it { is_expected.to contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'false' - ) - } - end - - context "$service_enable must be a bool" do - let (:params) {{ :service_enable => 'not-a-boolean' }} - - it 'should fail' do - expect { subject }.to raise_error(Puppet::Error, /is not a boolean/) - end - end - - context "with $service_ensure => 'running'" do - let (:params) {{ :service_ensure => 'running', }} - it { is_expected.to contain_service("httpd").with( - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "with $service_ensure => 'stopped'" do - let (:params) {{ :service_ensure => 'stopped', }} - it { is_expected.to contain_service("httpd").with( - 'ensure' => 'stopped', - 'enable' => 'true' - ) - } - end - - context "with $service_ensure => 'UNDEF'" do - let (:params) {{ :service_ensure => 'UNDEF' }} - it { is_expected.to contain_service("httpd").without_ensure } - end - end - - - context "on a RedHat 5 OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '5', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_service("httpd").with( - 'name' => 'httpd', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "on a FreeBSD 5 OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { is_expected.to contain_service("httpd").with( - 'name' => 'apache22', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end -end diff --git a/puphpet/puppet/modules/apache/spec/defines/fastcgi_server_spec.rb b/puphpet/puppet/modules/apache/spec/defines/fastcgi_server_spec.rb deleted file mode 100644 index 4a8762c8..00000000 --- a/puphpet/puppet/modules/apache/spec/defines/fastcgi_server_spec.rb +++ /dev/null @@ -1,104 +0,0 @@ -require 'spec_helper' - -describe 'apache::fastcgi::server', :type => :define do - let :pre_condition do - 'include apache' - end - let :title do - 'www' - end - describe 'os-dependent items' do - context "on RedHat based systems" do - let :default_facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - :operatingsystemrelease => '6', - :id => 'root', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::mod::fastcgi") } - it { should contain_file("fastcgi-pool-#{title}.conf").with( - :ensure => 'present', - :path => "/etc/httpd/conf.d/fastcgi-pool-#{title}.conf" - ) } - end - context "on Debian based systems" do - let :default_facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :lsbdistcodename => 'squeeze', - :id => 'root', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::mod::fastcgi") } - it { should contain_file("fastcgi-pool-#{title}.conf").with( - :ensure => 'present', - :path => "/etc/apache2/conf.d/fastcgi-pool-#{title}.conf" - ) } - end - context "on FreeBSD systems" do - let :default_facts do - { - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :id => 'root', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::mod::fastcgi") } - it { should contain_file("fastcgi-pool-#{title}.conf").with( - :ensure => 'present', - :path => "/usr/local/etc/apache22/Includes/fastcgi-pool-#{title}.conf" - ) } - end - end - describe 'os-independent items' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :lsbdistcodename => 'squeeze', - :id => 'root', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - describe ".conf content" do - let :params do - { - :host => '127.0.0.1:9001', - :timeout => 30, - :flush => true, - :faux_path => '/var/www/php-www.fcgi', - :fcgi_alias => '/php-www.fcgi', - :file_type => 'application/x-httpd-php' - } - end - let :expected do -'FastCGIExternalServer /var/www/php-www.fcgi -idle-timeout 30 -flush -host 127.0.0.1:9001 -Alias /php-www.fcgi /var/www/php-www.fcgi -Action application/x-httpd-php /php-www.fcgi -' - end - it do - should contain_file("fastcgi-pool-www.conf").with_content(expected) - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb b/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb deleted file mode 100644 index 377c8779..00000000 --- a/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod', :type => :define do - let :pre_condition do - 'include apache' - end - context "on a RedHat osfamily" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { is_expected.to contain_class("apache::params") } - it "should manage the module load file" do - is_expected.to contain_file('spec_m.load').with({ - :path => '/etc/httpd/conf.d/spec_m.load', - :content => "LoadModule spec_m_module modules/mod_spec_m.so\n", - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - end - - describe "with shibboleth module and package param passed" do - # name/title for the apache::mod define - let :title do - 'xsendfile' - end - # parameters - let(:params) { {:package => 'mod_xsendfile'} } - - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_package('mod_xsendfile') } - end - end - - context "on a Debian osfamily" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { is_expected.to contain_class("apache::params") } - it "should manage the module load file" do - is_expected.to contain_file('spec_m.load').with({ - :path => '/etc/apache2/mods-available/spec_m.load', - :content => "LoadModule spec_m_module /usr/lib/apache2/modules/mod_spec_m.so\n", - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - it "should link the module load file" do - is_expected.to contain_file('spec_m.load symlink').with({ - :path => '/etc/apache2/mods-enabled/spec_m.load', - :target => '/etc/apache2/mods-available/spec_m.load', - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - end - end - - context "on a FreeBSD osfamily" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { is_expected.to contain_class("apache::params") } - it "should manage the module load file" do - is_expected.to contain_file('spec_m.load').with({ - :path => '/usr/local/etc/apache22/Modules/spec_m.load', - :content => "LoadModule spec_m_module /usr/local/libexec/apache22/mod_spec_m.so\n", - :owner => 'root', - :group => 'wheel', - :mode => '0644', - } ) - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb b/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb deleted file mode 100644 index 2beb8c98..00000000 --- a/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb +++ /dev/null @@ -1,1500 +0,0 @@ -require 'spec_helper' - -describe 'apache::vhost', :type => :define do - let :pre_condition do - 'class { "apache": default_vhost => false, }' - end - let :title do - 'rspec.example.com' - end - let :default_params do - { - :docroot => '/rspec/docroot', - :port => '84', - } - end - describe 'os-dependent items' do - context "on RedHat based systems" do - let :default_facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { is_expected.to contain_class("apache") } - it { is_expected.to contain_class("apache::params") } - end - context "on Debian based systems" do - let :default_facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { is_expected.to contain_class("apache") } - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_file("25-rspec.example.com.conf").with( - :ensure => 'present', - :path => '/etc/apache2/sites-available/25-rspec.example.com.conf' - ) } - it { is_expected.to contain_file("25-rspec.example.com.conf symlink").with( - :ensure => 'link', - :path => '/etc/apache2/sites-enabled/25-rspec.example.com.conf', - :target => '/etc/apache2/sites-available/25-rspec.example.com.conf' - ) } - end - context "on FreeBSD systems" do - let :default_facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { is_expected.to contain_class("apache") } - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_file("25-rspec.example.com.conf").with( - :ensure => 'present', - :path => '/usr/local/etc/apache22/Vhosts/25-rspec.example.com.conf' - ) } - end - end - describe 'os-independent items' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - describe 'basic assumptions' do - let :params do default_params end - it { is_expected.to contain_class("apache") } - it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_apache__listen(params[:port]) } - it { is_expected.to contain_apache__namevirtualhost("*:#{params[:port]}") } - end - - # All match and notmatch should be a list of regexs and exact match strings - context ".conf content" do - [ - { - :title => 'should contain docroot', - :attr => 'docroot', - :value => '/not/default', - :match => [/^ DocumentRoot "\/not\/default"$/,/ /], - }, - { - :title => 'should set a port', - :attr => 'port', - :value => '8080', - :match => [/^$/], - }, - { - :title => 'should set an ip', - :attr => 'ip', - :value => '10.0.0.1', - :match => [/^$/], - }, - { - :title => 'should set a serveradmin', - :attr => 'serveradmin', - :value => 'test@test.com', - :match => [/^ ServerAdmin test@test.com$/], - }, - { - :title => 'should enable ssl', - :attr => 'ssl', - :value => true, - :match => [/^ SSLEngine on$/], - }, - { - :title => 'should set a servername', - :attr => 'servername', - :value => 'param.test', - :match => [/^ ServerName param.test$/], - }, - { - :title => 'should accept server aliases', - :attr => 'serveraliases', - :value => ['one.com','two.com'], - :match => [ - /^ ServerAlias one\.com$/, - /^ ServerAlias two\.com$/ - ], - }, - { - :title => 'should accept setenv', - :attr => 'setenv', - :value => ['TEST1 one','TEST2 two'], - :match => [ - /^ SetEnv TEST1 one$/, - /^ SetEnv TEST2 two$/ - ], - }, - { - :title => 'should accept setenvif', - :attr => 'setenvif', - ## These are bugged in rspec-puppet; the $1 is droped - #:value => ['Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], - #:match => [' SetEnvIf Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], - :value => ['Host "^test\.com$" VHOST_ACCESS=test'], - :match => [/^ SetEnvIf Host "\^test\\.com\$" VHOST_ACCESS=test$/], - }, - { - :title => 'should accept options', - :attr => 'options', - :value => ['Fake','Options'], - :match => [/^ Options Fake Options$/], - }, - { - :title => 'should accept overrides', - :attr => 'override', - :value => ['Fake', 'Override'], - :match => [/^ AllowOverride Fake Override$/], - }, - { - :title => 'should accept logroot', - :attr => 'logroot', - :value => '/fake/log', - :match => [/CustomLog "\/fake\/log\//,/ErrorLog "\/fake\/log\//], - }, - { - :title => 'should accept log_level', - :attr => 'log_level', - :value => 'info', - :match => [/LogLevel info/], - }, - { - :title => 'should accept pipe destination for access log', - :attr => 'access_log_pipe', - :value => '| /bin/fake/logging', - :match => [/CustomLog "| \/bin\/fake\/logging" combined$/], - }, - { - :title => 'should accept pipe destination for error log', - :attr => 'error_log_pipe', - :value => '| /bin/fake/logging', - :match => [/ErrorLog "| \/bin\/fake\/logging" combined$/], - }, - { - :title => 'should accept syslog destination for access log', - :attr => 'access_log_syslog', - :value => 'syslog:local1', - :match => [/CustomLog "syslog:local1" combined$/], - }, - { - :title => 'should accept syslog destination for error log', - :attr => 'error_log_syslog', - :value => 'syslog', - :match => [/ErrorLog "syslog"$/], - }, - { - :title => 'should accept custom format for access logs', - :attr => 'access_log_format', - :value => '%h %{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" \"Host: %{Host}i\" %T %D', - :match => [/CustomLog "\/var\/log\/.+_access\.log" "%h %\{X-Forwarded-For\}i %l %u %t \\"%r\\" %s %b \\"%\{Referer\}i\\" \\"%\{User-agent\}i\\" \\"Host: %\{Host\}i\\" %T %D"$/], - }, - { - :title => 'should contain access logs', - :attr => 'access_log', - :value => true, - :match => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], - }, - { - :title => 'should not contain access logs', - :attr => 'access_log', - :value => false, - :notmatch => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], - }, - { - :title => 'should contain error logs', - :attr => 'error_log', - :value => true, - :match => [/ErrorLog.+$/], - }, - { - :title => 'should not contain error logs', - :attr => 'error_log', - :value => false, - :notmatch => [/ErrorLog.+$/], - }, - { - :title => 'should set ErrorDocument 503', - :attr => 'error_documents', - :value => [ { 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}], - :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], - }, - { - :title => 'should set ErrorDocuments 503 407', - :attr => 'error_documents', - :value => [ - { 'error_code' => '503', 'document' => '/service-unavail'}, - { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, - ], - :match => [ - /^ ErrorDocument 503 \/service-unavail$/, - /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, - ], - }, - { - :title => 'should set ErrorDocument 503 in directory', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'error_documents' => [{ 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}] }, - :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], - }, - { - :title => 'should set ErrorDocuments 503 407 in directory', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'error_documents' => - [ - { 'error_code' => '503', 'document' => '/service-unavail'}, - { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, - ]}, - :match => [ - /^ ErrorDocument 503 \/service-unavail$/, - /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, - ], - }, - { - :title => 'should accept a scriptalias', - :attr => 'scriptalias', - :value => '/usr/scripts', - :match => [ - /^ ScriptAlias \/cgi-bin "\/usr\/scripts"$/, - ], - }, - { - :title => 'should accept a single scriptaliases', - :attr => 'scriptaliases', - :value => { 'alias' => '/blah/', 'path' => '/usr/scripts' }, - :match => [ - /^ ScriptAlias \/blah\/ "\/usr\/scripts"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept multiple scriptaliases', - :attr => 'scriptaliases', - :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2', 'path' => '/usr/scripts' } ], - :match => [ - /^ ScriptAlias \/blah "\/usr\/scripts"$/, - /^ ScriptAlias \/blah2 "\/usr\/scripts"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept multiple scriptaliases with and without trailing slashes', - :attr => 'scriptaliases', - :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2/', 'path' => '/usr/scripts2/' } ], - :match => [ - /^ ScriptAlias \/blah "\/usr\/scripts"$/, - /^ ScriptAlias \/blah2\/ "\/usr\/scripts2\/"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept a ScriptAliasMatch directive', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' } ], - :match => [ - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/ - ], - }, - { - :title => 'should accept multiple ScriptAliasMatch directives', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ - { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, - { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, - ], - :match => [ - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, - /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, - ], - }, - { - :title => 'should accept mixed ScriptAlias and ScriptAliasMatch directives', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ - { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, - { 'alias' => '/git', 'path' => '/var/www/gitweb/index.cgi' }, - { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, - { 'alias' => '/trac', 'path' => '/etc/apache2/trac.fcgi' }, - ], - :match => [ - /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, - /^ ScriptAlias \/git "\/var\/www\/gitweb\/index\.cgi"$/, - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, - /^ ScriptAlias \/trac "\/etc\/apache2\/trac.fcgi"$/, - ], - }, - { - :title => 'should accept proxy destinations', - :attr => 'proxy_dest', - :value => 'http://fake.com', - :match => [ - /^ ProxyPass \/ http:\/\/fake.com\/$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/$/, - /^ <\/Location>$/, - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should accept proxy_pass hash', - :attr => 'proxy_pass', - :value => { 'path' => '/path-a', 'url' => 'http://fake.com/a' }, - :match => [ - /^ ProxyPass \/path-a http:\/\/fake.com\/a$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/a$/, - /^ <\/Location>$/, - - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should accept proxy_pass array of hash', - :attr => 'proxy_pass', - :value => [ - { 'path' => '/path-a/', 'url' => 'http://fake.com/a/' }, - { 'path' => '/path-b', 'url' => 'http://fake.com/b' }, - ], - :match => [ - /^ ProxyPass \/path-a\/ http:\/\/fake.com\/a\/$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/a\/$/, - /^ <\/Location>$/, - /^ ProxyPass \/path-b http:\/\/fake.com\/b$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/b$/, - /^ <\/Location>$/, - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should enable rack', - :attr => 'rack_base_uris', - :value => ['/rack1','/rack2'], - :match => [ - /^ RackBaseURI \/rack1$/, - /^ RackBaseURI \/rack2$/, - ], - }, - { - :title => 'should accept headers', - :attr => 'headers', - :value => ['add something', 'merge something_else'], - :match => [ - /^ Header add something$/, - /^ Header merge something_else$/, - ], - }, - { - :title => 'should accept request headers', - :attr => 'request_headers', - :value => ['append something', 'unset something_else'], - :match => [ - /^ RequestHeader append something$/, - /^ RequestHeader unset something_else$/, - ], - }, - { - :title => 'should accept rewrite rules', - :attr => 'rewrite_rule', - :value => 'not a real rule', - :match => [/^ RewriteRule not a real rule$/], - }, - { - :title => 'should accept rewrite rules', - :attr => 'rewrites', - :value => [{'rewrite_rule' => ['not a real rule']}], - :match => [/^ RewriteRule not a real rule$/], - }, - { - :title => 'should accept rewrite comment', - :attr => 'rewrites', - :value => [{'comment' => 'rewrite comment', 'rewrite_rule' => ['not a real rule']}], - :match => [/^ #rewrite comment/], - }, - { - :title => 'should accept rewrite conditions', - :attr => 'rewrites', - :value => [{'comment' => 'redirect IE', 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^MSIE'], 'rewrite_rule' => ['^index\.html$ welcome.html'],}], - :match => [ - /^ #redirect IE$/, - /^ RewriteCond %{HTTP_USER_AGENT} \^MSIE$/, - /^ RewriteRule \^index\\\.html\$ welcome.html$/, - ], - }, - { - :title => 'should accept multiple rewrites', - :attr => 'rewrites', - :value => [ - {'rewrite_rule' => ['not a real rule']}, - {'rewrite_rule' => ['not a real rule two']}, - ], - :match => [ - /^ RewriteRule not a real rule$/, - /^ RewriteRule not a real rule two$/, - ], - }, - { - :title => 'should block scm', - :attr => 'block', - :value => 'scm', - :match => [/^ $/], - }, - { - :title => 'should accept a custom fragment', - :attr => 'custom_fragment', - :value => " Some custom fragment line\n That spans multiple lines", - :match => [ - /^ Some custom fragment line$/, - /^ That spans multiple lines$/, - /^<\/VirtualHost>$/, - ], - }, - { - :title => 'should accept an array of alias hashes', - :attr => 'aliases', - :value => [ { 'alias' => '/', 'path' => '/var/www'} ], - :match => [/^ Alias \/ "\/var\/www"$/], - }, - { - :title => 'should accept an alias hash', - :attr => 'aliases', - :value => { 'alias' => '/', 'path' => '/var/www'}, - :match => [/^ Alias \/ "\/var\/www"$/], - }, - { - :title => 'should accept multiple aliases', - :attr => 'aliases', - :value => [ - { 'alias' => '/', 'path' => '/var/www'}, - { 'alias' => '/cgi-bin', 'path' => '/var/www/cgi-bin'}, - { 'alias' => '/css', 'path' => '/opt/someapp/css'}, - ], - :match => [ - /^ Alias \/ "\/var\/www"$/, - /^ Alias \/cgi-bin "\/var\/www\/cgi-bin"$/, - /^ Alias \/css "\/opt\/someapp\/css"$/, - ], - }, - { - :title => 'should accept an aliasmatch hash', - :attr => 'aliases', - ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these - # tests don't work. - #:value => { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, - #:match => [/^ AliasMatch \^\/image\/\(\.\*\)\.gif \/files\/gifs\/\$1\.gif$/], - }, - { - :title => 'should accept a array of alias and aliasmatch hashes mixed', - :attr => 'aliases', - ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these - # tests don't work. - #:value => [ - # { 'alias' => '/css', 'path' => '/files/css' }, - # { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, - # { 'aliasmatch' => '^/image/(.*).jpg', 'path' => '/files/jpgs/$1.jpg' }, - # { 'alias' => '/image', 'path' => '/files/images' }, - #], - #:match => [ - # /^ Alias \/css \/files\/css$/, - # /^ AliasMatch \^\/image\/\(.\*\)\.gif \/files\/gifs\/\$1\.gif$/, - # /^ AliasMatch \^\/image\/\(.\*\)\.jpg \/files\/jpgs\/\$1\.jpg$/, - # /^ Alias \/image \/files\/images$/ - #], - }, - { - :title => 'should accept multiple additional includes', - :attr => 'additional_includes', - :value => [ - '/tmp/proxy_group_a', - '/tmp/proxy_group_b', - '/tmp/proxy_group_c', - ], - :match => [ - /^ Include "\/tmp\/proxy_group_a"$/, - /^ Include "\/tmp\/proxy_group_b"$/, - /^ Include "\/tmp\/proxy_group_c"$/, - ], - }, - { - :title => 'should accept a suPHP_Engine', - :attr => 'suphp_engine', - :value => 'on', - :match => [/^ suPHP_Engine on$/], - }, - { - :title => 'should accept a php_admin_flags', - :attr => 'php_admin_flags', - :value => { 'engine' => 'on' }, - :match => [/^ php_admin_flag engine on$/], - }, - { - :title => 'should accept php_admin_values', - :attr => 'php_admin_values', - :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept php_admin_flags in directories', - :attr => 'directories', - :value => { - 'path' => '/srv/www', - 'php_admin_flags' => { 'php_engine' => 'on' } - }, - :match => [/^ php_admin_flag php_engine on$/], - }, - { - :title => 'should accept php_admin_values', - :attr => 'php_admin_values', - :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept php_admin_values in directories', - :attr => 'directories', - :value => { - 'path' => '/srv/www', - 'php_admin_values' => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' } - }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept a wsgi script alias', - :attr => 'wsgi_script_aliases', - :value => { '/' => '/var/www/myapp.wsgi'}, - :match => [/^ WSGIScriptAlias \/ "\/var\/www\/myapp.wsgi"$/], - }, - { - :title => 'should accept multiple wsgi aliases', - :attr => 'wsgi_script_aliases', - :value => { - '/wiki' => '/usr/local/wsgi/scripts/mywiki.wsgi', - '/blog' => '/usr/local/wsgi/scripts/myblog.wsgi', - '/' => '/usr/local/wsgi/scripts/myapp.wsgi', - }, - :match => [ - /^ WSGIScriptAlias \/wiki "\/usr\/local\/wsgi\/scripts\/mywiki.wsgi"$/, - /^ WSGIScriptAlias \/blog "\/usr\/local\/wsgi\/scripts\/myblog.wsgi"$/, - /^ WSGIScriptAlias \/ "\/usr\/local\/wsgi\/scripts\/myapp.wsgi"$/, - ], - }, - { - :title => 'should accept a wsgi application group', - :attr => 'wsgi_application_group', - :value => '%{GLOBAL}', - :match => [/^ WSGIApplicationGroup %{GLOBAL}$/], - }, - { - :title => 'should set wsgi pass authorization', - :attr => 'wsgi_pass_authorization', - :value => 'On', - :match => [/^ WSGIPassAuthorization On$/], - }, - { - :title => 'should set wsgi pass authorization false', - :attr => 'wsgi_pass_authorization', - :value => 'Off', - :match => [/^ WSGIPassAuthorization Off$/], - }, - { - :title => 'should contain environment variables', - :attr => 'access_log_env_var', - :value => 'admin', - :match => [/CustomLog "\/var\/log\/.+_access\.log" combined env=admin$/] - }, - { - :title => 'should contain virtual_docroot', - :attr => 'virtual_docroot', - :value => '/not/default', - :match => [ - /^ VirtualDocumentRoot "\/not\/default"$/, - ], - }, - { - :title => 'should accept multiple directories', - :attr => 'directories', - :value => [ - { 'path' => '/opt/app' }, - { 'path' => '/var/www' }, - { 'path' => '/rspec/docroot'} - ], - :match => [ - /^ $/, - /^ $/, - /^ $/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { is_expected.to contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - is_expected.to contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - is_expected.not_to contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # Apache below 2.4 (Default Version). All match and notmatch should be a list of regexs and exact match strings - context ".conf content with $apache_version < 2.4" do - [ - { - :title => 'should accept a directory', - :attr => 'directories', - :value => { 'path' => '/opt/app' }, - :notmatch => [' '], - :match => [ - /^ $/, - /^ AllowOverride None$/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives hash', - :attr => 'directories', - :value => { - 'path' => '/opt/app', - 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', - 'allow' => 'from rspec.org', - 'allow_override' => 'Lol', - 'deny' => 'from google.com', - 'options' => '-MultiViews', - 'order' => 'deny,yned', - 'passenger_enabled' => 'onf', - 'sethandler' => 'None', - 'auth_type' => 'Basic', - 'auth_name' => 'Basic Auth', - 'auth_user_file' => '/opt/app/htpasswd', - 'auth_require' => 'valid-user', - 'satisfy' => 'Any', - }, - :match => [ - /^ $/, - /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, - /^ Allow from rspec.org$/, - /^ AllowOverride Lol$/, - /^ Deny from google.com$/, - /^ Options -MultiViews$/, - /^ Order deny,yned$/, - /^ SetHandler None$/, - /^ PassengerEnabled onf$/, - /^ AuthType Basic$/, - /^ AuthName "Basic Auth"$/, - /^ AuthUserFile \/opt\/app\/htpasswd$/, - /^ Require valid-user$/, - /^ Satisfy Any$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives with arrays and hashes', - :attr => 'directories', - :value => [ - { - 'path' => '/opt/app1', - 'allow' => 'from rspec.org', - 'allow_override' => ['AuthConfig','Indexes'], - 'deny' => 'from google.com', - 'options' => ['-MultiViews','+MultiViews'], - 'order' => ['deny','yned'], - 'passenger_enabled' => 'onf', - }, - { - 'path' => '/opt/app2', - 'addhandlers' => { - 'handler' => 'cgi-script', - 'extensions' => '.cgi', - }, - }, - ], - :match => [ - /^ $/, - /^ Allow from rspec.org$/, - /^ AllowOverride AuthConfig Indexes$/, - /^ Deny from google.com$/, - /^ Options -MultiViews \+MultiViews$/, - /^ Order deny,yned$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - /^ $/, - /^ AllowOverride None$/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ AddHandler cgi-script .cgi$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept location for provider', - :attr => 'directories', - :value => { - 'path' => '/', - 'provider' => 'location', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Location>$/, - ], - }, - { - :title => 'should accept files for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'files', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Files>$/, - ], - }, - { - :title => 'should accept files match for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'filesmatch', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/FilesMatch>$/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :apache_version => '2.2', - }) end - - it { is_expected.to contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - is_expected.to contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - is_expected.not_to contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # Apache equals or above 2.4. All match and notmatch should be a list of regexs and exact match strings - context ".conf content with $apache_version >= 2.4" do - [ - { - :title => 'should accept a directory', - :attr => 'directories', - :value => { 'path' => '/opt/app' }, - :notmatch => [' '], - :match => [ - /^ $/, - /^ AllowOverride None$/, - /^ Require all granted$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives hash', - :attr => 'directories', - :value => { - 'path' => '/opt/app', - 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', - 'allow_override' => 'Lol', - 'options' => '-MultiViews', - 'require' => 'something denied', - 'passenger_enabled' => 'onf', - }, - :match => [ - /^ $/, - /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, - /^ AllowOverride Lol$/, - /^ Options -MultiViews$/, - /^ Require something denied$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives with arrays and hashes', - :attr => 'directories', - :value => [ - { - 'path' => '/opt/app1', - 'allow_override' => ['AuthConfig','Indexes'], - 'options' => ['-MultiViews','+MultiViews'], - 'require' => ['host','example.org'], - 'passenger_enabled' => 'onf', - }, - { - 'path' => '/opt/app2', - 'addhandlers' => { - 'handler' => 'cgi-script', - 'extensions' => '.cgi', - }, - }, - ], - :match => [ - /^ $/, - /^ AllowOverride AuthConfig Indexes$/, - /^ Options -MultiViews \+MultiViews$/, - /^ Require host example.org$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - /^ $/, - /^ AllowOverride None$/, - /^ Require all granted$/, - /^ AddHandler cgi-script .cgi$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept location for provider', - :attr => 'directories', - :value => { - 'path' => '/', - 'provider' => 'location', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/Location>$/, - ], - }, - { - :title => 'should accept files for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'files', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/Files>$/, - ], - }, - { - :title => 'should accept files match for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'filesmatch', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/FilesMatch>$/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :apache_version => '2.4', - }) end - - it { is_expected.to contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - is_expected.to contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - is_expected.not_to contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # All match and notmatch should be a list of regexs and exact match strings - context ".conf content with SSL" do - [ - { - :title => 'should accept setting SSLCertificateFile', - :attr => 'ssl_cert', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificateKeyFile', - :attr => 'ssl_key', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateKeyFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificateChainFile', - :attr => 'ssl_chain', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateChainFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificatePath', - :attr => 'ssl_certs_dir', - :value => '/path/to/certs', - :match => [/^ SSLCACertificatePath "\/path\/to\/certs"$/], - }, - { - :title => 'should accept setting SSLCertificateFile', - :attr => 'ssl_ca', - :value => '/path/to/ca.pem', - :match => [/^ SSLCACertificateFile "\/path\/to\/ca\.pem"$/], - }, - { - :title => 'should accept setting SSLRevocationPath', - :attr => 'ssl_crl_path', - :value => '/path/to/crl', - :match => [/^ SSLCARevocationPath "\/path\/to\/crl"$/], - }, - { - :title => 'should accept setting SSLRevocationFile', - :attr => 'ssl_crl', - :value => '/path/to/crl.pem', - :match => [/^ SSLCARevocationFile "\/path\/to\/crl\.pem"$/], - }, - { - :title => 'should accept setting SSLProxyEngine', - :attr => 'ssl_proxyengine', - :value => true, - :match => [/^ SSLProxyEngine On$/], - }, - { - :title => 'should accept setting SSLProtocol', - :attr => 'ssl_protocol', - :value => 'all -SSLv2', - :match => [/^ SSLProtocol all -SSLv2$/], - }, - { - :title => 'should accept setting SSLCipherSuite', - :attr => 'ssl_cipher', - :value => 'RC4-SHA:HIGH:!ADH:!SSLv2', - :match => [/^ SSLCipherSuite RC4-SHA:HIGH:!ADH:!SSLv2$/], - }, - { - :title => 'should accept setting SSLHonorCipherOrder', - :attr => 'ssl_honorcipherorder', - :value => 'On', - :match => [/^ SSLHonorCipherOrder On$/], - }, - { - :title => 'should accept setting SSLVerifyClient', - :attr => 'ssl_verify_client', - :value => 'optional', - :match => [/^ SSLVerifyClient optional$/], - }, - { - :title => 'should accept setting SSLVerifyDepth', - :attr => 'ssl_verify_depth', - :value => '1', - :match => [/^ SSLVerifyDepth 1$/], - }, - { - :title => 'should accept setting SSLOptions with a string', - :attr => 'ssl_options', - :value => '+ExportCertData', - :match => [/^ SSLOptions \+ExportCertData$/], - }, - { - :title => 'should accept setting SSLOptions with an array', - :attr => 'ssl_options', - :value => ['+StrictRequire','+ExportCertData'], - :match => [/^ SSLOptions \+StrictRequire \+ExportCertData/], - }, - { - :title => 'should accept setting SSLOptions with a string in directories', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'ssl_options' => '+ExportCertData'}, - :match => [/^ SSLOptions \+ExportCertData$/], - }, - { - :title => 'should accept setting SSLOptions with an array in directories', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'ssl_options' => ['-StdEnvVars','+ExportCertData']}, - :match => [/^ SSLOptions -StdEnvVars \+ExportCertData/], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]} with SSL" do - let :params do - default_params.merge( { - param[:attr].to_sym => param[:value], - :ssl => true, - } ) - end - it { is_expected.to contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - is_expected.to contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - is_expected.not_to contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - context 'attribute resources' do - describe 'when access_log_file and access_log_pipe are specified' do - let :params do default_params.merge({ - :access_log_file => 'fake.log', - :access_log_pipe => '| /bin/fake', - }) end - it 'should cause a failure' do - expect { subject }.to raise_error(Puppet::Error, /'access_log_file' and 'access_log_pipe' cannot be defined at the same time/) - end - end - describe 'when error_log_file and error_log_pipe are specified' do - let :params do default_params.merge({ - :error_log_file => 'fake.log', - :error_log_pipe => '| /bin/fake', - }) end - it 'should cause a failure' do - expect { subject }.to raise_error(Puppet::Error, /'error_log_file' and 'error_log_pipe' cannot be defined at the same time/) - end - end - describe 'when logroot and logroot_mode are specified' do - let :params do default_params.merge({ - :logroot => '/rspec/logroot', - :logroot_mode => '0755', - }) end - it 'should set logroot mode' do - should contain_file(params[:logroot]).with({ - :ensure => :directory, - :mode => '0755', - }) - end - end - describe 'when docroot owner and mode is specified' do - let :params do default_params.merge({ - :docroot_owner => 'testuser', - :docroot_group => 'testgroup', - :docroot_mode => '0750', - }) end - it 'should set vhost ownership and permissions' do - is_expected.to contain_file(params[:docroot]).with({ - :ensure => :directory, - :owner => 'testuser', - :group => 'testgroup', - :mode => '0750', - }) - end - end - - describe 'when docroot is *not* managed' do - let :params do default_params.merge({ - :manage_docroot=> false, - }) end - it 'should not contain docroot ' do - is_expected.not_to contain_file(params[:docroot]) - end - end - - describe 'when wsgi_daemon_process and wsgi_daemon_process_options are specified' do - let :params do default_params.merge({ - :wsgi_daemon_process => 'example.org', - :wsgi_daemon_process_options => { 'processes' => '2', 'threads' => '15' }, - }) end - it 'should set wsgi_daemon_process_options' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ WSGIDaemonProcess example.org processes=2 threads=15$/ - ) - end - end - - describe 'when wsgi_import_script and wsgi_import_script_options are specified' do - let :params do default_params.merge({ - :wsgi_import_script => '/var/www/demo.wsgi', - :wsgi_import_script_options => { 'application-group' => '%{GLOBAL}', 'process-group' => 'wsgi' }, - }) end - it 'should set wsgi_import_script_options' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ WSGIImportScript \/var\/www\/demo.wsgi application-group=%{GLOBAL} process-group=wsgi$/ - ) - end - end - - describe 'when rewrites are specified' do - let :params do default_params.merge({ - :rewrites => [ - { - 'comment' => 'test rewrites', - 'rewrite_base' => '/mytestpath/', - 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'], - 'rewrite_rule' => ['^index\.html$ welcome.html', '^index\.cgi$ index.php'], - } - ] - }) end - it 'should set RewriteConds and RewriteRules' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ #test rewrites$/ - ) - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTP_USER_AGENT\} \^Lynx\/ \[OR\]$/ - ) - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteBase \/mytestpath\/$/ - ) - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTP_USER_AGENT\} \^Mozilla\/\[12\]$/ - ) - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteRule \^index\\.html\$ welcome.html$/ - ) - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteRule \^index\\.cgi\$ index.php$/ - ) - end - end - - describe 'when rewrite_rule and rewrite_cond are specified' do - let :params do default_params.merge({ - :rewrite_cond => '%{HTTPS} off', - :rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', - }) end - it 'should set RewriteCond' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTPS\} off$/ - ) - end - end - - describe 'when action is specified specified' do - let :params do default_params.merge({ - :action => 'php-fastcgi', - }) end - it 'should set Action' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ Action php-fastcgi \/cgi-bin virtual$/ - ) - end - end - - describe 'when suphp_engine is on and suphp_configpath is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :suphp_configpath => '/etc/php5/apache2', - }) end - it 'should set suphp_configpath' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ suPHP_ConfigPath "\/etc\/php5\/apache2"$/ - ) - end - end - - describe 'when suphp_engine is on and suphp_addhandler is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :suphp_addhandler => 'x-httpd-php', - }) end - it 'should set suphp_addhandler' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ suPHP_AddHandler x-httpd-php/ - ) - end - end - - describe 'when suphp_engine is on and suphp { user & group } is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :directories => { 'path' => '/srv/www', - 'suphp' => { 'user' => 'myappuser', 'group' => 'myappgroup' }, - } - }) end - it 'should set suphp_UserGroup' do - is_expected.to contain_file("25-#{title}.conf").with_content( - /^ suPHP_UserGroup myappuser myappgroup/ - ) - end - end - - describe 'priority/default settings' do - describe 'when neither priority/default is specified' do - let :params do default_params end - it { is_expected.to contain_file("25-#{title}.conf").with_path( - /25-#{title}.conf/ - ) } - end - describe 'when both priority/default_vhost is specified' do - let :params do - default_params.merge({ - :priority => 15, - :default_vhost => true, - }) - end - it { is_expected.to contain_file("15-#{title}.conf").with_path( - /15-#{title}.conf/ - ) } - end - describe 'when only priority is specified' do - let :params do - default_params.merge({ :priority => 14, }) - end - it { is_expected.to contain_file("14-#{title}.conf").with_path( - /14-#{title}.conf/ - ) } - end - describe 'when only default is specified' do - let :params do - default_params.merge({ :default_vhost => true, }) - end - it { is_expected.to contain_file("10-#{title}.conf").with_path( - /10-#{title}.conf/ - ) } - end - end - - describe 'fcgid directory options' do - describe 'No fcgiwrapper' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www' }, - }) - end - - it { is_expected.not_to contain_file("25-#{title}.conf").with_content(%r{FcgidWrapper}) } - end - - describe 'Only a command' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www', - 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper' }, - } - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper $}) } - end - - describe 'All parameters' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www', - 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper', 'suffix' => '.php', 'virtual' => 'virtual' }, - } - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper .php virtual$}) } - end - end - - describe 'various ip/port combos' do - describe 'when ip_based is true' do - let :params do default_params.merge({ :ip_based => true }) end - it 'should not specify a NameVirtualHost' do - is_expected.to contain_apache__listen(params[:port]) - is_expected.not_to contain_apache__namevirtualhost("*:#{params[:port]}") - end - end - - describe 'when ip_based is default' do - let :params do default_params end - it 'should specify a NameVirtualHost' do - is_expected.to contain_apache__listen(params[:port]) - is_expected.to contain_apache__namevirtualhost("*:#{params[:port]}") - end - end - - describe 'when an ip is set' do - let :params do default_params.merge({ :ip => '10.0.0.1' }) end - it 'should specify a NameVirtualHost for the ip' do - is_expected.not_to contain_apache__listen(params[:port]) - is_expected.to contain_apache__listen("10.0.0.1:#{params[:port]}") - is_expected.to contain_apache__namevirtualhost("10.0.0.1:#{params[:port]}") - end - end - - describe 'an ip_based vhost without a port' do - let :params do - { - :docroot => '/fake', - :ip => '10.0.0.1', - :ip_based => true, - } - end - it 'should specify a NameVirtualHost for the ip' do - is_expected.not_to contain_apache__listen(params[:ip]) - is_expected.not_to contain_apache__namevirtualhost(params[:ip]) - is_expected.to contain_file("25-#{title}.conf").with_content %r{} - end - end - end - - describe 'when suexec_user_group is specified' do - let :params do - default_params.merge({ - :suexec_user_group => 'nobody nogroup', - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{^ SuexecUserGroup nobody nogroup$} } - end - - describe 'redirect rules' do - describe 'without lockstep arrays' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], - :redirect_status => [ - 'permanent', - '', - ], - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/login} } - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } - end - describe 'redirect match rules' do - let :params do - default_params.merge({ - :redirectmatch_status => [ - '404', - ], - :redirectmatch_regexp => [ - '/\.git(/.*|$)', - ], - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ RedirectMatch 404 } } - end - describe 'without a status' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect /login http://10\.0\.0\.10/login} } - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } - end - describe 'with a single status and dest' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => 'http://10.0.0.10/test', - :redirect_status => 'permanent', - }) - end - - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/test} } - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /logout http://10\.0\.0\.10/test} } - end - - describe 'with a directoryindex specified' do - let :params do - default_params.merge({ - :directoryindex => 'index.php' - }) - end - it { is_expected.to contain_file("25-#{title}.conf").with_content %r{DirectoryIndex index.php} } - end - end - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/fixtures/files/negotiation.conf b/puphpet/puppet/modules/apache/spec/fixtures/files/negotiation.conf deleted file mode 100644 index c0bb8b9f..00000000 --- a/puphpet/puppet/modules/apache/spec/fixtures/files/negotiation.conf +++ /dev/null @@ -1,4 +0,0 @@ -# This is a file only for spec testing - -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW -ForceLanguagePriority Prefer Fallback diff --git a/puphpet/puppet/modules/apache/spec/fixtures/files/spec b/puphpet/puppet/modules/apache/spec/fixtures/files/spec deleted file mode 100644 index 76e9a144..00000000 --- a/puphpet/puppet/modules/apache/spec/fixtures/files/spec +++ /dev/null @@ -1 +0,0 @@ -# This is a file only for spec testing diff --git a/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb b/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb deleted file mode 100644 index 019debfe..00000000 --- a/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb +++ /dev/null @@ -1 +0,0 @@ -Fake template for rspec. diff --git a/puphpet/puppet/modules/apache/spec/fixtures/templates/negotiation.conf.erb b/puphpet/puppet/modules/apache/spec/fixtures/templates/negotiation.conf.erb deleted file mode 100644 index 55750224..00000000 --- a/puphpet/puppet/modules/apache/spec/fixtures/templates/negotiation.conf.erb +++ /dev/null @@ -1,4 +0,0 @@ -# This is a template only for spec testing - -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW -ForceLanguagePriority Prefer Fallback diff --git a/puphpet/puppet/modules/apache/spec/spec.opts b/puphpet/puppet/modules/apache/spec/spec.opts deleted file mode 100644 index 91cd6427..00000000 --- a/puphpet/puppet/modules/apache/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/puphpet/puppet/modules/apache/spec/spec_helper.rb b/puphpet/puppet/modules/apache/spec/spec_helper.rb deleted file mode 100644 index 65379ee3..00000000 --- a/puphpet/puppet/modules/apache/spec/spec_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -RSpec.configure do |c| - c.treat_symbols_as_metadata_keys_with_true_values = true - - c.before :each do - # Ensure that we don't accidentally cache facts and environment - # between test cases. - Facter::Util::Loader.any_instance.stubs(:load_all) - Facter.clear - Facter.clear_messages - - # Store any environment variables away to be restored later - @old_env = {} - ENV.each_key {|k| @old_env[k] = ENV[k]} - - if ENV['STRICT_VARIABLES'] == 'yes' - Puppet.settings[:strict_variables]=true - end - end -end - -shared_examples :compile, :compile => true do - it { should compile.with_all_deps } -end diff --git a/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb b/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb deleted file mode 100644 index 370de46c..00000000 --- a/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' - - -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - if host['platform'] =~ /debian/ - on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' - end - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -UNSUPPORTED_PLATFORMS = ['Suse','windows','AIX','Solaris'] - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'apache') - hosts.each do |host| - # Required for mod_passenger tests. - if fact('osfamily') == 'RedHat' - on host, puppet('module','install','stahnma/epel'), { :acceptable_exit_codes => [0,1] } - end - # Required for manifest to make mod_pagespeed repository available - if fact('osfamily') == 'Debian' - on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } - end - on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } - end - end -end diff --git a/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb b/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb deleted file mode 100644 index 78f902bf..00000000 --- a/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -provider_class = Puppet::Type.type(:a2mod).provider(:gentoo) - -describe provider_class do - before :each do - provider_class.clear - end - - [:conf_file, :instances, :modules, :initvars, :conf_file, :clear].each do |method| - it "should respond to the class method #{method}" do - expect(provider_class).to respond_to(method) - end - end - - describe "when fetching modules" do - before do - @filetype = mock() - end - - it "should return a sorted array of the defined parameters" do - @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) - provider_class.expects(:filetype).returns(@filetype) - - expect(provider_class.modules).to eq(%w{bar baz foo}) - end - - it "should cache the module list" do - @filetype.expects(:read).once.returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) - provider_class.expects(:filetype).once.returns(@filetype) - - 2.times { expect(provider_class.modules).to eq(%w{bar baz foo}) } - end - - it "should normalize parameters" do - @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAR"\n}) - provider_class.expects(:filetype).returns(@filetype) - - expect(provider_class.modules).to eq(%w{bar foo}) - end - end - - describe "when prefetching" do - it "should match providers to resources" do - provider = mock("ssl_provider", :name => "ssl") - resource = mock("ssl_resource") - resource.expects(:provider=).with(provider) - - provider_class.expects(:instances).returns([provider]) - provider_class.prefetch("ssl" => resource) - end - end - - describe "when flushing" do - before :each do - @filetype = mock() - @filetype.stubs(:backup) - provider_class.expects(:filetype).at_least_once.returns(@filetype) - - @info = mock() - @info.stubs(:[]).with(:name).returns("info") - @info.stubs(:provider=) - - @mpm = mock() - @mpm.stubs(:[]).with(:name).returns("mpm") - @mpm.stubs(:provider=) - - @ssl = mock() - @ssl.stubs(:[]).with(:name).returns("ssl") - @ssl.stubs(:provider=) - end - - it "should add modules whose ensure is present" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - provider_class.flush - end - - it "should remove modules whose ensure is present" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO"}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS=""}) - - @info.stubs(:should).with(:ensure).returns(:absent) - @info.stubs(:provider=) - provider_class.prefetch("info" => @info) - - provider_class.flush - end - - it "should not modify providers without resources" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO -D MPM"}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D MPM -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:absent) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should write the modules in sorted order" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO -D MPM -D SSL"}) - - @mpm.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("mpm" => @mpm) - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should write the records back once" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should only modify the line containing APACHE2_OPTS" do - @filetype.expects(:read).at_least_once.returns(%Q{# Comment\nAPACHE2_OPTS=""\n# Another comment}) - @filetype.expects(:write).once.with(%Q{# Comment\nAPACHE2_OPTS="-D INFO"\n# Another comment}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - provider_class.flush - end - - it "should restore any arbitrary arguments" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-Y -D MPM -X"}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-Y -X -D INFO -D MPM"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - provider_class.flush - end - - it "should backup the file once if changes were made" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - @filetype.unstub(:backup) - @filetype.expects(:backup) - provider_class.flush - end - - it "should not write the file or run backups if no changes were made" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-X -D INFO -D SSL -Y"}) - @filetype.expects(:write).never - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - @filetype.unstub(:backup) - @filetype.expects(:backup).never - provider_class.flush - end - end -end diff --git a/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb b/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb deleted file mode 100644 index 10e51644..00000000 --- a/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb +++ /dev/null @@ -1,4 +0,0 @@ - - AcceptFilter http none - AcceptFilter https none - diff --git a/puphpet/puppet/modules/apache/templates/fastcgi/server.erb b/puphpet/puppet/modules/apache/templates/fastcgi/server.erb deleted file mode 100644 index 9cb25b76..00000000 --- a/puphpet/puppet/modules/apache/templates/fastcgi/server.erb +++ /dev/null @@ -1,3 +0,0 @@ -FastCGIExternalServer <%= @faux_path %> -idle-timeout <%= @timeout %> <%= if @flush then '-flush' end %> -host <%= @host %> -Alias <%= @fcgi_alias %> <%= @faux_path %> -Action <%= @file_type %> <%= @fcgi_alias %> diff --git a/puphpet/puppet/modules/apache/templates/httpd.conf.erb b/puphpet/puppet/modules/apache/templates/httpd.conf.erb deleted file mode 100644 index cac3aaf1..00000000 --- a/puphpet/puppet/modules/apache/templates/httpd.conf.erb +++ /dev/null @@ -1,109 +0,0 @@ -# Security -ServerTokens <%= @server_tokens %> -ServerSignature <%= @server_signature %> -TraceEnable <%= @trace_enable %> - -ServerName "<%= @servername %>" -ServerRoot "<%= @server_root %>" -PidFile <%= @pidfile %> -Timeout <%= @timeout %> -KeepAlive <%= @keepalive %> -MaxKeepAliveRequests <%= @max_keepalive_requests %> -KeepAliveTimeout <%= @keepalive_timeout %> - -User <%= @user %> -Group <%= @group %> - -AccessFileName .htaccess - -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied -<%- else -%> - Order allow,deny - Deny from all - Satisfy all -<%- end -%> - - - - Options FollowSymLinks - AllowOverride None - - -DefaultType none -HostnameLookups Off -ErrorLog "<%= @logroot %>/<%= @error_log %>" -LogLevel <%= @log_level %> -EnableSendfile <%= @sendfile %> - -#Listen 80 - -<% if @apxs_workaround -%> -# Workaround: without this hack apxs would be confused about where to put -# LoadModule directives and fail entire procedure of apache package -# installation/reinstallation. This problem was observed on FreeBSD (apache22). -#LoadModule fake_module libexec/apache22/mod_fake.so -<% end -%> - -Include "<%= @mod_load_dir %>/*.load" -<% if @mod_load_dir != @confd_dir and @mod_load_dir != @vhost_load_dir -%> -Include "<%= @mod_load_dir %>/*.conf" -<% end -%> -Include "<%= @ports_file %>" - -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 -<% if @log_formats and !@log_formats.empty? -%> - <%- @log_formats.each do |nickname,format| -%> -LogFormat "<%= format -%>" <%= nickname %> - <%- end -%> -<% end -%> - -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> -IncludeOptional "<%= @confd_dir %>/*.conf" -<%- else -%> -Include "<%= @confd_dir %>/*.conf" -<%- end -%> -<% if @vhost_load_dir != @confd_dir -%> -Include "<%= @vhost_load_dir %>/*" -<% end -%> - -<% if @error_documents -%> -# /usr/share/apache2/error on debian -Alias /error/ "<%= @error_documents_path %>/" - -"> - AllowOverride None - Options IncludesNoExec - AddOutputFilter Includes html - AddHandler type-map var -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted -<%- else -%> - Order allow,deny - Allow from all -<%- end -%> - LanguagePriority en cs de es fr it nl sv pt-br ro - ForceLanguagePriority Prefer Fallback - - -ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var -ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var -ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var -ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var -ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var -ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var -ErrorDocument 410 /error/HTTP_GONE.html.var -ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var -ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var -ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var -ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var -ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var -ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var -ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var -ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var -ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var -ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/listen.erb b/puphpet/puppet/modules/apache/templates/listen.erb deleted file mode 100644 index 8fc871b0..00000000 --- a/puphpet/puppet/modules/apache/templates/listen.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%# Listen should always be one of: - - - - : - - [ --%> -Listen <%= @listen_addr_port %> diff --git a/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb b/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb deleted file mode 100644 index 151a806c..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb +++ /dev/null @@ -1,13 +0,0 @@ - -Alias /icons/ "<%= @icons_path %>/" -"> - Options Indexes MultiViews - AllowOverride None -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted -<%- else -%> - Order allow,deny - Allow from all -<%- end -%> - - diff --git a/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb b/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb deleted file mode 100644 index 565fcf0d..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if @verifyServerCert == true -%> -LDAPVerifyServerCert On -<% else -%> -LDAPVerifyServerCert Off -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb b/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb deleted file mode 100644 index ef6bbebe..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb +++ /dev/null @@ -1,56 +0,0 @@ -IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8 -AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2 - -AddIconByType (TXT,/icons/text.gif) text/* -AddIconByType (IMG,/icons/image2.gif) image/* -AddIconByType (SND,/icons/sound2.gif) audio/* -AddIconByType (VID,/icons/movie.gif) video/* - -AddIcon /icons/binary.gif .bin .exe -AddIcon /icons/binhex.gif .hqx -AddIcon /icons/tar.gif .tar -AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv -AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip -AddIcon /icons/a.gif .ps .ai .eps -AddIcon /icons/layout.gif .html .shtml .htm .pdf -AddIcon /icons/text.gif .txt -AddIcon /icons/c.gif .c -AddIcon /icons/p.gif .pl .py -AddIcon /icons/f.gif .for -AddIcon /icons/dvi.gif .dvi -AddIcon /icons/uuencoded.gif .uu -AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl -AddIcon /icons/tex.gif .tex -AddIcon /icons/bomb.gif /core -AddIcon (SND,/icons/sound2.gif) .ogg -AddIcon (VID,/icons/movie.gif) .ogm - -AddIcon /icons/back.gif .. -AddIcon /icons/hand.right.gif README -AddIcon /icons/folder.gif ^^DIRECTORY^^ -AddIcon /icons/blank.gif ^^BLANKICON^^ - -AddIcon /icons/odf6odt-20x22.png .odt -AddIcon /icons/odf6ods-20x22.png .ods -AddIcon /icons/odf6odp-20x22.png .odp -AddIcon /icons/odf6odg-20x22.png .odg -AddIcon /icons/odf6odc-20x22.png .odc -AddIcon /icons/odf6odf-20x22.png .odf -AddIcon /icons/odf6odb-20x22.png .odb -AddIcon /icons/odf6odi-20x22.png .odi -AddIcon /icons/odf6odm-20x22.png .odm - -AddIcon /icons/odf6ott-20x22.png .ott -AddIcon /icons/odf6ots-20x22.png .ots -AddIcon /icons/odf6otp-20x22.png .otp -AddIcon /icons/odf6otg-20x22.png .otg -AddIcon /icons/odf6otc-20x22.png .otc -AddIcon /icons/odf6otf-20x22.png .otf -AddIcon /icons/odf6oti-20x22.png .oti -AddIcon /icons/odf6oth-20x22.png .oth - -DefaultIcon /icons/unknown.gif -ReadmeName README.html -HeaderName HEADER.html - -IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t diff --git a/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb b/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb deleted file mode 100644 index 5f82d742..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb +++ /dev/null @@ -1 +0,0 @@ -ScriptSock "<%= @cgisock_path %>" diff --git a/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb b/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb deleted file mode 100644 index 3c53e9e1..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb +++ /dev/null @@ -1 +0,0 @@ -DAVLockDB "<%= @dav_lock %>" diff --git a/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb b/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb deleted file mode 100644 index ede8b2e7..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb +++ /dev/null @@ -1,7 +0,0 @@ -<%- @types.sort.each do |type| -%> -AddOutputFilterByType DEFLATE <%= type %> -<%- end -%> - -<%- @notes.sort.each do |type,note| -%> -DeflateFilterNote <%= type %> <%=note %> -<%- end -%> diff --git a/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb b/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb deleted file mode 100644 index 741f6ae0..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb +++ /dev/null @@ -1 +0,0 @@ -DirectoryIndex <%= @indexes.join(' ') %> diff --git a/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb b/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb deleted file mode 100644 index 0c7e2c4b..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - - CacheEnable disk / - CacheRoot "<%= @cache_root %>" - CacheDirLevels 2 - CacheDirLength 1 - - diff --git a/puphpet/puppet/modules/apache/templates/mod/event.conf.erb b/puphpet/puppet/modules/apache/templates/mod/event.conf.erb deleted file mode 100644 index 40099543..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/event.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ - - ServerLimit <%= @serverlimit %> - StartServers <%= @startservers %> - MaxClients <%= @maxclients %> - MinSpareThreads <%= @minsparethreads %> - MaxSpareThreads <%= @maxsparethreads %> - ThreadsPerChild <%= @threadsperchild %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb b/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb deleted file mode 100644 index 8d94a236..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb +++ /dev/null @@ -1,6 +0,0 @@ -# The Fastcgi Apache module configuration file is being -# managed by Puppet and changes will be overwritten. - - AddHandler fastcgi-script .fcgi - FastCgiIpcDir "<%= @fastcgi_lib_path %>" - diff --git a/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb b/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb deleted file mode 100644 index a82bc30d..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb +++ /dev/null @@ -1,5 +0,0 @@ - -<% @options.sort_by {|key, value| key}.each do |key, value| -%> - <%= key %> <%= value %> -<% end -%> - diff --git a/puphpet/puppet/modules/apache/templates/mod/info.conf.erb b/puphpet/puppet/modules/apache/templates/mod/info.conf.erb deleted file mode 100644 index 1a025b7a..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/info.conf.erb +++ /dev/null @@ -1,19 +0,0 @@ - - SetHandler server-info -<%- if @restrict_access -%> - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - <%- if @allow_from and ! @allow_from.empty? -%> - <%- @allow_from.each do |allowed| -%> - Allow from <%= allowed %> - <%- end -%> - <%- else -%> - Allow from 127.0.0.1 - Allow from ::1 - <%- end -%> - <%- end -%> -<%- end -%> - diff --git a/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb b/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb deleted file mode 100644 index f45f2b35..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - StartServers <%= @startservers %> - MinSpareServers <%= @minspareservers %> - MaxSpareServers <%= @maxspareservers %> - ServerLimit <%= @serverlimit %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb b/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb deleted file mode 100644 index 00197761..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb +++ /dev/null @@ -1,11 +0,0 @@ - - SetHandler ldap-status - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 - <%- else -%> - Order deny,allow - Deny from all - Allow from 127.0.0.1 ::1 - Satisfy all - <%- end -%> - diff --git a/puphpet/puppet/modules/apache/templates/mod/load.erb b/puphpet/puppet/modules/apache/templates/mod/load.erb deleted file mode 100644 index 51f45edb..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/load.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @loadfiles -%> -<% Array(@loadfiles).each do |loadfile| -%> -LoadFile <%= loadfile %> -<% end -%> - -<% end -%> -LoadModule <%= @_id %> <%= @_path %> diff --git a/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb b/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb deleted file mode 100644 index a69a424a..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb +++ /dev/null @@ -1,36 +0,0 @@ -TypesConfig <%= @mime_types_config %> - -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz -AddType application/x-bzip2 .bz2 - -AddLanguage ca .ca -AddLanguage cs .cz .cs -AddLanguage da .dk -AddLanguage de .de -AddLanguage el .el -AddLanguage en .en -AddLanguage eo .eo -AddLanguage es .es -AddLanguage et .et -AddLanguage fr .fr -AddLanguage he .he -AddLanguage hr .hr -AddLanguage it .it -AddLanguage ja .ja -AddLanguage ko .ko -AddLanguage ltz .ltz -AddLanguage nl .nl -AddLanguage nn .nn -AddLanguage no .no -AddLanguage pl .po -AddLanguage pt .pt -AddLanguage pt-BR .pt-br -AddLanguage ru .ru -AddLanguage sv .sv -AddLanguage zh-CN .zh-cn -AddLanguage zh-TW .zh-tw - -AddHandler type-map var -AddType text/html .shtml -AddOutputFilter INCLUDES .shtml diff --git a/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb b/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb deleted file mode 100644 index 1ce1bc3c..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb +++ /dev/null @@ -1 +0,0 @@ -MIMEMagicFile "<%= @magic_file %>" diff --git a/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb b/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb deleted file mode 100644 index eb6f1ff5..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ - - StartServers 2 - MinSpareThreads 25 - MaxSpareThreads 75 - ThreadLimit 64 - ThreadsPerChild 25 - MaxClients 150 - MaxRequestsPerChild 0 - diff --git a/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb b/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb deleted file mode 100644 index 2fb4700d..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb +++ /dev/null @@ -1,2 +0,0 @@ -LanguagePriority <%= Array(@language_priority).join(' ') %> -ForceLanguagePriority <%= Array(@force_language_priority).join(' ') %> diff --git a/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb b/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb deleted file mode 100644 index a5c81752..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb +++ /dev/null @@ -1,228 +0,0 @@ -# -# This is the Apache server configuration file providing SSL support using. -# the mod_nss plugin. It contains the configuration directives to instruct -# the server how to serve pages over an https connection. -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. -# - -#LoadModule nss_module modules/libmodnss.so - -# -# When we also provide SSL we have to listen to the -# standard HTTP port (see above) and to the HTTPS port -# -# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two -# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443" -# -Listen 8443 - -## -## SSL Global Context -## -## All SSL configuration in this context applies both to -## the main server and all SSL-enabled virtual hosts. -## - -# -# Some MIME-types for downloading Certificates and CRLs -# -AddType application/x-x509-ca-cert .crt -AddType application/x-pkcs7-crl .crl - -# Pass Phrase Dialog: -# Configure the pass phrase gathering process. -# The filtering dialog program (`builtin' is a internal -# terminal dialog) has to provide the pass phrase on stdout. -<% if @passwd_file -%> -NSSPassPhraseDialog "file:<%= @passwd_file %>" -<% else -%> -NSSPassPhraseDialog builtin -<% end -%> - -# Pass Phrase Helper: -# This helper program stores the token password pins between -# restarts of Apache. -NSSPassPhraseHelper /usr/sbin/nss_pcache - -# Configure the SSL Session Cache. -# NSSSessionCacheSize is the number of entries in the cache. -# NSSSessionCacheTimeout is the SSL2 session timeout (in seconds). -# NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds). -NSSSessionCacheSize 10000 -NSSSessionCacheTimeout 100 -NSSSession3CacheTimeout 86400 - -# -# Pseudo Random Number Generator (PRNG): -# Configure one or more sources to seed the PRNG of the SSL library. -# The seed data should be of good random quality. -# WARNING! On some platforms /dev/random blocks if not enough entropy -# is available. Those platforms usually also provide a non-blocking -# device, /dev/urandom, which may be used instead. -# -# This does not support seeding the RNG with each connection. - -NSSRandomSeed startup builtin -#NSSRandomSeed startup file:/dev/random 512 -#NSSRandomSeed startup file:/dev/urandom 512 - -# -# TLS Negotiation configuration under RFC 5746 -# -# Only renegotiate if the peer's hello bears the TLS renegotiation_info -# extension. Default off. -NSSRenegotiation off - -# Peer must send Signaling Cipher Suite Value (SCSV) or -# Renegotiation Info (RI) extension in ALL handshakes. Default: off -NSSRequireSafeNegotiation off - -## -## SSL Virtual Host Context -## - - - -# General setup for the virtual host -#DocumentRoot "/etc/httpd/htdocs" -#ServerName www.example.com:8443 -#ServerAdmin you@example.com - -# mod_nss can log to separate log files, you can choose to do that if you'd like -# LogLevel is not inherited from httpd.conf. -ErrorLog "<%= @error_log %>" -TransferLog "<%= @transfer_log %>" -LogLevel warn - -# SSL Engine Switch: -# Enable/Disable SSL for this virtual host. -NSSEngine on - -# SSL Cipher Suite: -# List the ciphers that the client is permitted to negotiate. -# See the mod_nss documentation for a complete list. - -# SSL 3 ciphers. SSL 2 is disabled by default. -NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha - -# SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default. -# -# Comment out the NSSCipherSuite line above and use the one below if you have -# ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography -#NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha - -# SSL Protocol: -# Cryptographic protocols that provide communication security. -# NSS handles the specified protocols as "ranges", and automatically -# negotiates the use of the strongest protocol for a connection starting -# with the maximum specified protocol and downgrading as necessary to the -# minimum specified protocol that can be used between two processes. -# Since all protocol ranges are completely inclusive, and no protocol in the -# middle of a range may be excluded, the entry "NSSProtocol SSLv3,TLSv1.1" -# is identical to the entry "NSSProtocol SSLv3,TLSv1.0,TLSv1.1". -NSSProtocol SSLv3,TLSv1.0,TLSv1.1 - -# SSL Certificate Nickname: -# The nickname of the RSA server certificate you are going to use. -NSSNickname Server-Cert - -# SSL Certificate Nickname: -# The nickname of the ECC server certificate you are going to use, if you -# have an ECC-enabled version of NSS and mod_nss -#NSSECCNickname Server-Cert-ecc - -# Server Certificate Database: -# The NSS security database directory that holds the certificates and -# keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. -# Provide the directory that these files exist. -NSSCertificateDatabase "<%= @httpd_dir -%>/alias" - -# Database Prefix: -# In order to be able to store multiple NSS databases in one directory -# they need unique names. This option sets the database prefix used for -# cert8.db and key3.db. -#NSSDBPrefix my-prefix- - -# Client Authentication (Type): -# Client certificate verification type. Types are none, optional and -# require. -#NSSVerifyClient none - -# -# Online Certificate Status Protocol (OCSP). -# Verify that certificates have not been revoked before accepting them. -#NSSOCSP off - -# -# Use a default OCSP responder. If enabled this will be used regardless -# of whether one is included in a client certificate. Note that the -# server certificate is verified during startup. -# -# NSSOCSPDefaultURL defines the service URL of the OCSP responder -# NSSOCSPDefaultName is the nickname of the certificate to trust to -# sign the OCSP responses. -#NSSOCSPDefaultResponder on -#NSSOCSPDefaultURL http://example.com/ocsp/status -#NSSOCSPDefaultName ocsp-nickname - -# Access Control: -# With SSLRequire you can do per-directory access control based -# on arbitrary complex boolean expressions containing server -# variable checks and other lookup directives. The syntax is a -# mixture between C and Perl. See the mod_nss documentation -# for more details. -# -#NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ -# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ -# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ -# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ -# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ -# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ -# - -# SSL Engine Options: -# Set various options for the SSL engine. -# o FakeBasicAuth: -# Translate the client X.509 into a Basic Authorisation. This means that -# the standard Auth/DBMAuth methods can be used for access control. The -# user name is the `one line' version of the client's X.509 certificate. -# Note that no password is obtained from the user. Every entry in the user -# file needs this password: `xxj31ZMTZzkVA'. -# o ExportCertData: -# This exports two additional environment variables: SSL_CLIENT_CERT and -# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the -# server (always existing) and the client (only existing when client -# authentication is used). This can be used to import the certificates -# into CGI scripts. -# o StdEnvVars: -# This exports the standard SSL/TLS related `SSL_*' environment variables. -# Per default this exportation is switched off for performance reasons, -# because the extraction step is an expensive operation and is usually -# useless for serving static content. So one usually enables the -# exportation for CGI and SSI requests only. -# o StrictRequire: -# This denies access when "NSSRequireSSL" or "NSSRequire" applied even -# under a "Satisfy any" situation, i.e. when it applies access is denied -# and no other module can change it. -# o OptRenegotiate: -# This enables optimized SSL connection renegotiation handling when SSL -# directives are used in per-directory context. -#NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire - - NSSOptions +StdEnvVars - - - NSSOptions +StdEnvVars - - -# Per-Server Logging: -# The home of a custom SSL log file. Use this when you want a -# compact non-error SSL logfile on a virtual host basis. -#CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \ -# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" - - - diff --git a/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb b/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb deleted file mode 100644 index a4d8a722..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb +++ /dev/null @@ -1,98 +0,0 @@ -ModPagespeed on - -ModPagespeedInheritVHostConfig <%= @inherit_vhost_config %> -AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html -<% if @filter_xhtml -%> -AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml -<% end -%> -ModPagespeedFileCachePath "<%= @cache_path %>" -ModPagespeedLogDir "<%= @log_dir %>" - -<% @memache_servers.each do |server| -%> -ModPagespeedMemcachedServers <%= server -%> -<% end -%> - -ModPagespeedRewriteLevel <%= @rewrite_level -%> - -<% @disable_filters.each do |filter| -%> -ModPagespeedDisableFilters <%= filter -%> -<% end -%> - -<% @enable_filters.each do |filter| -%> -ModPagespeedEnableFilters <%= filter -%> -<% end -%> - -<% @forbid_filters.each do |filter| -%> -ModPagespeedForbidFilters <%= filter -%> -<% end -%> - -ModPagespeedRewriteDeadlinePerFlushMs <%= @rewrite_deadline_per_flush_ms %> - -<% if @additional_domains -%> -ModPagespeedDomain <%= @additional_domains -%> -<% end -%> - -ModPagespeedFileCacheSizeKb <%= @file_cache_size_kb %> -ModPagespeedFileCacheCleanIntervalMs <%= @file_cache_clean_interval_ms %> -ModPagespeedLRUCacheKbPerProcess <%= @lru_cache_per_process %> -ModPagespeedLRUCacheByteLimit <%= @lru_cache_byte_limit %> -ModPagespeedCssFlattenMaxBytes <%= @css_flatten_max_bytes %> -ModPagespeedCssInlineMaxBytes <%= @css_inline_max_bytes %> -ModPagespeedCssImageInlineMaxBytes <%= @css_image_inline_max_bytes %> -ModPagespeedImageInlineMaxBytes <%= @image_inline_max_bytes %> -ModPagespeedJsInlineMaxBytes <%= @js_inline_max_bytes %> -ModPagespeedCssOutlineMinBytes <%= @css_outline_min_bytes %> -ModPagespeedJsOutlineMinBytes <%= @js_outline_min_bytes %> - - -ModPagespeedFileCacheInodeLimit <%= @inode_limit %> -ModPagespeedImageMaxRewritesAtOnce <%= @image_max_rewrites_at_once %> - -ModPagespeedNumRewriteThreads <%= @num_rewrite_threads %> -ModPagespeedNumExpensiveRewriteThreads <%= @num_expensive_rewrite_threads %> - -ModPagespeedStatistics <%= @collect_statistics %> - - - # You may insert other "Allow from" lines to add hosts you want to - # allow to look at generated statistics. Another possibility is - # to comment out the "Order" and "Allow" options from the config - # file, to allow any client that can reach your server to examine - # statistics. This might be appropriate in an experimental setup or - # if the Apache server is protected by a reverse proxy that will - # filter URLs in some fashion. - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> - <%- end -%> - SetHandler mod_pagespeed_statistics - - -ModPagespeedStatisticsLogging <%= @statistics_logging %> - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> - <%- end -%> - SetHandler pagespeed_console - - -ModPagespeedMessageBufferSize <%= @message_buffer_size %> - - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> - <%- end -%> - SetHandler mod_pagespeed_message - - -<% @additional_configuration.each_pair do |key, value| -%> -<%= key %> <%= value %> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb b/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb deleted file mode 100644 index dd9eee3b..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb +++ /dev/null @@ -1,37 +0,0 @@ -# The Passanger Apache module configuration file is being -# managed by Puppet and changes will be overwritten. - - <%- if @passenger_root -%> - PassengerRoot "<%= @passenger_root %>" - <%- end -%> - <%- if @passenger_ruby -%> - PassengerRuby "<%= @passenger_ruby %>" - <%- end -%> - <%- if @passenger_default_ruby -%> - PassengerDefaultRuby "<%= @passenger_default_ruby %>" - <%- end -%> - <%- if @passenger_high_performance -%> - PassengerHighPerformance <%= @passenger_high_performance %> - <%- end -%> - <%- if @passenger_max_pool_size -%> - PassengerMaxPoolSize <%= @passenger_max_pool_size %> - <%- end -%> - <%- if @passenger_pool_idle_time -%> - PassengerPoolIdleTime <%= @passenger_pool_idle_time %> - <%- end -%> - <%- if @passenger_max_requests -%> - PassengerMaxRequests <%= @passenger_max_requests %> - <%- end -%> - <%- if @passenger_stat_throttle_rate -%> - PassengerStatThrottleRate <%= @passenger_stat_throttle_rate %> - <%- end -%> - <%- if @rack_autodetect -%> - RackAutoDetect <%= @rack_autodetect %> - <%- end -%> - <%- if @rails_autodetect -%> - RailsAutoDetect <%= @rails_autodetect %> - <%- end -%> - <%- if @passenger_use_global_queue -%> - PassengerUseGlobalQueue <%= @passenger_use_global_queue %> - <%- end -%> - diff --git a/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb b/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb deleted file mode 100644 index 13c8d708..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb +++ /dev/null @@ -1,12 +0,0 @@ - - MinSpareProcessors <%= @minspareprocessors %> - MinProcessors <%= @minprocessors %> - MaxProcessors <%= @maxprocessors %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - IdleTimeout <%= @idletimeout %> - ExpireTimeout <%= @expiretimeout %> - KeepAlive <%= @keepalive %> - Include "<%= @mod_dir %>/peruser/multiplexers/*.conf" - Include "<%= @mod_dir %>/peruser/processors/*.conf" - diff --git a/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb b/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb deleted file mode 100644 index 44df2ae0..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb +++ /dev/null @@ -1,30 +0,0 @@ -# -# PHP is an HTML-embedded scripting language which attempts to make it -# easy for developers to write dynamically generated webpages. -# -# -# LoadModule php5_module modules/libphp5.so -# -# -# # Use of the "ZTS" build with worker is experimental, and no shared -# # modules are supported. -# LoadModule php5_module modules/libphp5-zts.so -# - -# -# Cause the PHP interpreter to handle files with a .php extension. -# -AddHandler php5-script <%= @extensions.flatten.compact.join(' ') %> -AddType text/html .php - -# -# Add index.php to the list of files that will be served as directory -# indexes. -# -DirectoryIndex index.php - -# -# Uncomment the following line to allow PHP to pretty-print .phps -# files as PHP source code: -# -#AddType application/x-httpd-php-source .phps diff --git a/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb b/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb deleted file mode 100644 index aabfdf7b..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - StartServers <%= @startservers %> - MinSpareServers <%= @minspareservers %> - MaxSpareServers <%= @maxspareservers %> - ServerLimit <%= @serverlimit %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb b/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb deleted file mode 100644 index 5ea829ee..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb +++ /dev/null @@ -1,27 +0,0 @@ -# -# Proxy Server directives. Uncomment the following lines to -# enable the proxy server: -# - - # Do not enable proxying with ProxyRequests until you have secured your - # server. Open proxy servers are dangerous both to your network and to the - # Internet at large. - ProxyRequests <%= @proxy_requests %> - - <% if @proxy_requests != 'Off' or ( @allow_from and ! @allow_from.empty? ) -%> - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - Allow from <%= Array(@allow_from).join(" ") %> - <%- end -%> - - <% end -%> - - # Enable/disable the handling of HTTP/1.1 "Via:" headers. - # ("Full" adds the server version; "Block" removes all outgoing Via: headers) - # Set to one of: Off | On | Full | Block - ProxyVia On - diff --git a/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb b/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb deleted file mode 100644 index fea15f39..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb +++ /dev/null @@ -1,18 +0,0 @@ -ProxyHTMLLinks a href -ProxyHTMLLinks area href -ProxyHTMLLinks link href -ProxyHTMLLinks img src longdesc usemap -ProxyHTMLLinks object classid codebase data usemap -ProxyHTMLLinks q cite -ProxyHTMLLinks blockquote cite -ProxyHTMLLinks ins cite -ProxyHTMLLinks del cite -ProxyHTMLLinks form action -ProxyHTMLLinks input src usemap -ProxyHTMLLinks head profileProxyHTMLLinks base href -ProxyHTMLLinks script src for - -ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ - onmouseover onmousemove onmouseout onkeypress \ - onkeydown onkeyup onfocus onblur onload \ - onunload onsubmit onreset onselect onchange diff --git a/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb b/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb deleted file mode 100644 index 9a18800d..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb +++ /dev/null @@ -1,2 +0,0 @@ -RequestReadTimeout header=20-40,minrate=500 -RequestReadTimeout body=10,minrate=500 diff --git a/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb b/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb deleted file mode 100644 index 56e2398b..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -# Enable reverse proxy add forward -RPAFenable On -# RPAFsethostname will, when enabled, take the incoming X-Host header and -# update the virtual host settings accordingly. This allows to have the same -# hostnames as in the "real" configuration for the forwarding proxy. -<% if @sethostname -%> -RPAFsethostname On -<% else -%> -RPAFsethostname Off -<% end -%> -# Which IPs are forwarding requests to us -RPAFproxy_ips <%= Array(@proxy_ips).join(" ") %> -# Setting RPAFheader allows you to change the header name to parse from the -# default X-Forwarded-For to something of your choice. -RPAFheader <%= @header %> diff --git a/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb b/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb deleted file mode 100644 index d31c79fe..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb +++ /dev/null @@ -1,34 +0,0 @@ -# -# The following directives modify normal HTTP response behavior to -# handle known problems with browser implementations. -# -BrowserMatch "Mozilla/2" nokeepalive -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 -BrowserMatch "RealPlayer 4\.0" force-response-1.0 -BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 - -# -# The following directive disables redirects on non-GET requests for -# a directory that does not include the trailing slash. This fixes a -# problem with Microsoft WebFolders which does not appropriately handle -# redirects for folders with DAV methods. -# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. -# -BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully -BrowserMatch "MS FrontPage" redirect-carefully -BrowserMatch "^WebDrive" redirect-carefully -BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully -BrowserMatch "^gnome-vfs/1.0" redirect-carefully -BrowserMatch "^gvfs/1" redirect-carefully -BrowserMatch "^XML Spy" redirect-carefully -BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully -BrowserMatch " Konqueror/4" redirect-carefully - - - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - diff --git a/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb b/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb deleted file mode 100644 index 24274050..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb +++ /dev/null @@ -1,28 +0,0 @@ - - SSLRandomSeed startup builtin - SSLRandomSeed startup file:/dev/urandom 512 - SSLRandomSeed connect builtin - SSLRandomSeed connect file:/dev/urandom 512 - - AddType application/x-x509-ca-cert .crt - AddType application/x-pkcs7-crl .crl - - SSLPassPhraseDialog builtin - SSLSessionCache "shmcb:<%= @session_cache %>" - SSLSessionCacheTimeout 300 -<% if @ssl_compression -%> - SSLCompression On -<% end -%> - <% if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Mutex <%= @ssl_mutex %> - <% else -%> - SSLMutex <%= @ssl_mutex %> - <% end -%> - SSLCryptoDevice builtin - SSLHonorCipherOrder On - SSLCipherSuite <%= @ssl_cipher %> - SSLProtocol all -SSLv2 -<% if @ssl_options -%> - SSLOptions <%= @ssl_options.compact.join(' ') %> -<% end -%> - diff --git a/puphpet/puppet/modules/apache/templates/mod/status.conf.erb b/puphpet/puppet/modules/apache/templates/mod/status.conf.erb deleted file mode 100644 index 84f2e034..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/status.conf.erb +++ /dev/null @@ -1,16 +0,0 @@ - - SetHandler server-status - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - Allow from <%= Array(@allow_from).join(" ") %> - <%- end -%> - -ExtendedStatus <%= @extended_status %> - - - # Show Proxy LoadBalancer status in mod_status - ProxyStatus On - diff --git a/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb b/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb deleted file mode 100644 index 95fbf97c..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb +++ /dev/null @@ -1,19 +0,0 @@ - - AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml - suPHP_AddHandler application/x-httpd-suphp - - - suPHP_Engine on - - - # By default, disable suPHP for debian packaged web applications as files - # are owned by root and cannot be executed by suPHP because of min_uid. - - suPHP_Engine off - - -# # Use a specific php config file (a dir which contains a php.ini file) -# suPHP_ConfigPath /etc/php4/cgi/suphp/ -# # Tells mod_suphp NOT to handle requests with the type . -# suPHP_RemoveHandler - diff --git a/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb b/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb deleted file mode 100644 index add525d5..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb +++ /dev/null @@ -1,27 +0,0 @@ - -<% if @disable_root -%> - UserDir disabled root -<% end -%> - UserDir <%= @dir %> - - /*/<%= @dir %>"> - AllowOverride FileInfo AuthConfig Limit Indexes - Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Order allow,deny - Allow from all - <%- end -%> - - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Order allow,deny - Allow from all - <%- end -%> - - - diff --git a/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb b/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb deleted file mode 100644 index 597e05f8..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb +++ /dev/null @@ -1,10 +0,0 @@ - - ServerLimit <%= @serverlimit %> - StartServers <%= @startservers %> - MaxClients <%= @maxclients %> - MinSpareThreads <%= @minsparethreads %> - MaxSpareThreads <%= @maxsparethreads %> - ThreadsPerChild <%= @threadsperchild %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - ThreadLimit <%= @threadlimit %> - diff --git a/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb b/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb deleted file mode 100644 index 18752d2c..00000000 --- a/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb +++ /dev/null @@ -1,13 +0,0 @@ -# The WSGI Apache module configuration file is being -# managed by Puppet an changes will be overwritten. - - <%- if @wsgi_socket_prefix -%> - WSGISocketPrefix <%= @wsgi_socket_prefix %> - <%- end -%> - <%- if @wsgi_python_home -%> - WSGIPythonHome "<%= @wsgi_python_home %>" - <%- end -%> - <%- if @wsgi_python_path -%> - WSGIPythonPath "<%= @wsgi_python_path %>" - <%- end -%> - diff --git a/puphpet/puppet/modules/apache/templates/namevirtualhost.erb b/puphpet/puppet/modules/apache/templates/namevirtualhost.erb deleted file mode 100644 index cf767680..00000000 --- a/puphpet/puppet/modules/apache/templates/namevirtualhost.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%# NameVirtualHost should always be one of: - - * - - *: - - _default_: - - - - : --%> -NameVirtualHost <%= @addr_port %> diff --git a/puphpet/puppet/modules/apache/templates/ports_header.erb b/puphpet/puppet/modules/apache/templates/ports_header.erb deleted file mode 100644 index 4908db4a..00000000 --- a/puphpet/puppet/modules/apache/templates/ports_header.erb +++ /dev/null @@ -1,5 +0,0 @@ -# ************************************ -# Listen & NameVirtualHost resources in module puppetlabs-apache -# Managed by Puppet -# ************************************ - diff --git a/puphpet/puppet/modules/apache/templates/vhost.conf.erb b/puphpet/puppet/modules/apache/templates/vhost.conf.erb deleted file mode 100644 index 64024cfe..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost.conf.erb +++ /dev/null @@ -1,66 +0,0 @@ -# ************************************ -# Vhost template in module puppetlabs-apache -# Managed by Puppet -# ************************************ - -> - ServerName <%= @servername %> -<% if @serveradmin -%> - ServerAdmin <%= @serveradmin %> -<% end -%> - - ## Vhost docroot -<% if @virtual_docroot -%> - VirtualDocumentRoot "<%= @virtual_docroot %>" -<% else -%> - DocumentRoot "<%= @docroot %>" -<% end -%> -<%= scope.function_template(['apache/vhost/_aliases.erb']) -%> - -<%= scope.function_template(['apache/vhost/_itk.erb']) -%> - -<% if @fallbackresource -%> - FallbackResource <%= @fallbackresource %> -<% end -%> - - ## Directories, there should at least be a declaration for <%= @docroot %> -<%= scope.function_template(['apache/vhost/_directories.erb']) -%> - - ## Load additional static includes -<% Array(@additional_includes).each do |include| %> - Include "<%= include %>" -<% end %> - - ## Logging -<% if @error_log -%> - ErrorLog "<%= @error_log_destination %>" -<% end -%> -<% if @log_level -%> - LogLevel <%= @log_level %> -<% end -%> - ServerSignature Off -<% if @access_log and @_access_log_env_var -%> - CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> <%= @_access_log_env_var %> -<% elsif @access_log -%> - CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> -<% end -%> -<%= scope.function_template(['apache/vhost/_action.erb']) -%> -<%= scope.function_template(['apache/vhost/_block.erb']) -%> -<%= scope.function_template(['apache/vhost/_error_document.erb']) -%> -<%= scope.function_template(['apache/vhost/_proxy.erb']) -%> -<%= scope.function_template(['apache/vhost/_rack.erb']) -%> -<%= scope.function_template(['apache/vhost/_redirect.erb']) -%> -<%= scope.function_template(['apache/vhost/_rewrite.erb']) -%> -<%= scope.function_template(['apache/vhost/_scriptalias.erb']) -%> -<%= scope.function_template(['apache/vhost/_serveralias.erb']) -%> -<%= scope.function_template(['apache/vhost/_setenv.erb']) -%> -<%= scope.function_template(['apache/vhost/_ssl.erb']) -%> -<%= scope.function_template(['apache/vhost/_suphp.erb']) -%> -<%= scope.function_template(['apache/vhost/_php_admin.erb']) -%> -<%= scope.function_template(['apache/vhost/_header.erb']) -%> -<%= scope.function_template(['apache/vhost/_requestheader.erb']) -%> -<%= scope.function_template(['apache/vhost/_wsgi.erb']) -%> -<%= scope.function_template(['apache/vhost/_custom_fragment.erb']) -%> -<%= scope.function_template(['apache/vhost/_fastcgi.erb']) -%> -<%= scope.function_template(['apache/vhost/_suexec.erb']) -%> - diff --git a/puphpet/puppet/modules/apache/templates/vhost/_action.erb b/puphpet/puppet/modules/apache/templates/vhost/_action.erb deleted file mode 100644 index 8a022905..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_action.erb +++ /dev/null @@ -1,4 +0,0 @@ -<% if @action -%> - - Action <%= @action %> /cgi-bin virtual -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb b/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb deleted file mode 100644 index 5fdd76ba..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @aliases and ! @aliases.empty? -%> - ## Alias declarations for resources outside the DocumentRoot - <%- [@aliases].flatten.compact.each do |alias_statement| -%> - <%- if alias_statement["path"] != '' -%> - <%- if alias_statement["alias"] and alias_statement["alias"] != '' -%> - Alias <%= alias_statement["alias"] %> "<%= alias_statement["path"] %>" - <%- elsif alias_statement["aliasmatch"] and alias_statement["aliasmatch"] != '' -%> - AliasMatch <%= alias_statement["aliasmatch"] %> "<%= alias_statement["path"] %>" - <%- end -%> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_block.erb b/puphpet/puppet/modules/apache/templates/vhost/_block.erb deleted file mode 100644 index d0776829..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_block.erb +++ /dev/null @@ -1,14 +0,0 @@ -<% if @block and ! @block.empty? -%> - - ## Block access statements -<% if @block.include? 'scm' -%> - # Block access to SCM directories. - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Deny From All - <%- end -%> - -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb b/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb deleted file mode 100644 index 97396465..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if @custom_fragment -%> - - ## Custom fragment -<%= @custom_fragment %> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_directories.erb b/puphpet/puppet/modules/apache/templates/vhost/_directories.erb deleted file mode 100644 index ea2db8bd..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_directories.erb +++ /dev/null @@ -1,174 +0,0 @@ -<% if @_directories and ! @_directories.empty? -%> - <%- [@_directories].flatten.compact.each do |directory| -%> - <%- if directory['path'] and directory['path'] != '' -%> - <%- if directory['provider'] and directory['provider'].match('(directory|location|files)') -%> - <%- if /^(.*)match$/ =~ directory['provider'] -%> - <%- provider = $1.capitalize + 'Match' -%> - <%- else -%> - <%- provider = directory['provider'].capitalize -%> - <%- end -%> - <%- else -%> - <%- provider = 'Directory' -%> - <%- end -%> - <%- path = directory['path'] -%> - - <<%= provider %> "<%= path %>"> - <%- if directory['headers'] -%> - <%- Array(directory['headers']).each do |header| -%> - Header <%= header %> - <%- end -%> - <%- end -%> - <%- if directory['options'] -%> - Options <%= Array(directory['options']).join(' ') %> - <%- end -%> - <%- if provider == 'Directory' -%> - <%- if directory['index_options'] -%> - IndexOptions <%= Array(directory['index_options']).join(' ') %> - <%- end -%> - <%- if directory['index_order_default'] -%> - IndexOrderDefault <%= Array(directory['index_order_default']).join(' ') %> - <%- end -%> - <%- if directory['allow_override'] -%> - AllowOverride <%= Array(directory['allow_override']).join(' ') %> - <%- elsif provider == 'Directory' -%> - AllowOverride None - <%- end -%> - <%- end -%> - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - <%- if directory['require'] and directory['require'] != '' -%> - Require <%= Array(directory['require']).join(' ') %> - <%- else -%> - Require all granted - <%- end -%> - <%- else -%> - <%- if directory['order'] and directory['order'] != '' -%> - Order <%= Array(directory['order']).join(',') %> - <%- else -%> - Order allow,deny - <%- end -%> - <%- if directory['deny'] and directory['deny'] != '' -%> - Deny <%= directory['deny'] %> - <%- end -%> - <%- if directory['allow'] and ! [ false, 'false', '' ].include?(directory['allow']) -%> - <%- if directory['allow'].kind_of?(Array) -%> - <%- Array(directory['allow']).each do |access| -%> - Allow <%= access %> - <%- end -%> - <%- else -%> - Allow <%= directory['allow'] %> - <%- end -%> - <%- elsif [ 'from all', 'from All' ].include?(directory['deny']) -%> - <%- elsif ! directory['deny'] and [ false, 'false', '' ].include?(directory['allow']) -%> - Deny from all - <%- else -%> - Allow from all - <%- end -%> - <%- if directory['satisfy'] and directory['satisfy'] != '' -%> - Satisfy <%= directory['satisfy'] %> - <%- end -%> - <%- end -%> - <%- if directory['addhandlers'] and ! directory['addhandlers'].empty? -%> - <%- [directory['addhandlers']].flatten.compact.each do |addhandler| -%> - AddHandler <%= addhandler['handler'] %> <%= Array(addhandler['extensions']).join(' ') %> - <%- end -%> - <%- end -%> - <%- if directory['sethandler'] and directory['sethandler'] != '' -%> - SetHandler <%= directory['sethandler'] %> - <%- end -%> - <%- if directory['passenger_enabled'] and directory['passenger_enabled'] != '' -%> - PassengerEnabled <%= directory['passenger_enabled'] %> - <%- end -%> - <%- if directory['php_admin_flags'] and ! directory['php_admin_flags'].empty? -%> - <%- directory['php_admin_flags'].each do |flag,value| -%> - <%- value = if value =~ /true|yes|on|1/i then 'on' else 'off' end -%> - php_admin_flag <%= "#{flag} #{value}" %> - <%- end -%> - <%- end -%> - <%- if directory['php_admin_values'] and ! directory['php_admin_values'].empty? -%> - <%- directory['php_admin_values'].each do |key,value| -%> - php_admin_value <%= "#{key} #{value}" %> - <%- end -%> - <%- end -%> - <%- if directory['directoryindex'] and directory['directoryindex'] != '' -%> - DirectoryIndex <%= directory['directoryindex'] %> - <%- end -%> - <%- if directory['error_documents'] and ! directory['error_documents'].empty? -%> - <%- [directory['error_documents']].flatten.compact.each do |error_document| -%> - ErrorDocument <%= error_document['error_code'] %> <%= error_document['document'] %> - <%- end -%> - <%- end -%> - <%- if directory['auth_type'] -%> - AuthType <%= directory['auth_type'] %> - <%- end -%> - <%- if directory['auth_name'] -%> - AuthName "<%= directory['auth_name'] %>" - <%- end -%> - <%- if directory['auth_digest_algorithm'] -%> - AuthDigestAlgorithm <%= directory['auth_digest_algorithm'] %> - <%- end -%> - <%- if directory['auth_digest_domain'] -%> - AuthDigestDomain <%= Array(directory['auth_digest_domain']).join(' ') %> - <%- end -%> - <%- if directory['auth_digest_nonce_lifetime'] -%> - AuthDigestNonceLifetime <%= directory['auth_digest_nonce_lifetime'] %> - <%- end -%> - <%- if directory['auth_digest_provider'] -%> - AuthDigestProvider <%= directory['auth_digest_provider'] %> - <%- end -%> - <%- if directory['auth_digest_qop'] -%> - AuthDigestQop <%= directory['auth_digest_qop'] %> - <%- end -%> - <%- if directory['auth_digest_shmem_size'] -%> - AuthDigestShmemSize <%= directory['auth_digest_shmem_size'] %> - <%- end -%> - <%- if directory['auth_basic_authoritative'] -%> - AuthBasicAuthoritative <%= directory['auth_basic_authoritative'] %> - <%- end -%> - <%- if directory['auth_basic_fake'] -%> - AuthBasicFake <%= directory['auth_basic_fake'] %> - <%- end -%> - <%- if directory['auth_basic_provider'] -%> - AuthBasicProvider <%= directory['auth_basic_provider'] %> - <%- end -%> - <%- if directory['auth_user_file'] -%> - AuthUserFile <%= directory['auth_user_file'] %> - <%- end -%> - <%- if directory['auth_group_file'] -%> - AuthGroupFile <%= directory['auth_group_file'] %> - <%- end -%> - <%- if directory['auth_require'] -%> - Require <%= directory['auth_require'] %> - <%- end -%> - <%- if directory['fallbackresource'] -%> - FallbackResource <%= directory['fallbackresource'] %> - <%- end -%> - <%- if directory['expires_active'] -%> - ExpiresActive <%= directory['expires_active'] %> - <%- end -%> - <%- if directory['expires_default'] -%> - ExpiresDefault <%= directory['expires_default'] %> - <%- end -%> - <%- if directory['expires_by_type'] -%> - <%- Array(directory['expires_by_type']).each do |rule| -%> - ExpiresByType <%= rule %> - <%- end -%> - <%- end -%> - <%- if directory['force_type'] -%> - ForceType <%= directory['force_type'] %> - <%- end -%> - <%- if directory['ssl_options'] -%> - SSLOptions <%= Array(directory['ssl_options']).join(' ') %> - <%- end -%> - <%- if directory['suphp'] and @suphp_engine == 'on' -%> - suPHP_UserGroup <%= directory['suphp']['user'] %> <%= directory['suphp']['group'] %> - <%- end -%> - <%- if directory['fcgiwrapper'] -%> - FcgidWrapper <%= directory['fcgiwrapper']['command'] %> <%= directory['fcgiwrapper']['suffix'] %> <%= directory['fcgiwrapper']['virtual'] %> - <%- end -%> - <%- if directory['custom_fragment'] -%> - <%= directory['custom_fragment'] %> - <%- end -%> - > - <%- end -%> - <%- end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb b/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb deleted file mode 100644 index 654e72c6..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @error_documents and ! @error_documents.empty? -%> - <%- [@error_documents].flatten.compact.each do |error_document| -%> - <%- if error_document["error_code"] != '' and error_document["document"] != '' -%> - ErrorDocument <%= error_document["error_code"] %> <%= error_document["document"] %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb b/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb deleted file mode 100644 index 3a2baa55..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% if @fastcgi_server -%> - - FastCgiExternalServer <%= @fastcgi_server %> -socket <%= @fastcgi_socket %> -<% end -%> -<% if @fastcgi_dir -%> - - "> - Options +ExecCGI - AllowOverride All - SetHandler fastcgi-script - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted - <%- else -%> - Order allow,deny - Allow From All - <%- end -%> - AuthBasicAuthoritative Off - - - AllowEncodedSlashes On - ServerSignature Off -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_header.erb b/puphpet/puppet/modules/apache/templates/vhost/_header.erb deleted file mode 100644 index c0f68c82..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_header.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @headers and ! @headers.empty? -%> - - ## Header rules - ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header - <%- Array(@headers).each do |header_statement| -%> - <%- if header_statement != '' -%> - Header <%= header_statement %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_itk.erb b/puphpet/puppet/modules/apache/templates/vhost/_itk.erb deleted file mode 100644 index 2971c7a7..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_itk.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% if @itk and ! @itk.empty? -%> - ## ITK statement - - <%- if @itk["user"] and @itk["group"] -%> - AssignUserId <%= @itk["user"] %> <%= @itk["group"] %> - <%- end -%> - <%- if @itk["assignuseridexpr"] -%> - AssignUserIdExpr <%= @itk["assignuseridexpr"] %> - <%- end -%> - <%- if @itk["assigngroupidexpr"] -%> - AssignGroupIdExpr <%= @itk["assigngroupidexpr"] %> - <%- end -%> - <%- if @itk["maxclientvhost"] -%> - MaxClientsVHost <%= @itk["maxclientvhost"] %> - <%- end -%> - <%- if @itk["nice"] -%> - NiceValue <%= @itk["nice"] %> - <%- end -%> - <%- if @kernelversion >= '3.5.0' -%> - <%- if @itk["limituidrange"] -%> - LimitUIDRange <%= @itk["limituidrange"] %> - <%- end -%> - <%- if @itk["limitgidrange"] -%> - LimitGIDRange <%= @itk["limitgidrange"] %> - <%- end -%> - <%- end -%> - -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb b/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb deleted file mode 100644 index 59536cbc..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @php_admin_values and not @php_admin_values.empty? -%> -<% @php_admin_values.each do |key,value| -%> - php_admin_value <%= key %> <%= value %> -<% end -%> -<% end -%> -<% if @php_admin_flags and not @php_admin_flags.empty? -%> -<% @php_admin_flags.each do |key,flag| -%> -<%# normalize flag -%> -<% if flag =~ /true|yes|on|1/i then flag = 'on' else flag = 'off' end -%> - php_admin_flag <%= key %> <%= flag %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb b/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb deleted file mode 100644 index a1d2e529..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% if @proxy_dest or @proxy_pass -%> - - ## Proxy rules - ProxyRequests Off -<%- end -%> -<% if @proxy_preserve_host %> - ProxyPreserveHost On -<%- end -%> -<%- [@proxy_pass].flatten.compact.each do |proxy| -%> - ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> - > - ProxyPassReverse <%= proxy['url'] %> - -<% end %> -<% if @proxy_dest -%> -<%- Array(@no_proxy_uris).each do |uri| -%> - ProxyPass <%= uri %> ! -<% end %> - ProxyPass / <%= @proxy_dest %>/ - - ProxyPassReverse <%= @proxy_dest %>/ - -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_rack.erb b/puphpet/puppet/modules/apache/templates/vhost/_rack.erb deleted file mode 100644 index 4a5b5f1c..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_rack.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @rack_base_uris -%> - - ## Enable rack -<% Array(@rack_base_uris).each do |uri| -%> - RackBaseURI <%= uri %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb b/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb deleted file mode 100644 index e865bd9a..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% if @redirect_source and @redirect_dest -%> -<% @redirect_dest_a = Array(@redirect_dest) -%> -<% @redirect_source_a = Array(@redirect_source) -%> -<% @redirect_status_a = Array(@redirect_status) -%> - - ## Redirect rules -<% @redirect_source_a.each_with_index do |source, i| -%> -<% @redirect_dest_a[i] ||= @redirect_dest_a[0] -%> -<% @redirect_status_a[i] ||= @redirect_status_a[0] -%> - Redirect <%= "#{@redirect_status_a[i]} " %><%= source %> <%= @redirect_dest_a[i] %> -<% end -%> -<% end -%> - -<%- if @redirectmatch_status and @redirectmatch_regexp -%> -<% @redirectmatch_status_a = Array(@redirectmatch_status) -%> -<% @redirectmatch_regexp_a = Array(@redirectmatch_regexp) -%> - - ## RedirectMatch rules -<% @redirectmatch_status_a.each_with_index do |status, i| -%> -<% @redirectmatch_status_a[i] ||= @redirectmatch_status_a[0] -%> -<% @redirectmatch_regexp_a[i] ||= @redirectmatch_regexp_a[0] -%> - RedirectMatch <%= "#{@redirectmatch_status_a[i]} " %> <%= @redirectmatch_regexp_a[i] %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb b/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb deleted file mode 100644 index 9f175052..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @request_headers and ! @request_headers.empty? -%> - - ## Request header rules - ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader - <%- Array(@request_headers).each do |request_statement| -%> - <%- if request_statement != '' -%> - RequestHeader <%= request_statement %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb b/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb deleted file mode 100644 index af8b4500..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb +++ /dev/null @@ -1,43 +0,0 @@ -<%- if @rewrites -%> - ## Rewrite rules - RewriteEngine On - <%- if @rewrite_base -%> - RewriteBase <%= @rewrite_base %> - <%- end -%> - - <%- [@rewrites].flatten.compact.each do |rewrite_details| -%> - <%- if rewrite_details['comment'] -%> - #<%= rewrite_details['comment'] %> - <%- end -%> - <%- if rewrite_details['rewrite_base'] -%> - RewriteBase <%= rewrite_details['rewrite_base'] %> - <%- end -%> - <%- if rewrite_details['rewrite_cond'] -%> - <%- Array(rewrite_details['rewrite_cond']).each do |commands| -%> - <%- Array(commands).each do |command| -%> - RewriteCond <%= command %> - <%- end -%> - <%- end -%> - <%- end -%> - <%- Array(rewrite_details['rewrite_rule']).each do |commands| -%> - <%- Array(commands).each do |command| -%> - RewriteRule <%= command %> - <%- end -%> - - <%- end -%> - <%- end -%> -<%- end -%> -<%# reverse compatibility %> -<% if @rewrite_rule and !@rewrites -%> - ## Rewrite rules - RewriteEngine On -<% if @rewrite_base -%> - RewriteBase <%= @rewrite_base %> -<% end -%> -<% if @rewrite_cond -%> -<% Array(@rewrite_cond).each do |cond| -%> - RewriteCond <%= cond %> -<% end -%> -<% end -%> - RewriteRule <%= @rewrite_rule %> -<%- end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb b/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb deleted file mode 100644 index bb4f6b31..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb +++ /dev/null @@ -1,24 +0,0 @@ -<%- if @scriptaliases.is_a?(Array) -%> -<%- aliases = @scriptaliases -%> -<%- elsif @scriptaliases.is_a?(Hash) -%> -<%- aliases = [@scriptaliases] -%> -<%- else -%> -<%- # Nothing to do with any other data type -%> -<%- aliases = [] -%> -<%- end -%> -<%- if @scriptalias or !aliases.empty? -%> - ## Script alias directives -<%# Combine scriptalais and scriptaliases into a single data structure -%> -<%# for backward compatibility and ease of implementation -%> -<%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%> -<%- aliases.flatten.compact! -%> -<%- aliases.each do |salias| -%> - <%- if salias["path"] != '' -%> - <%- if salias["alias"] and salias["alias"] != '' -%> - ScriptAlias <%= salias['alias'] %> "<%= salias['path'] %>" - <%- elsif salias["aliasmatch"] and salias["aliasmatch"] != '' -%> - ScriptAliasMatch <%= salias['aliasmatch'] %> "<%= salias['path'] %>" - <%- end -%> - <%- end -%> -<%- end -%> -<%- end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb b/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb deleted file mode 100644 index 278b6ddc..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @serveraliases and ! @serveraliases.empty? -%> - - ## Server aliases -<% Array(@serveraliases).each do |serveralias| -%> - ServerAlias <%= serveralias %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb b/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb deleted file mode 100644 index d5f9ea84..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @setenv and ! @setenv.empty? -%> - - ## SetEnv/SetEnvIf for environment variables -<% Array(@setenv).each do |envvar| -%> - SetEnv <%= envvar %> -<% end -%> -<% end -%> -<% if @setenvif and ! @setenvif.empty? -%> -<% Array(@setenvif).each do |envifvar| -%> - SetEnvIf <%= envifvar %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb b/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb deleted file mode 100644 index 174f0a18..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb +++ /dev/null @@ -1,43 +0,0 @@ -<% if @ssl -%> - - ## SSL directives - SSLEngine on - SSLCertificateFile "<%= @ssl_cert %>" - SSLCertificateKeyFile "<%= @ssl_key %>" -<% if @ssl_chain -%> - SSLCertificateChainFile "<%= @ssl_chain %>" -<% end -%> -<% if @ssl_certs_dir -%> - SSLCACertificatePath "<%= @ssl_certs_dir %>" -<% end -%> -<% if @ssl_ca -%> - SSLCACertificateFile "<%= @ssl_ca %>" -<% end -%> -<% if @ssl_crl_path -%> - SSLCARevocationPath "<%= @ssl_crl_path %>" -<% end -%> -<% if @ssl_crl -%> - SSLCARevocationFile "<%= @ssl_crl %>" -<% end -%> -<% if @ssl_proxyengine -%> - SSLProxyEngine On -<% end -%> -<% if @ssl_protocol -%> - SSLProtocol <%= @ssl_protocol %> -<% end -%> -<% if @ssl_cipher -%> - SSLCipherSuite <%= @ssl_cipher %> -<% end -%> -<% if @ssl_honorcipherorder -%> - SSLHonorCipherOrder <%= @ssl_honorcipherorder %> -<% end -%> -<% if @ssl_verify_client -%> - SSLVerifyClient <%= @ssl_verify_client %> -<% end -%> -<% if @ssl_verify_depth -%> - SSLVerifyDepth <%= @ssl_verify_depth %> -<% end -%> -<% if @ssl_options -%> - SSLOptions <%= Array(@ssl_options).join(' ') %> -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb b/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb deleted file mode 100644 index 8a7ae0f1..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb +++ /dev/null @@ -1,4 +0,0 @@ -<% if @suexec_user_group -%> - - SuexecUserGroup <%= @suexec_user_group %> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb b/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb deleted file mode 100644 index 93895818..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% if @suphp_engine == 'on' -%> -<% if @suphp_addhandler -%> - suPHP_AddHandler <%= @suphp_addhandler %> -<% end -%> -<% if @suphp_engine -%> - suPHP_Engine <%= @suphp_engine %> -<% end -%> -<% if @suphp_configpath -%> - suPHP_ConfigPath "<%= @suphp_configpath %>" -<% end -%> -<% end -%> diff --git a/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb b/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb deleted file mode 100644 index 473b223a..00000000 --- a/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% if @wsgi_application_group -%> - WSGIApplicationGroup <%= @wsgi_application_group %> -<% end -%> -<% if @wsgi_daemon_process and @wsgi_daemon_process_options -%> - WSGIDaemonProcess <%= @wsgi_daemon_process %> <%= @wsgi_daemon_process_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> -<% elsif @wsgi_daemon_process and !@wsgi_daemon_process_options -%> - WSGIDaemonProcess <%= @wsgi_daemon_process %> -<% end -%> -<% if @wsgi_import_script and @wsgi_import_script_options -%> - WSGIImportScript <%= @wsgi_import_script %> <%= @wsgi_import_script_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> -<% end -%> -<% if @wsgi_process_group -%> - WSGIProcessGroup <%= @wsgi_process_group %> -<% end -%> -<% if @wsgi_script_aliases and ! @wsgi_script_aliases.empty? -%> - <%- @wsgi_script_aliases.each do |a, p| -%> - <%- if a != '' and p != ''-%> - WSGIScriptAlias <%= a %> "<%= p %>" - <%- end -%> - <%- end -%> -<% end -%> -<% if @wsgi_pass_authorization -%> - WSGIPassAuthorization <%= @wsgi_pass_authorization %> -<% end -%> diff --git a/puphpet/puppet/modules/apache/tests/apache.pp b/puphpet/puppet/modules/apache/tests/apache.pp deleted file mode 100644 index 0d454356..00000000 --- a/puphpet/puppet/modules/apache/tests/apache.pp +++ /dev/null @@ -1,6 +0,0 @@ -include apache -include apache::mod::php -include apache::mod::cgi -include apache::mod::userdir -include apache::mod::disk_cache -include apache::mod::proxy_http diff --git a/puphpet/puppet/modules/apache/tests/dev.pp b/puphpet/puppet/modules/apache/tests/dev.pp deleted file mode 100644 index 805ad7e3..00000000 --- a/puphpet/puppet/modules/apache/tests/dev.pp +++ /dev/null @@ -1 +0,0 @@ -include apache::dev diff --git a/puphpet/puppet/modules/apache/tests/init.pp b/puphpet/puppet/modules/apache/tests/init.pp deleted file mode 100644 index b3f9f13a..00000000 --- a/puphpet/puppet/modules/apache/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include apache diff --git a/puphpet/puppet/modules/apache/tests/mod_load_params.pp b/puphpet/puppet/modules/apache/tests/mod_load_params.pp deleted file mode 100644 index 0e84c5ef..00000000 --- a/puphpet/puppet/modules/apache/tests/mod_load_params.pp +++ /dev/null @@ -1,11 +0,0 @@ -# Tests the path and identifier parameters for the apache::mod class - -# Base class for clarity: -class { 'apache': } - - -# Exaple parameter usage: -apache::mod { 'testmod': - path => '/usr/some/path/mod_testmod.so', - id => 'testmod_custom_name', -} diff --git a/puphpet/puppet/modules/apache/tests/mods.pp b/puphpet/puppet/modules/apache/tests/mods.pp deleted file mode 100644 index 59362bd9..00000000 --- a/puphpet/puppet/modules/apache/tests/mods.pp +++ /dev/null @@ -1,9 +0,0 @@ -## Default mods - -# 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': - default_mods => true, -} - diff --git a/puphpet/puppet/modules/apache/tests/mods_custom.pp b/puphpet/puppet/modules/apache/tests/mods_custom.pp deleted file mode 100644 index 0ae699c7..00000000 --- a/puphpet/puppet/modules/apache/tests/mods_custom.pp +++ /dev/null @@ -1,16 +0,0 @@ -## custom mods - -# 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': - default_mods => [ - 'info', - 'alias', - 'mime', - 'env', - 'setenv', - 'expires', - ], -} - diff --git a/puphpet/puppet/modules/apache/tests/php.pp b/puphpet/puppet/modules/apache/tests/php.pp deleted file mode 100644 index 1d926bfb..00000000 --- a/puphpet/puppet/modules/apache/tests/php.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apache': - mpm_module => 'prefork', -} -include apache::mod::php diff --git a/puphpet/puppet/modules/apache/tests/vhost.pp b/puphpet/puppet/modules/apache/tests/vhost.pp deleted file mode 100644 index a6c61360..00000000 --- a/puphpet/puppet/modules/apache/tests/vhost.pp +++ /dev/null @@ -1,238 +0,0 @@ -## Default vhosts, and custom vhosts -# NB: Please see the other vhost_*.pp example files for further -# examples. - -# 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': } - -# Most basic vhost -apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', -} - -# Vhost with different docroot owner/group/mode -apache::vhost { 'second.example.com': - port => '80', - docroot => '/var/www/second', - docroot_owner => 'third', - docroot_group => 'third', - docroot_mode => '0770', -} - -# Vhost with serveradmin -apache::vhost { 'third.example.com': - port => '80', - docroot => '/var/www/third', - serveradmin => 'admin@example.com', -} - -# Vhost with ssl (uses default ssl certs) -apache::vhost { 'ssl.example.com': - port => '443', - docroot => '/var/www/ssl', - ssl => true, -} - -# Vhost with ssl and specific ssl certs -apache::vhost { 'fourth.example.com': - port => '443', - docroot => '/var/www/fourth', - ssl => true, - ssl_cert => '/etc/ssl/fourth.example.com.cert', - ssl_key => '/etc/ssl/fourth.example.com.key', -} - -# Vhost with english title and servername parameter -apache::vhost { 'The fifth vhost': - servername => 'fifth.example.com', - port => '80', - docroot => '/var/www/fifth', -} - -# Vhost with server aliases -apache::vhost { 'sixth.example.com': - serveraliases => [ - 'sixth.example.org', - 'sixth.example.net', - ], - port => '80', - docroot => '/var/www/fifth', -} - -# Vhost with alternate options -apache::vhost { 'seventh.example.com': - port => '80', - docroot => '/var/www/seventh', - options => [ - 'Indexes', - 'MultiViews', - ], -} - -# Vhost with AllowOverride for .htaccess -apache::vhost { 'eighth.example.com': - port => '80', - docroot => '/var/www/eighth', - override => 'All', -} - -# Vhost with access and error logs disabled -apache::vhost { 'ninth.example.com': - port => '80', - docroot => '/var/www/ninth', - access_log => false, - error_log => false, -} - -# Vhost with custom access and error logs and logroot -apache::vhost { 'tenth.example.com': - port => '80', - docroot => '/var/www/tenth', - access_log_file => 'tenth_vhost.log', - error_log_file => 'tenth_vhost_error.log', - logroot => '/var/log', -} - -# Vhost with a cgi-bin -apache::vhost { 'eleventh.example.com': - port => '80', - docroot => '/var/www/eleventh', - scriptalias => '/usr/lib/cgi-bin', -} - -# Vhost with a proxypass configuration -apache::vhost { 'twelfth.example.com': - port => '80', - docroot => '/var/www/twelfth', - proxy_dest => 'http://internal.example.com:8080/twelfth', - no_proxy_uris => ['/login','/logout'], -} - -# Vhost to redirect /login and /logout -apache::vhost { 'thirteenth.example.com': - port => '80', - docroot => '/var/www/thirteenth', - redirect_source => [ - '/login', - '/logout', - ], - redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], -} - -# Vhost to permamently redirect -apache::vhost { 'fourteenth.example.com': - port => '80', - docroot => '/var/www/fourteenth', - redirect_source => '/blog', - redirect_dest => 'http://blog.example.com', - redirect_status => 'permanent', -} - -# Vhost with a rack configuration -apache::vhost { 'fifteenth.example.com': - port => '80', - docroot => '/var/www/fifteenth', - rack_base_uris => ['/rackapp1', '/rackapp2'], -} - -# Vhost to redirect non-ssl to ssl -apache::vhost { 'sixteenth.example.com non-ssl': - servername => 'sixteenth.example.com', - port => '80', - docroot => '/var/www/sixteenth', - rewrites => [ - { - comment => 'redirect non-SSL traffic to SSL site', - rewrite_cond => ['%{HTTPS} off'], - rewrite_rule => ['(.*) https://%{HTTPS_HOST}%{REQUEST_URI}'], - } - ] -} -apache::vhost { 'sixteenth.example.com ssl': - servername => 'sixteenth.example.com', - port => '443', - docroot => '/var/www/sixteenth', - ssl => true, -} - -# Vhost to redirect non-ssl to ssl using old rewrite method -apache::vhost { 'sixteenth.example.com non-ssl old rewrite': - servername => 'sixteenth.example.com', - port => '80', - docroot => '/var/www/sixteenth', - rewrite_cond => '%{HTTPS} off', - rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', -} -apache::vhost { 'sixteenth.example.com ssl old rewrite': - servername => 'sixteenth.example.com', - port => '443', - docroot => '/var/www/sixteenth', - ssl => true, -} - -# Vhost to block repository files -apache::vhost { 'seventeenth.example.com': - port => '80', - docroot => '/var/www/seventeenth', - block => 'scm', -} - -# Vhost with special environment variables -apache::vhost { 'eighteenth.example.com': - port => '80', - docroot => '/var/www/eighteenth', - setenv => ['SPECIAL_PATH /foo/bin','KILROY was_here'], -} - -apache::vhost { 'nineteenth.example.com': - port => '80', - docroot => '/var/www/nineteenth', - setenvif => 'Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1', -} - -# Vhost with additional include files -apache::vhost { 'twentyieth.example.com': - port => '80', - docroot => '/var/www/twelfth', - additional_includes => ['/tmp/proxy_group_a','/tmp/proxy_group_b'], -} - -# Vhost with alias for subdomain mapped to same named directory -# http://example.com.loc => /var/www/example.com -apache::vhost { 'subdomain.loc': - vhost_name => '*', - port => '80', - virtual_docroot => '/var/www/%-2+', - docroot => '/var/www', - serveraliases => ['*.loc',], -} - -# Vhost with SSLProtocol,SSLCipherSuite, SSLHonorCipherOrder -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 +SSLv3 +TLSv1', - ssl_cipher => 'ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM', - ssl_honorcipherorder => 'On', - add_listen => false, -} - -# Vhost with access log environment variables writing control -apache::vhost { 'twentyfirst.example.com': - port => '80', - docroot => '/var/www/twentyfirst', - access_log_env_var => 'admin', -} - diff --git a/puphpet/puppet/modules/apache/tests/vhost_directories.pp b/puphpet/puppet/modules/apache/tests/vhost_directories.pp deleted file mode 100644 index b8953ee3..00000000 --- a/puphpet/puppet/modules/apache/tests/vhost_directories.pp +++ /dev/null @@ -1,44 +0,0 @@ -# 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': } - -# Example from README adapted. -apache::vhost { 'readme.example.net': - docroot => '/var/www/readme', - directories => [ - { - 'path' => '/var/www/readme', - 'ServerTokens' => 'prod' , - }, - { - 'path' => '/usr/share/empty', - 'allow' => 'from all', - }, - ], -} - -# location test -apache::vhost { 'location.example.net': - docroot => '/var/www/location', - directories => [ - { - 'path' => '/location', - 'provider' => 'location', - 'ServerTokens' => 'prod' - }, - ], -} - -# files test, curedly disable access to accidental backup files. -apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => [ - { - 'path' => '(\.swp|\.bak|~)$', - 'provider' => 'filesmatch', - 'deny' => 'from all' - }, - ], -} - diff --git a/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp b/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp deleted file mode 100644 index dc0fa4f3..00000000 --- a/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp +++ /dev/null @@ -1,25 +0,0 @@ -## IP-based vhosts on any listen port -# IP-based vhosts respond to requests on specific IP addresses. - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -class { 'apache': - default_vhost => false, -} - -# Listen on port 80 and 81; required because the following vhosts -# are not declared with a port parameter. -apache::listen { '80': } -apache::listen { '81': } - -# IP-based vhosts -apache::vhost { 'first.example.com': - ip => '10.0.0.10', - docroot => '/var/www/first', - ip_based => true, -} -apache::vhost { 'second.example.com': - ip => '10.0.0.11', - docroot => '/var/www/second', - ip_based => true, -} diff --git a/puphpet/puppet/modules/apache/tests/vhost_ssl.pp b/puphpet/puppet/modules/apache/tests/vhost_ssl.pp deleted file mode 100644 index 8e7a2b27..00000000 --- a/puphpet/puppet/modules/apache/tests/vhost_ssl.pp +++ /dev/null @@ -1,23 +0,0 @@ -## SSL-enabled vhosts -# SSL-enabled vhosts respond only to HTTPS queries. - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -class { 'apache': - default_vhost => false, -} - -# Non-ssl vhost -apache::vhost { 'first.example.com non-ssl': - servername => 'first.example.com', - port => '80', - docroot => '/var/www/first', -} - -# SSL vhost at the same domain -apache::vhost { 'first.example.com ssl': - servername => 'first.example.com', - port => '443', - docroot => '/var/www/first', - ssl => true, -} diff --git a/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp b/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp deleted file mode 100644 index e7d6cc03..00000000 --- a/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp +++ /dev/null @@ -1,53 +0,0 @@ -## Declare ip-based and name-based vhosts -# Mixing Name-based vhost with IP-specific vhosts requires `add_listen => -# 'false'` on the non-IP vhosts - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -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', - ip => '10.0.0.10', - port => '80', - ip_based => true, - docroot => '/var/www/first', -} -apache::vhost { 'The first IP-based vhost, ssl': - servername => 'first.example.com', - ip => '10.0.0.10', - port => '443', - ip_based => true, - docroot => '/var/www/first-ssl', - ssl => true, -} - -# Two name-based vhost listening on 10.0.0.20 -apache::vhost { 'second.example.com': - ip => '10.0.0.20', - port => '80', - docroot => '/var/www/second', -} -apache::vhost { 'third.example.com': - ip => '10.0.0.20', - port => '80', - docroot => '/var/www/third', -} - -# Two name-based vhosts without IPs specified, so that they will answer on either 10.0.0.10 or 10.0.0.20 . It is requried to declare -# `add_listen => 'false'` to disable declaring "Listen 80" which will conflict -# with the IP-based preceeding vhosts. -apache::vhost { 'fourth.example.com': - port => '80', - docroot => '/var/www/fourth', - add_listen => false, -} -apache::vhost { 'fifth.example.com': - port => '80', - docroot => '/var/www/fifth', - add_listen => false, -} diff --git a/puphpet/puppet/modules/apt/.fixtures.yml b/puphpet/puppet/modules/apt/.fixtures.yml deleted file mode 100644 index 2bb941de..00000000 --- a/puphpet/puppet/modules/apt/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - "stdlib": - "repo": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - "ref": "v2.2.1" - symlinks: - "apt": "#{source_dir}" diff --git a/puphpet/puppet/modules/apt/.puppet-lint.rc b/puphpet/puppet/modules/apt/.puppet-lint.rc deleted file mode 100644 index f4abb47d..00000000 --- a/puphpet/puppet/modules/apt/.puppet-lint.rc +++ /dev/null @@ -1 +0,0 @@ ---no-single_quote_string_with_variables-check diff --git a/puphpet/puppet/modules/apt/.travis.yml b/puphpet/puppet/modules/apt/.travis.yml deleted file mode 100644 index 582efdf7..00000000 --- a/puphpet/puppet/modules/apt/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0.0" - - PUPPET_GEM_VERSION="~> 3.1.0" - - PUPPET_GEM_VERSION="~> 3.2.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: |- - ipB/CV1rVSTXU9ZDuzrFOlzJrRmJob36tKns2xszuH4r9s5P9qivNAngRGdV - msb69xvOlzQykM0WRF+4kJ6TZ7AbMiDI+VZ8GDtsRaU5/q3BpsvFe8aato+6 - QeyFtBG62OsosTEhGws4mqiFsPDu3dHlakuJc9zevlTuhNwbKSs= -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 3.2.0" -notifications: - email: false diff --git a/puphpet/puppet/modules/apt/CHANGELOG.md b/puphpet/puppet/modules/apt/CHANGELOG.md deleted file mode 100644 index 10503c91..00000000 --- a/puphpet/puppet/modules/apt/CHANGELOG.md +++ /dev/null @@ -1,222 +0,0 @@ -##2014-03-04 - Supported Release 1.4.2 -###Summary - -This is a supported release. This release tidies up 1.4.1 and re-enables -support for Ubuntu 10.04 - -####Features - -####Bugfixes -- Fix apt:ppa to include the -y Ubuntu 10.04 requires. -- Documentation changes. -- Test fixups. - -####Known Bugs - -* No known issues. - - - -##2014-02-13 1.4.1 -###Summary -This is a bugfix release. - -####Bugfixes -- Fix apt::force unable to upgrade packages from releases other than its original -- Removed a few refeneces to aptitude instead of apt-get for portability -- Removed call to getparam() due to stdlib dependency -- Correct apt::source template when architecture is provided -- Retry package installs if apt is locked -- Use root to exec in apt::ppa -- Updated tests and converted acceptance tests to beaker - -##2013-10-08 - Release 1.4.0 - -###Summary - -Minor bugfix and allow the timeout to be adjusted. - -####Features -- Add an `updates_timeout` to apt::params - -####Bugfixes -- Ensure apt::ppa can read a ppa removed by hand. - - -##2013-10-08 - Release 1.3.0 -###Summary - -This major feature in this release is the new apt::unattended_upgrades class, -allowing you to handle Ubuntu's unattended feature. This allows you to select -specific packages to automatically upgrade without any further user -involvement. - -In addition we extend our Wheezy support, add proxy support to apt:ppa and do -various cleanups and tweaks. - -####Features -- Add apt::unattended_upgrades support for Ubuntu. -- Add wheezy backports support. -- Use the geoDNS http.debian.net instead of the main debian ftp server. -- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command. -- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt). - -####Bugfixes -- Fix regsubst() calls to quote single letters (for future parser). -- Fix lint warnings and other misc cleanup. - - -##2013-07-03 - Release 1.2.0 - -####Features -- Add geppetto `.project` natures -- Add GH auto-release -- Add `apt::key::key_options` parameter -- Add complex pin support using distribution properties for `apt::pin` via new properties: - - `apt::pin::codename` - - `apt::pin::release_version` - - `apt::pin::component` - - `apt::pin::originator` - - `apt::pin::label` -- Add source architecture support to `apt::source::architecture` - -####Bugfixes -- Use apt-get instead of aptitude in apt::force -- Update default backports location -- Add dependency for required packages before apt-get update - - -##2013-06-02 - Release 1.1.1 -###Summary - -This is a bug fix release that resolves a number of issues: - -* By changing template variable usage, we remove the deprecation warnings - for Puppet 3.2.x -* Fixed proxy file removal, when proxy absent - -Some documentation, style and whitespaces changes were also merged. This -release also introduced proper rspec-puppet unit testing on Travis-CI to help -reduce regression. - -Thanks to all the community contributors below that made this patch possible. - -#### Detail Changes - -* fix minor comment type (Chris Rutter) -* whitespace fixes (Michael Moll) -* Update travis config file (William Van Hevelingen) -* Build all branches on travis (William Van Hevelingen) -* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen) -* Updated content to conform to README best practices template (Lauren Rother) -* Fix apt::release example in readme (Brian Galey) -* add @ to variables in template (Peter Hoeg) -* Remove deprecation warnings for pin.pref.erb as well (Ken Barber) -* Update travis.yml to latest versions of puppet (Ken Barber) -* Fix proxy file removal (Scott Barber) -* Add spec test for removing proxy configuration (Dean Reilly) -* Fix apt::key listing longer than 8 chars (Benjamin Knofe) - - - - -## Release 1.1.0 -###Summary - -This release includes Ubuntu 12.10 (Quantal) support for PPAs. - ---- - -##2012-05-25 - Puppet Labs - Release 0.0.4 -###Summary - - * Fix ppa list filename when there is a period in the PPA name - * Add .pref extension to apt preferences files - * Allow preferences to be purged - * Extend pin support - - -##2012-05-04 - Puppet Labs - Release 0.0.3 -###Summary - - * only invoke apt-get update once - * only install python-software-properties if a ppa is added - * support 'ensure => absent' for all defined types - * add apt::conf - * add apt::backports - * fixed Modulefile for module tool dependency resolution - * configure proxy before doing apt-get update - * use apt-get update instead of aptitude for apt::ppa - * add support to pin release - - -##2012-03-26 - Puppet Labs - Release 0.0.2 -###Summary - -* 41cedbb (#13261) Add real examples to smoke tests. -* d159a78 (#13261) Add key.pp smoke test -* 7116c7a (#13261) Replace foo source with puppetlabs source -* 1ead0bf Ignore pkg directory. -* 9c13872 (#13289) Fix some more style violations -* 0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path -* a758247 (#13289) Clean up style violations and fix corresponding tests -* 99c3fd3 (#13289) Add puppet lint tests to Rakefile -* 5148cbf (#13125) Apt keys should be case insensitive -* b9607a4 Convert apt::key to use anchors - - -##2012-03-07 - Puppet Labs - Release 0.0.1 -###Summary - -* d4fec56 Modify apt::source release parameter test -* 1132a07 (#12917) Add contributors to README -* 8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it -* 7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input -* be2cc3e (#12522) Adjust spec test for splitting purge -* 7dc60ae (#12522) Split purge option to spare sources.list -* 9059c4e Fix source specs to test all key permutations -* 8acb202 Add test for python-software-properties package -* a4af11f Check if python-software-properties is defined before attempting to define it. -* 1dcbf3d Add tests for required_packages change -* f3735d2 Allow duplicate $required_packages -* 74c8371 (#12430) Add tests for changes to apt module -* 97ebb2d Test two sources with the same key -* 1160bcd (#12526) Add ability to reverse apt { disable_keys => true } -* 2842d73 Add Modulefile to puppet-apt -* c657742 Allow the use of the same key in multiple sources -* 8c27963 (#12522) Adding purge option to apt class -* 997c9fd (#12529) Add unit test for apt proxy settings -* 50f3cca (#12529) Add parameter to support setting a proxy for apt -* d522877 (#12094) Replace chained .with_* with a hash -* 8cf1bd0 (#12094) Remove deprecated spec.opts file -* 2d688f4 (#12094) Add rspec-puppet tests for apt -* 0fb5f78 (#12094) Replace name with path in file resources -* f759bc0 (#11953) Apt::force passes $version to aptitude -* f71db53 (#11413) Add spec test for apt::force to verify changes to unless -* 2f5d317 (#11413) Update dpkg query used by apt::force -* cf6caa1 (#10451) Add test coverage to apt::ppa -* 0dd697d include_src parameter in example; Whitespace cleanup -* b662eb8 fix typos in "repositories" -* 1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added -* 864302a Set the pin priority before adding the source (Fix #10449) -* 1de4e0a Refactored as per mlitteken -* 1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run! -* 52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep -* 5c05fa0 added builddep command. -* a11af50 added the ability to specify the content of a key -* c42db0f Fixes ppa test. -* 77d2b0d reformatted whitespace to match recommended style of 2 space indentation. -* 27ebdfc ignore swap files. -* 377d58a added smoke tests for module. -* 18f614b reformatted apt::ppa according to recommended style. -* d8a1e4e Created a params class to hold global data. -* 636ae85 Added two params for apt class -* 148fc73 Update LICENSE. -* ed2d19e Support ability to add more than one PPA -* 420d537 Add call to apt-update after add-apt-repository in apt::ppa -* 945be77 Add package definition for python-software-properties -* 71fc425 Abs paths for all commands -* 9d51cd1 Adding LICENSE -* 71796e3 Heading fix in README -* 87777d8 Typo in README -* f848bac First commit diff --git a/puphpet/puppet/modules/apt/Gemfile b/puphpet/puppet/modules/apt/Gemfile deleted file mode 100644 index 1e359d07..00000000 --- a/puphpet/puppet/modules/apt/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' - -group :development, :test do - gem 'rake', :require => false - gem 'pry', :require => false - gem 'rspec-puppet', :require => false - gem 'puppet-lint', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'serverspec', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end diff --git a/puphpet/puppet/modules/apt/LICENSE b/puphpet/puppet/modules/apt/LICENSE deleted file mode 100644 index 30ce036d..00000000 --- a/puphpet/puppet/modules/apt/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2011 Evolving Web Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -Copyright 2014 Puppet Labs - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/puphpet/puppet/modules/apt/Modulefile b/puphpet/puppet/modules/apt/Modulefile deleted file mode 100644 index 40a87f4e..00000000 --- a/puphpet/puppet/modules/apt/Modulefile +++ /dev/null @@ -1,14 +0,0 @@ -name 'puppetlabs-apt' -version '1.4.2' -source 'https://github.com/puppetlabs/puppetlabs-apt' -author 'Evolving Web / Puppet Labs' -license 'Apache License 2.0' -summary 'Puppet Labs Apt Module' -description 'APT Module for Puppet' -project_page 'https://github.com/puppetlabs/puppetlabs-apt' - -## Add dependencies, if any: -#dependency 'puppetlabs/stdlib', '2.x' -# The dependency should be written as above but librarian-puppet -# does not support the expression as the PMT does. -dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/puphpet/puppet/modules/apt/README.md b/puphpet/puppet/modules/apt/README.md deleted file mode 100644 index ec8b4c5e..00000000 --- a/puphpet/puppet/modules/apt/README.md +++ /dev/null @@ -1,236 +0,0 @@ -apt -=== - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apt) - -## Description - -Provides helpful definitions for dealing with Apt. - -======= - -Overview --------- - -The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. - -Module Description ------------------- - -APT automates obtaining and installing software packages on \*nix systems. - -Setup ------ - -**What APT affects:** - -* package/service/configuration files for APT -* your system's `sources.list` file and `sources.list.d` directory - * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'. -* system repositories -* authentication keys -* wget (optional) - -### Beginning with APT - -To begin using the APT module with default parameters, declare the class - - include apt - -Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e - -Usage ------ - -Using the APT module consists predominantly in declaring classes that provide desired functionality and features. - -### apt - -`apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests. - -The parameters for `apt` are not required in general and are predominantly for development environment use-cases. - - class { 'apt': - always_apt_update => false, - disable_keys => undef, - proxy_host => false, - proxy_port => '8080', - purge_sources_list => false, - purge_sources_list_d => false, - purge_preferences_d => false, - update_timeout => undef - } - -Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. - -If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet. - -### apt::builddep - -Installs the build depends of a specified package. - - apt::builddep { 'glusterfs-server': } - -### apt::force - -Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. - - apt::force { 'glusterfs-server': - release => 'unstable', - version => '3.0.3', - require => Apt::Source['debian_unstable'], - } - -### apt::key - -Adds a key to the list of keys used by APT to authenticate packages. - - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - -Note that use of `key_source` requires wget to be installed and working. - -### apt::pin - -Adds an apt pin for a certain release. - - apt::pin { 'karmic': priority => 700 } - apt::pin { 'karmic-updates': priority => 700 } - apt::pin { 'karmic-security': priority => 700 } - -Note you can also specifying more complex pins using distribution properties. - - apt::pin { 'stable': - priority => -10, - originator => 'Debian', - release_version => '3.0', - component => 'main', - label => 'Debian' - } - -### apt::ppa - -Adds a ppa repository using `add-apt-repository`. - - apt::ppa { 'ppa:drizzle-developers/ppa': } - -### apt::release - -Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. - - class { 'apt::release': - release_id => 'precise', - } - -### apt::source - -Adds an apt source to `/etc/apt/sources.list.d/`. - - apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - include_src => true - } - -If you would like to configure your system so the source is the Puppet Labs APT repository - - apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - -### Testing - -The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources. - -#### Example Test - -This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key - - apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - -This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type. - -Check your smoke test for syntax errors - - $ puppet parser validate tests/puppetlabs-apt.pp - -If you receive no output from that command, it means nothing is wrong. Then apply the code - - $ puppet apply --verbose tests/puppetlabs-apt.pp - notice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e' - info: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update] - notice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events> - -The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed. - -Implementation --------------- - -### apt::backports - -Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to `$lsbdistcodename`. Setting this manually can cause undefined behavior (read: universe exploding). - -Limitations ------------ - -This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. - -Development ------------- - -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -License -------- - -The original code for this module comes from Evolving Web and was licensed under the MIT license. Code added since the fork of this module is licensed under the Apache 2.0 License like the rest of the Puppet Labs products. - -The LICENSE contains both licenses. - -Contributors ------------- - -A lot of great people have contributed to this module. A somewhat current list follows: - -* Ben Godfrey -* Branan Purvine-Riley -* Christian G. Warden -* Dan Bode -* Garrett Honeycutt -* Jeff Wallace -* Ken Barber -* Matthaus Litteken -* Matthias Pigulla -* Monty Taylor -* Peter Drake -* Reid Vandewiele -* Robert Navarro -* Ryan Coleman -* Scott McLeod -* Spencer Krum -* William Van Hevelingen -* Zach Leslie diff --git a/puphpet/puppet/modules/apt/Rakefile b/puphpet/puppet/modules/apt/Rakefile deleted file mode 100644 index 6d067dc5..00000000 --- a/puphpet/puppet/modules/apt/Rakefile +++ /dev/null @@ -1,4 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send('disable_single_quote_string_with_variables') diff --git a/puphpet/puppet/modules/apt/manifests/backports.pp b/puphpet/puppet/modules/apt/manifests/backports.pp deleted file mode 100644 index 9cfa1c01..00000000 --- a/puphpet/puppet/modules/apt/manifests/backports.pp +++ /dev/null @@ -1,48 +0,0 @@ -# This adds the necessary components to get backports for ubuntu and debian -# -# == Parameters -# -# [*release*] -# The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this -# manually can cause undefined behavior. (Read: universe exploding) -# -# == Examples -# -# include apt::backports -# -# class { 'apt::backports': -# release => 'natty', -# } -# -# == Authors -# -# Ben Hughes, I think. At least blame him if this goes wrong. -# I just added puppet doc. -# -# == Copyright -# -# Copyright 2011 Puppet Labs Inc, unless otherwise noted. -class apt::backports( - $release = $::lsbdistcodename, - $location = $apt::params::backports_location -) inherits apt::params { - - $release_real = downcase($release) - $key = $::lsbdistid ? { - 'debian' => '46925553', - 'ubuntu' => '437D05B5', - } - $repos = $::lsbdistid ? { - 'debian' => 'main contrib non-free', - 'ubuntu' => 'main universe multiverse restricted', - } - - apt::source { 'backports': - location => $location, - release => "${release_real}-backports", - repos => $repos, - key => $key, - key_server => 'pgp.mit.edu', - pin => '200', - } -} diff --git a/puphpet/puppet/modules/apt/manifests/builddep.pp b/puphpet/puppet/modules/apt/manifests/builddep.pp deleted file mode 100644 index 3294f713..00000000 --- a/puphpet/puppet/modules/apt/manifests/builddep.pp +++ /dev/null @@ -1,16 +0,0 @@ -# builddep.pp - -define apt::builddep() { - include apt::update - - exec { "apt-builddep-${name}": - command => "/usr/bin/apt-get -y --force-yes build-dep ${name}", - logoutput => 'on_failure', - notify => Exec['apt_update'], - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::builddep::${name}": - require => Class['apt::update'], - } -} diff --git a/puphpet/puppet/modules/apt/manifests/conf.pp b/puphpet/puppet/modules/apt/manifests/conf.pp deleted file mode 100644 index 3c4cb197..00000000 --- a/puphpet/puppet/modules/apt/manifests/conf.pp +++ /dev/null @@ -1,18 +0,0 @@ -define apt::conf ( - $content, - $ensure = present, - $priority = '50' -) { - - include apt::params - - $apt_conf_d = $apt::params::apt_conf_d - - file { "${apt_conf_d}/${priority}${name}": - ensure => $ensure, - content => $content, - owner => root, - group => root, - mode => '0644', - } -} diff --git a/puphpet/puppet/modules/apt/manifests/debian/testing.pp b/puphpet/puppet/modules/apt/manifests/debian/testing.pp deleted file mode 100644 index 3a82b4f7..00000000 --- a/puphpet/puppet/modules/apt/manifests/debian/testing.pp +++ /dev/null @@ -1,21 +0,0 @@ -# testing.pp - -class apt::debian::testing { - include apt - - # deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free - # deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free - # Key: 46925553 Server: subkeys.pgp.net - # debian-keyring - # debian-archive-keyring - - apt::source { 'debian_testing': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'testing', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - } -} diff --git a/puphpet/puppet/modules/apt/manifests/debian/unstable.pp b/puphpet/puppet/modules/apt/manifests/debian/unstable.pp deleted file mode 100644 index 77df94b0..00000000 --- a/puphpet/puppet/modules/apt/manifests/debian/unstable.pp +++ /dev/null @@ -1,21 +0,0 @@ -# unstable.pp - -class apt::debian::unstable { - include apt - - # deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free - # deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free - # Key: 46925553 Server: subkeys.pgp.net - # debian-keyring - # debian-archive-keyring - - apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - } -} diff --git a/puphpet/puppet/modules/apt/manifests/force.pp b/puphpet/puppet/modules/apt/manifests/force.pp deleted file mode 100644 index 70b7d472..00000000 --- a/puphpet/puppet/modules/apt/manifests/force.pp +++ /dev/null @@ -1,42 +0,0 @@ -# force.pp -# force a package from a specific release - -define apt::force( - $release = 'testing', - $version = false, - $timeout = 300 -) { - - $provider = $apt::params::provider - - $version_string = $version ? { - false => undef, - default => "=${version}", - } - - $release_string = $release ? { - false => undef, - default => "-t ${release}", - } - - if $version == false { - if $release == false { - $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'" - } else { - # If installed version and candidate version differ, this check returns 1 (false). - $install_check = "/usr/bin/test \$(/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1" - } - } else { - if $release == false { - $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'" - } else { - $install_check = "/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -q 'Installed: ${version}'" - } - } - - exec { "${provider} -y ${release_string} install ${name}${version_string}": - unless => $install_check, - logoutput => 'on_failure', - timeout => $timeout, - } -} diff --git a/puphpet/puppet/modules/apt/manifests/init.pp b/puphpet/puppet/modules/apt/manifests/init.pp deleted file mode 100644 index 364ce8cb..00000000 --- a/puphpet/puppet/modules/apt/manifests/init.pp +++ /dev/null @@ -1,121 +0,0 @@ -# Class: apt -# -# This module manages the initial configuration of apt. -# -# Parameters: -# The parameters listed here are not required in general and were -# added for use cases related to development environments. -# disable_keys - disables the requirement for all packages to be signed -# always_apt_update - rather apt should be updated on every run (intended -# for development environments where package updates are frequent) -# purge_sources_list - Accepts true or false. Defaults to false If set to -# true, Puppet will purge all unmanaged entries from sources.list -# purge_sources_list_d - Accepts true or false. Defaults to false. If set -# to true, Puppet will purge all unmanaged entries from sources.list.d -# update_timeout - Overrides the exec timeout in seconds for apt-get update. -# If not set defaults to Exec's default (300) -# -# Actions: -# -# Requires: -# puppetlabs/stdlib -# Sample Usage: -# class { 'apt': } - -class apt( - $always_apt_update = false, - $disable_keys = undef, - $proxy_host = undef, - $proxy_port = '8080', - $purge_sources_list = false, - $purge_sources_list_d = false, - $purge_preferences_d = false, - $update_timeout = undef -) { - - include apt::params - include apt::update - - validate_bool($purge_sources_list, $purge_sources_list_d, $purge_preferences_d) - - $sources_list_content = $purge_sources_list ? { - false => undef, - true => "# Repos managed by puppet.\n", - } - - if $always_apt_update == true { - Exec <| title=='apt_update' |> { - refreshonly => false, - } - } - - $root = $apt::params::root - $apt_conf_d = $apt::params::apt_conf_d - $sources_list_d = $apt::params::sources_list_d - $preferences_d = $apt::params::preferences_d - $provider = $apt::params::provider - - file { 'sources.list': - ensure => present, - path => "${root}/sources.list", - owner => root, - group => root, - mode => '0644', - content => $sources_list_content, - notify => Exec['apt_update'], - } - - file { 'sources.list.d': - ensure => directory, - path => $sources_list_d, - owner => root, - group => root, - purge => $purge_sources_list_d, - recurse => $purge_sources_list_d, - notify => Exec['apt_update'], - } - - file { 'preferences.d': - ensure => directory, - path => $preferences_d, - owner => root, - group => root, - purge => $purge_preferences_d, - recurse => $purge_preferences_d, - } - - case $disable_keys { - true: { - file { '99unauth': - ensure => present, - content => "APT::Get::AllowUnauthenticated 1;\n", - path => "${apt_conf_d}/99unauth", - } - } - false: { - file { '99unauth': - ensure => absent, - path => "${apt_conf_d}/99unauth", - } - } - undef: { } # do nothing - default: { fail('Valid values for disable_keys are true or false') } - } - - $proxy_set = $proxy_host ? { - undef => absent, - default => present - } - - file { 'configure-apt-proxy': - ensure => $proxy_set, - path => "${apt_conf_d}/proxy", - content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";", - notify => Exec['apt_update'], - } - - # Need anchor to provide containment for dependencies. - anchor { 'apt::update': - require => Class['apt::update'], - } -} diff --git a/puphpet/puppet/modules/apt/manifests/key.pp b/puphpet/puppet/modules/apt/manifests/key.pp deleted file mode 100644 index c78bf658..00000000 --- a/puphpet/puppet/modules/apt/manifests/key.pp +++ /dev/null @@ -1,90 +0,0 @@ -define apt::key ( - $key = $title, - $ensure = present, - $key_content = false, - $key_source = false, - $key_server = 'keyserver.ubuntu.com', - $key_options = false -) { - - include apt::params - - $upkey = upcase($key) - # trim the key to the last 8 chars so we can match longer keys with apt-key list too - $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1') - - if $key_content { - $method = 'content' - } elsif $key_source { - $method = 'source' - } elsif $key_server { - $method = 'server' - } - - # This is a hash of the parts of the key definition that we care about. - # It is used as a unique identifier for this instance of apt::key. It gets - # hashed to ensure that the resource name doesn't end up being pages and - # pages (e.g. in the situation where key_content is specified). - $digest = sha1("${upkey}/${key_content}/${key_source}/${key_server}/") - - # Allow multiple ensure => present for the same key to account for many - # apt::source resources that all reference the same key. - case $ensure { - present: { - - anchor { "apt::key/${title}": } - - if defined(Exec["apt::key ${upkey} absent"]) { - fail("Cannot ensure Apt::Key[${upkey}] present; ${upkey} already ensured absent") - } - - if !defined(Anchor["apt::key ${upkey} present"]) { - anchor { "apt::key ${upkey} present": } - } - - if $key_options{ - $options_string = "--keyserver-options ${key_options}" - } - else{ - $options_string = '' - } - - if !defined(Exec[$digest]) { - $digest_command = $method ? { - 'content' => "echo '${key_content}' | /usr/bin/apt-key add -", - 'source' => "wget -q '${key_source}' -O- | apt-key add -", - 'server' => "apt-key adv --keyserver '${key_server}' ${options_string} --recv-keys '${upkey}'", - } - exec { $digest: - command => $digest_command, - path => '/bin:/usr/bin', - unless => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'", - logoutput => 'on_failure', - before => Anchor["apt::key ${upkey} present"], - } - } - - Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"] - - } - absent: { - - if defined(Anchor["apt::key ${upkey} present"]) { - fail("Cannot ensure Apt::Key[${upkey}] absent; ${upkey} already ensured present") - } - - exec { "apt::key ${upkey} absent": - command => "apt-key del '${upkey}'", - path => '/bin:/usr/bin', - onlyif => "apt-key list | grep '${trimmedkey}'", - user => 'root', - group => 'root', - logoutput => 'on_failure', - } - } - - default: { - fail "Invalid 'ensure' value '${ensure}' for aptkey" - } - } -} diff --git a/puphpet/puppet/modules/apt/manifests/params.pp b/puphpet/puppet/modules/apt/manifests/params.pp deleted file mode 100644 index b35bb1c8..00000000 --- a/puphpet/puppet/modules/apt/manifests/params.pp +++ /dev/null @@ -1,42 +0,0 @@ -class apt::params { - $root = '/etc/apt' - $provider = '/usr/bin/apt-get' - $sources_list_d = "${root}/sources.list.d" - $apt_conf_d = "${root}/apt.conf.d" - $preferences_d = "${root}/preferences.d" - - case $::lsbdistid { - 'debian': { - case $::lsbdistcodename { - 'squeeze': { - $backports_location = 'http://backports.debian.org/debian-backports' - } - 'wheezy': { - $backports_location = 'http://ftp.debian.org/debian/' - } - default: { - $backports_location = 'http://http.debian.net/debian/' - } - } - } - 'ubuntu': { - case $::lsbdistcodename { - 'hardy','maverick','natty','oneiric','precise': { - $backports_location = 'http://us.archive.ubuntu.com/ubuntu' - $ppa_options = '-y' - } - 'lucid': { - $backports_location = 'http://us.archive.ubuntu.com/ubuntu' - $ppa_options = undef - } - default: { - $backports_location = 'http://old-releases.ubuntu.com/ubuntu' - $ppa_options = '-y' - } - } - } - default: { - fail("Unsupported osfamily (${::osfamily}) or lsbdistid (${::lsbdistid})") - } - } -} diff --git a/puphpet/puppet/modules/apt/manifests/pin.pp b/puphpet/puppet/modules/apt/manifests/pin.pp deleted file mode 100644 index 402e79ed..00000000 --- a/puphpet/puppet/modules/apt/manifests/pin.pp +++ /dev/null @@ -1,73 +0,0 @@ -# pin.pp -# pin a release in apt, useful for unstable repositories - -define apt::pin( - $ensure = present, - $explanation = "${::caller_module_name}: ${name}", - $order = '', - $packages = '*', - $priority = 0, - $release = '', # a= - $origin = '', - $version = '', - $codename = '', # n= - $release_version = '', # v= - $component = '', # c= - $originator = '', # o= - $label = '' # l= -) { - - include apt::params - - $preferences_d = $apt::params::preferences_d - - if $order != '' and !is_integer($order) { - fail('Only integers are allowed in the apt::pin order param') - } - - $pin_release_array = [ - $release, - $codename, - $release_version, - $component, - $originator, - $label] - $pin_release = join($pin_release_array, '') - - # Read the manpage 'apt_preferences(5)', especially the chapter - # 'Thea Effect of APT Preferences' to understand the following logic - # and the difference between specific and general form - if $packages != '*' { # specific form - - if ( $pin_release != '' and ( $origin != '' or $version != '' )) or - ( $origin != '' and ( $pin_release != '' or $version != '' )) or - ( $version != '' and ( $pin_release != '' or $origin != '' )) { - fail('parameters release, origin, and version are mutually exclusive') - } - - } else { # general form - - if $version != '' { - fail('parameter version cannot be used in general form') - } - - if ( $pin_release != '' and $origin != '' ) or - ( $origin != '' and $pin_release != '' ) { - fail('parmeters release and origin are mutually exclusive') - } - - } - - $path = $order ? { - '' => "${preferences_d}/${name}.pref", - default => "${preferences_d}/${order}-${name}.pref", - } - file { "${name}.pref": - ensure => $ensure, - path => $path, - owner => root, - group => root, - mode => '0644', - content => template('apt/pin.pref.erb'), - } -} diff --git a/puphpet/puppet/modules/apt/manifests/ppa.pp b/puphpet/puppet/modules/apt/manifests/ppa.pp deleted file mode 100644 index f2629809..00000000 --- a/puphpet/puppet/modules/apt/manifests/ppa.pp +++ /dev/null @@ -1,81 +0,0 @@ -# ppa.pp - -define apt::ppa( - $release = $::lsbdistcodename, - $options = $apt::params::ppa_options, -) { - $ensure = 'present' - include apt::params - include apt::update - - $sources_list_d = $apt::params::sources_list_d - - if ! $release { - fail('lsbdistcodename fact not available: release parameter required') - } - - if $::operatingsystem != 'Ubuntu' { - fail("apt::ppa is currently supported on Ubuntu only.") - } - - $filename_without_slashes = regsubst($name, '/', '-', 'G') - $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G') - $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G') - $sources_list_d_filename = "${filename_without_ppa}-${release}.list" - - if $ensure == 'present' { - $package = $::lsbdistrelease ? { - /^[1-9]\..*|1[01]\..*|12.04$/ => 'python-software-properties', - default => 'software-properties-common', - } - - if ! defined(Package[$package]) { - package { $package: } - } - - if defined(Class[apt]) { - $proxy_host = $apt::proxy_host - $proxy_port = $apt::proxy_port - case $proxy_host { - false, '': { - $proxy_env = [] - } - default: {$proxy_env = ["http_proxy=http://${proxy_host}:${proxy_port}", "https_proxy=http://${proxy_host}:${proxy_port}"]} - } - } else { - $proxy_env = [] - } - exec { "add-apt-repository-${name}": - environment => $proxy_env, - command => "/usr/bin/add-apt-repository ${options} ${name}", - unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}", - user => 'root', - logoutput => 'on_failure', - notify => Exec['apt_update'], - require => [ - File['sources.list.d'], - Package[$package], - ], - } - - file { "${sources_list_d}/${sources_list_d_filename}": - ensure => file, - require => Exec["add-apt-repository-${name}"], - } - } - else { - - file { "${sources_list_d}/${sources_list_d_filename}": - ensure => 'absent', - mode => '0644', - owner => 'root', - gruop => 'root', - notify => Exec['apt_update'], - } - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::ppa::${name}": - require => Class['apt::update'], - } -} diff --git a/puphpet/puppet/modules/apt/manifests/release.pp b/puphpet/puppet/modules/apt/manifests/release.pp deleted file mode 100644 index 6e0a38f7..00000000 --- a/puphpet/puppet/modules/apt/manifests/release.pp +++ /dev/null @@ -1,17 +0,0 @@ -# release.pp - -class apt::release ( - $release_id -) { - - include apt::params - - $root = $apt::params::root - - file { "${root}/apt.conf.d/01release": - owner => root, - group => root, - mode => '0644', - content => "APT::Default-Release \"${release_id}\";" - } -} diff --git a/puphpet/puppet/modules/apt/manifests/source.pp b/puphpet/puppet/modules/apt/manifests/source.pp deleted file mode 100644 index bc93ad9d..00000000 --- a/puphpet/puppet/modules/apt/manifests/source.pp +++ /dev/null @@ -1,87 +0,0 @@ -# source.pp -# add an apt source - -define apt::source( - $ensure = present, - $location = '', - $release = 'UNDEF', - $repos = 'main', - $include_src = true, - $required_packages = false, - $key = false, - $key_server = 'keyserver.ubuntu.com', - $key_content = false, - $key_source = false, - $pin = false, - $architecture = undef -) { - - include apt::params - include apt::update - - $sources_list_d = $apt::params::sources_list_d - $provider = $apt::params::provider - - if $release == 'UNDEF' { - if $::lsbdistcodename == undef { - fail('lsbdistcodename fact not available: release parameter required') - } else { - $release_real = $::lsbdistcodename - } - } else { - $release_real = $release - } - - file { "${name}.list": - ensure => $ensure, - path => "${sources_list_d}/${name}.list", - owner => root, - group => root, - mode => '0644', - content => template("${module_name}/source.list.erb"), - notify => Exec['apt_update'], - } - - - if ($pin != false) { - # Get the host portion out of the url so we can pin to origin - $url_split = split($location, '/') - $host = $url_split[2] - - apt::pin { $name: - ensure => $ensure, - priority => $pin, - before => File["${name}.list"], - origin => $host, - } - } - - if ($required_packages != false) and ($ensure == 'present') { - exec { "Required packages: '${required_packages}' for ${name}": - command => "${provider} -y install ${required_packages}", - logoutput => 'on_failure', - refreshonly => true, - tries => 3, - try_sleep => 1, - subscribe => File["${name}.list"], - before => Exec['apt_update'], - } - } - - # We do not want to remove keys when the source is absent. - if ($key != false) and ($ensure == 'present') { - apt::key { "Add key: ${key} from Apt::Source ${title}": - ensure => present, - key => $key, - key_server => $key_server, - key_content => $key_content, - key_source => $key_source, - before => File["${name}.list"], - } - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::source::${name}": - require => Class['apt::update'], - } -} diff --git a/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp b/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp deleted file mode 100644 index b0bd8ab1..00000000 --- a/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp +++ /dev/null @@ -1,69 +0,0 @@ -# Class: apt::unattended_upgrades -# -# This class manages the unattended-upgrades package and related configuration -# files for ubuntu -# -# origins are the repositories to automatically upgrade included packages -# blacklist is a list of packages to not automatically upgrade -# update is how often to run "apt-get update" in days -# download is how often to run "apt-get upgrade --download-only" in days -# upgrade is how often to upgrade packages included in the origins list in days -# autoclean is how often to run "apt-get autoclean" in days -# -# information on the other options can be found in the 50unattended-upgrades -# file and in /etc/cron.daily/apt -# -class apt::unattended_upgrades ( - $origins = ['${distro_id}:${distro_codename}-security'], - $blacklist = [], - $update = "1", - $download = "1", - $upgrade = "1", - $autoclean = "7", - $auto_fix = true, - $minimal_steps = false, - $install_on_shutdown = false, - $mail_to = "NONE", - $mail_only_on_error = false, - $remove_unused = true, - $auto_reboot = false, - $dl_limit = "NONE", - $enable = "1", - $backup_interval = "0", - $backup_level = "3", - $max_age = "0", - $min_age = "0", - $max_size = "0", - $download_delta = "0", - $verbose = "0", -) { - include apt::params - - validate_bool( - $auto_fix, - $minimal_steps, - $install_on_shutdown, - $mail_only_on_error, - $remove_unused, - $auto_reboot - ) - - package { 'unattended-upgrades': - ensure => present, - } - - File { - ensure => file, - owner => 'root', - group => 'root', - mode => '0644', - require => Package['unattended-upgrades'], - } - - file { - '/etc/apt/apt.conf.d/50unattended-upgrades': - content => template('apt/50unattended-upgrades.erb'); - '/etc/apt/apt.conf.d/10periodic': - content => template('apt/10periodic.erb'); - } -} diff --git a/puphpet/puppet/modules/apt/manifests/update.pp b/puphpet/puppet/modules/apt/manifests/update.pp deleted file mode 100644 index ce0b78fb..00000000 --- a/puphpet/puppet/modules/apt/manifests/update.pp +++ /dev/null @@ -1,10 +0,0 @@ -class apt::update { - include apt::params - - exec { 'apt_update': - command => "${apt::params::provider} update", - logoutput => 'on_failure', - refreshonly => true, - timeout => $apt::update_timeout, - } -} diff --git a/puphpet/puppet/modules/apt/metadata.json b/puphpet/puppet/modules/apt/metadata.json deleted file mode 100644 index f1e86630..00000000 --- a/puphpet/puppet/modules/apt/metadata.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "puppetlabs-apt", - "version": "1.4.1", - "source": "https://github.com/puppetlabs/puppetlabs-apt", - "author": "Puppet Labs", - "license": "Apache-2.0", - "project_page": "https://github.com/puppetlabs/puppetlabs-apt", - "summary": "Puppet Labs Apt Module", - "operatingsystem_support": [ - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - } - ], - "requirements": [ - { "name": "pe", "version_requirement": "3.2.x" }, - { "name": "puppet", "version_requirement": "3.x" } - ], - "dependencies": [] -} diff --git a/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb deleted file mode 100644 index 1e35e4aa..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::builddep', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'removes packages' do - shell('apt-get -y remove znc') - shell('apt-get -y remove g++') - end - end - - context 'apt::builddep' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::builddep { 'znc': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'should install g++ as a dependency' do - describe package('g++') do - it { should be_installed } - end - end - end - - context 'reset' do - it 'removes packages' do - shell('apt-get -y remove znc') - shell('apt-get -y remove g++') - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb deleted file mode 100644 index 9f2ba395..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb +++ /dev/null @@ -1,200 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::key', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'apt::key' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - it 'finds jenkins key' do - shell('apt-key list | grep D50582E6') - end - end - end - context 'ensure' do - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - ensure => absent, - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - ensure => absent, - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys shouldnt exist' do - it 'fails' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [1]) - end - it 'fails' do - shell('apt-key list | grep D50582E6', :acceptable_exit_codes => [1]) - end - end - end - end - - context 'reset' do - it 'clean up keys' do - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) - end - end - - context 'key options' do - context 'key_content' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- - Version: GnuPG v1.4.12 (GNU/Linux) - Comment: GPGTools - http://gpgtools.org - - mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b - fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg - 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ - S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY - GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH - Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v - VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 - Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI - wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN - NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl - f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB - tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL - ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn - AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob - pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF - eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ - aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M - 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ - VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU - 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh - qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 - IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 - 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp - HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN - MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ - UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh - R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ - N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc - kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e - lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT - DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb - kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf - DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei - BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z - XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 - +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU - fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH - dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 - qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 - 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq - UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x - Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA - KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 - okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 - bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 - 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX - vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 - jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y - ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD - 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR - M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf - REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y - DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk - ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= - =a34C - -----END PGP PUBLIC KEY BLOCK----- - ', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - - context 'key_source' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - - context 'key_options' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - key_options => 'debug' - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb deleted file mode 100644 index c11da912..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb +++ /dev/null @@ -1,98 +0,0 @@ -require 'spec_helper_acceptance' - -if fact('operatingsystem') == 'Ubuntu' - describe 'apt::ppa', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'removes ppa' do - shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0,1,2]) - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*', :acceptable_exit_codes => [0,1,2]) - end - end - - context 'adding a ppa that doesnt exist' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'contains the source file' do - it 'contains a kernel ppa source' do - shell('ls /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0]) - end - end - end - - context 'reading a removed ppa.' do - it 'setup' do - # This leaves a blank file - shell('echo > /etc/apt/sources.list.d/raravena80-collectd5-$(lsb_release -c -s).list') - end - - it 'should read it successfully' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:raravena80/collectd5': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - context 'reset' do - it 'removes added ppas' do - shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*') - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*') - end - end - - context 'release' do - context 'precise' do - it 'works without failure' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': - release => precise, - } - EOS - - shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do - it { should be_file } - end - end - end - - context 'options' do - context '-y', :unless => default[:platform].match(/10\.04/) do - it 'works without failure' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': - release => precise, - options => '-y', - } - EOS - - shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do - it { should be_file } - end - end - end - - context 'reset' do - it { shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) } - end - end -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb deleted file mode 100644 index c2d076cb..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb +++ /dev/null @@ -1,326 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::source', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'apt::source' do - context 'ensure => present' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('rm /etc/apt/sources.list.d/puppetlabs.list', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'key should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) - end - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - end - end - - context 'ensure => absent' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => absent, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - # The key should remain -we don't delete those when deleting a source. - describe 'key should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) - end - end - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should_not be_file } - end - end - - end - - context 'release' do - context 'test' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - release => 'precise', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb http://apt.puppetlabs.com precise main' } - end - end - end - - context 'include_src' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - include_src => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb-src http://apt.puppetlabs.com' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - include_src => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should_not contain 'deb-src http://apt.puppetlabs.com' } - end - end - end - - context 'required_packages' do - context 'vim' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - required_packages => 'vim', - } - EOS - - shell('apt-get -y remove vim') - apply_manifest(pp, :catch_failures => true) - end - - describe package('vim') do - it { should be_installed } - end - end - end - - context 'key content' do - context 'giant key' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- - Version: GnuPG v1.4.12 (GNU/Linux) - Comment: GPGTools - http://gpgtools.org - - mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b - fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg - 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ - S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY - GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH - Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v - VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 - Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI - wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN - NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl - f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB - tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL - ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn - AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob - pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF - eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ - aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M - 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ - VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU - 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh - qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 - IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 - 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp - HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN - MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ - UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh - R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ - N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc - kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e - lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT - DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb - kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf - DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei - BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z - XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 - +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU - fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH - dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 - qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 - 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq - UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x - Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA - KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 - okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 - bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 - 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX - vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 - jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y - ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD - 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR - M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf - REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y - DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk - ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= - =a34C - -----END PGP PUBLIC KEY BLOCK-----', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - - context 'key_source' do - context 'http://apt.puppetlabs.com/pubkey.gpg' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - release => 'precise', - repos => 'main', - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb http://apt.puppetlabs.com precise main' } - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - - context 'pin' do - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - pin => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/puppetlabs.pref') do - it { should_not be_file } - end - end - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - pin => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/puppetlabs.pref') do - it { should be_file } - end - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb deleted file mode 100644 index 77513914..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb +++ /dev/null @@ -1,233 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'fixes the sources.list' do - shell('cp /etc/apt/sources.list /tmp') - end - end - - context 'always_apt_update => true' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': always_apt_update => true } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/apt_update/) - end - end - end - context 'always_apt_update => false' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': always_apt_update => false } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to_not match(/apt_update/) - end - end - end - - # disable_keys drops in a 99unauth file to ignore keys in - # other files. - context 'disable_keys => true' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': disable_keys => true } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99unauth') do - it { should be_file } - it { should contain 'APT::Get::AllowUnauthenticated 1;' } - end - end - context 'disable_keys => false' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': disable_keys => false } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99unauth') do - it { should_not be_file } - end - end - - # proxy_host sets the proxy to use for transfers. - # proxy_port sets the proxy port to use. - context 'proxy settings' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': - proxy_host => 'localhost', - proxy_port => '7042', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/proxy') do - it { should be_file } - it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } - end - end - - context 'purge_sources' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => true' do - pp = <<-EOS - class { 'apt': - purge_sources_list => true, - purge_sources_list_d => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list') do - it { should_not contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should_not be_file } - end - end - context 'proxy settings' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': - proxy_host => 'localhost', - proxy_port => '7042', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/proxy') do - it { should be_file } - it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } - end - end - - context 'purge_sources' do - context 'false' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => false' do - pp = <<-EOS - class { 'apt': - purge_sources_list => false, - purge_sources_list_d => false, - } - EOS - - apply_manifest(pp, :catch_failures => false) - end - - describe file('/etc/apt/sources.list') do - it { should contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should be_file } - end - end - - context 'true' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => true' do - pp = <<-EOS - class { 'apt': - purge_sources_list => true, - purge_sources_list_d => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list') do - it { should_not contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should_not be_file } - end - end - end - - context 'purge_preferences_d' do - context 'false' do - it 'creates a preferences file' do - shell('touch /etc/apt/preferences.d/test') - end - - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': purge_preferences_d => false } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/test') do - it { should be_file } - end - end - context 'true' do - it 'creates a preferences file' do - shell('touch /etc/apt/preferences.d/test') - end - - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': purge_preferences_d => true } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/test') do - it { should_not be_file } - end - end - end - - context 'update_timeout' do - context '5000' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': update_timeout => '5000' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - end - - context 'reset' do - it 'fixes the sources.list' do - shell('cp /tmp/sources.list /etc/apt') - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb deleted file mode 100644 index 6d3f7f0e..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'spec_helper_acceptance' - -codename = fact('lsbdistcodename') -case fact('operatingsystem') -when 'Ubuntu' - repos = 'main universe multiverse restricted' -when 'Debian' - repos = 'main contrib non-free' -end - -describe 'apt::backports class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - context 'release' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': release => '#{codename}' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/backports.list') do - it { should be_file } - it { should contain "#{codename}-backports #{repos}" } - end - end - - context 'location' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': release => 'precise', location => 'http://localhost/ubuntu' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/backports.list') do - it { should be_file } - it { should contain "deb http://localhost/ubuntu precise-backports #{repos}" } - end - end - - context 'reset' do - it 'deletes backport files' do - shell('rm -rf /etc/apt/sources.list.d/backports.list') - shell('rm -rf /etc/apt/preferences.d/backports.pref') - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb deleted file mode 100644 index e5994498..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'default parameters' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb deleted file mode 100644 index 8a8ed63d..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::conf define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - content => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50test') do - it { should be_file } - it { should contain 'test' } - end - end - - context 'ensure' do - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - ensure => absent, - content => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50test') do - it { should_not be_file } - end - end - end - - context 'priority' do - context '99' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - ensure => present, - content => 'test', - priority => '99', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99test') do - it { should be_file } - it { should contain 'test' } - end - end - end - - context 'cleanup' do - it 'deletes 99test' do - shell ('rm -rf /etc/apt/apt.conf.d/99test') - end - end -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb deleted file mode 100644 index 00572eae..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require 'spec_helper_acceptance' - -codename = fact('lsbdistcodename') - -describe 'apt::force define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => false, } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => true) - end - - describe package('vim') do - it { should be_installed } - end - end - - context 'release' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => '#{codename}' } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/apt-get -y -t #{codename} install vim/) - end - end - - describe package('vim') do - it { should be_installed } - end - end - - context 'version' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': version => '1.1.1', release => false, } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => false) do |r| - expect(r.stdout).to match(/apt-get -y install vim=1.1.1/) - end - end - - describe package('vim') do - it { should_not be_installed } - end - end - - context 'timeout' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => false, timeout => '1' } - EOS - - shell('apt-get clean') - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Error: Command exceeded timeout/) - end - end - - describe package('vim') do - it { should_not be_installed } - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml b/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index 4b55677f..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-70rc1-x64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml b/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml deleted file mode 100644 index a5f38f78..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-server-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index c1b8bdf8..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index a5f38f78..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-server-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb deleted file mode 100644 index 6de11748..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb +++ /dev/null @@ -1,266 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::pin define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - - context 'ensure' do - context 'present' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': ensure => present } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': ensure => absent } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should_not be_file } - end - end - end - - context 'order' do - context '99' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - order => '99', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/99-vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - end - - context 'packages' do - context 'test' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - packages => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Package: test' } - it { should contain 'Pin: release a=vim-puppet' } - end - end - end - - context 'release' do - context 'testrelease' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - release => 'testrelease', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=testrelease' } - end - end - end - - context 'origin' do - context 'testrelease' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - origin => 'testrelease', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: origin testrelease' } - end - end - end - - context 'version' do - context '1.0.0' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - packages => 'test', - version => '1.0.0', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Package: test' } - it { should contain 'Pin: version 1.0.0' } - end - end - end - - context 'codename' do - context 'testname' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - codename => 'testname', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release n=testname' } - end - end - end - - context 'release_version' do - context '1.1.1' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - release_version => '1.1.1', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release v=1.1.1' } - end - end - end - - context 'component' do - context 'testcomponent' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - component => 'testcomponent', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release c=testcomponent' } - end - end - end - - context 'originator' do - context 'testorigin' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - originator => 'testorigin', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release o=testorigin' } - end - end - end - - context 'label' do - context 'testlabel' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - label => 'testlabel', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release l=testlabel' } - end - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb deleted file mode 100644 index e7467bf6..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::release class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'release_id' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::release': release_id => 'precise', } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/01release') do - it { should be_file } - it { should contain 'APT::Default-Release "precise";' } - end - end - - context 'reset' do - it 'cleans up' do - shell('rm -rf /etc/apt/apt.conf.d/01release') - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb deleted file mode 100644 index 6a19f4e7..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb +++ /dev/null @@ -1,562 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::unattended_upgrades class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - include apt::unattended_upgrades - EOS - - # Attempted workaround for problems seen on debian with - # something holding the package database open. - #shell('killall -9 apt-get') - #shell('killall -9 dpkg') - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - end - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - end - end - - context 'origins' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - origins => ['${distro_id}:${distro_codename}-test'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain '${distro_id}:${distro_codename}-test' } - end - end - - context 'blacklist' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - blacklist => ['puppet'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'puppet' } - end - end - - context 'update' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - update => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Update-Package-Lists "99";' } - end - end - - context 'download' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - download => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Download-Upgradeable-Packages "99";' } - end - end - - context 'upgrade' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - upgrade => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Unattended-Upgrade "99";' } - end - end - - context 'autoclean' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - autoclean => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::AutocleanInterval "99";' } - end - end - - context 'auto_fix' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_fix => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_fix => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "false";' } - end - end - end - - context 'minimal_steps' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - minimal_steps => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MinimalSteps "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - minimal_steps => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MinimalSteps "false";' } - end - end - end - - context 'install_on_shutdown' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - install_on_shutdown => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::InstallOnShutdown "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - install_on_shutdown => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::InstallOnShutdown "false";' } - end - end - end - - context 'mail_to' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Mail "test@example.com";' } - end - end - - context 'mail_only_on_error' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com', - mail_only_on_error => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MailOnlyOnError "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com', - mail_only_on_error => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MailOnlyOnError "false";' } - end - end - - context 'mail_to missing' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_only_on_error => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should_not contain 'Unattended-Upgrade::MailOnlyOnError "true";' } - end - end - end - - context 'remove_unused' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - remove_unused => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - remove_unused => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "false";' } - end - end - end - - context 'auto_reboot' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_reboot => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Automatic-Reboot "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_reboot => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Automatic-Reboot "false";' } - end - end - end - - context 'dl_limit' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - dl_limit => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Acquire::http::Dl-Limit "99"' } - end - end - - context 'enable' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - enable => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Enable "2"' } - end - end - - context 'backup_interval' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - backup_interval => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::BackUpArchiveInterval "2";' } - end - end - - context 'backup_level' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - backup_level => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::BackUpLevel "2";' } - end - end - - context 'max_age' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - max_age => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MaxAge "2";' } - end - end - - context 'min_age' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - min_age => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MinAge "2";' } - end - end - - context 'max_size' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - max_size => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MaxSize "2";' } - end - end - - context 'download_delta' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - download_delta => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";' } - end - end - - context 'verbose' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - verbose => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Verbose "2";' } - end - end - -end diff --git a/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb b/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 08dca76b..00000000 --- a/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'class apt fails' do - pp = <<-EOS - class { 'apt': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) - end -end diff --git a/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb b/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb deleted file mode 100644 index 080bc817..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'spec_helper' -describe 'apt', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let :default_params do - { - :disable_keys => :undef, - :always_apt_update => false, - :purge_sources_list => false, - :purge_sources_list_d => false, - } - end - - [{}, - { - :disable_keys => true, - :always_apt_update => true, - :proxy_host => true, - :proxy_port => '3128', - :purge_sources_list => true, - :purge_sources_list_d => true, - }, - { - :disable_keys => false - } - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do - let :param_hash do - default_params.merge(param_set) - end - - let :params do - param_set - end - - let :refresh_only_apt_update do - if param_hash[:always_apt_update] - false - else - true - end - end - - it { should contain_class("apt::params") } - - it { - if param_hash[:purge_sources_list] - should contain_file("sources.list").with({ - 'path' => "/etc/apt/sources.list", - 'ensure' => "present", - 'owner' => "root", - 'group' => "root", - 'mode' => "0644", - "content" => "# Repos managed by puppet.\n" - }) - else - should contain_file("sources.list").with({ - 'path' => "/etc/apt/sources.list", - 'ensure' => "present", - 'owner' => "root", - 'group' => "root", - 'mode' => "0644", - 'content' => nil - }) - end - } - it { - if param_hash[:purge_sources_list_d] - should create_file("sources.list.d").with({ - 'path' => "/etc/apt/sources.list.d", - 'ensure' => "directory", - 'owner' => "root", - 'group' => "root", - 'purge' => true, - 'recurse' => true, - 'notify' => 'Exec[apt_update]' - }) - else - should create_file("sources.list.d").with({ - 'path' => "/etc/apt/sources.list.d", - 'ensure' => "directory", - 'owner' => "root", - 'group' => "root", - 'purge' => false, - 'recurse' => false, - 'notify' => 'Exec[apt_update]' - }) - end - } - - it { - should contain_exec("apt_update").with({ - 'command' => "/usr/bin/apt-get update", - 'refreshonly' => refresh_only_apt_update - }) - } - - it { - if param_hash[:disable_keys] == true - should create_file("99unauth").with({ - 'content' => "APT::Get::AllowUnauthenticated 1;\n", - 'ensure' => "present", - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - elsif param_hash[:disable_keys] == false - should create_file("99unauth").with({ - 'ensure' => "absent", - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - elsif param_hash[:disable_keys] != :undef - should_not create_file("99unauth").with({ - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - end - } - describe 'when setting a proxy' do - it { - if param_hash[:proxy_host] - should contain_file('configure-apt-proxy').with( - 'path' => '/etc/apt/apt.conf.d/proxy', - 'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";", - 'notify' => "Exec[apt_update]" - ) - else - should contain_file('configure-apt-proxy').with( - 'path' => '/etc/apt/apt.conf.d/proxy', - 'notify' => 'Exec[apt_update]', - 'ensure' => 'absent' - ) - end - } - end - end - end -end diff --git a/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb b/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb deleted file mode 100644 index 98ad873a..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'spec_helper' -describe 'apt::backports', :type => :class do - - describe 'when turning on backports for ubuntu karmic' do - - let :facts do - { - 'lsbdistcodename' => 'Karmic', - 'lsbdistid' => 'Ubuntu' - } - end - - it { should contain_apt__source('backports').with({ - 'location' => 'http://old-releases.ubuntu.com/ubuntu', - 'release' => 'karmic-backports', - 'repos' => 'main universe multiverse restricted', - 'key' => '437D05B5', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end - - describe "when turning on backports for debian squeeze" do - - let :facts do - { - 'lsbdistcodename' => 'Squeeze', - 'lsbdistid' => 'Debian', - } - end - - it { should contain_apt__source('backports').with({ - 'location' => 'http://backports.debian.org/debian-backports', - 'release' => 'squeeze-backports', - 'repos' => 'main contrib non-free', - 'key' => '46925553', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end - - describe "when turning on backports for debian squeeze but using your own mirror" do - - let :facts do - { - 'lsbdistcodename' => 'Squeeze', - 'lsbdistid' => 'Debian' - } - end - - let :location do - 'http://mirrors.example.com/debian-backports' - end - - let :params do - { 'location' => location } - end - - it { should contain_apt__source('backports').with({ - 'location' => location, - 'release' => 'squeeze-backports', - 'repos' => 'main contrib non-free', - 'key' => '46925553', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end -end diff --git a/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb b/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb deleted file mode 100644 index 20487333..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' -describe 'apt::debian::testing', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - it { - should contain_apt__source("debian_testing").with({ - "location" => "http://debian.mirror.iweb.ca/debian/", - "release" => "testing", - "repos" => "main contrib non-free", - "required_packages" => "debian-keyring debian-archive-keyring", - "key" => "46925553", - "key_server" => "subkeys.pgp.net", - "pin" => "-10" - }) - } -end diff --git a/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb b/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb deleted file mode 100644 index 70724f90..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' -describe 'apt::debian::unstable', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - it { - should contain_apt__source("debian_unstable").with({ - "location" => "http://debian.mirror.iweb.ca/debian/", - "release" => "unstable", - "repos" => "main contrib non-free", - "required_packages" => "debian-keyring debian-archive-keyring", - "key" => "46925553", - "key_server" => "subkeys.pgp.net", - "pin" => "-10" - }) - } -end diff --git a/puphpet/puppet/modules/apt/spec/classes/params_spec.rb b/puphpet/puppet/modules/apt/spec/classes/params_spec.rb deleted file mode 100644 index 2d3ec3c7..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/params_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' -describe 'apt::params', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let (:title) { 'my_package' } - - it { should contain_apt__params } - - # There are 4 resources in this class currently - # there should not be any more resources because it is a params class - # The resources are class[apt::params], class[main], class[settings], stage[main] - it "Should not contain any resources" do - subject.resources.size.should == 4 - end -end diff --git a/puphpet/puppet/modules/apt/spec/classes/release_spec.rb b/puphpet/puppet/modules/apt/spec/classes/release_spec.rb deleted file mode 100644 index e43f449d..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/release_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' -describe 'apt::release', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let (:title) { 'my_package' } - - let :param_set do - { :release_id => 'precise' } - end - - let (:params) { param_set } - - it { should contain_class("apt::params") } - - it { - should contain_file("/etc/apt/apt.conf.d/01release").with({ - "mode" => "0644", - "owner" => "root", - "group" => "root", - "content" => "APT::Default-Release \"#{param_set[:release_id]}\";" - }) - } -end - diff --git a/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb b/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb deleted file mode 100644 index f5cad53a..00000000 --- a/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'spec_helper' -describe 'apt::unattended_upgrades', :type => :class do - let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' } - let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' } - let(:facts) { { :lsbdistid => 'Debian' } } - - it { should contain_package("unattended-upgrades") } - - it { - should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({ - "owner" => "root", - "group" => "root", - "mode" => "0644", - "require" => "Package[unattended-upgrades]", - }) - } - - it { - should create_file("/etc/apt/apt.conf.d/10periodic").with({ - "owner" => "root", - "group" => "root", - "mode" => "0644", - "require" => "Package[unattended-upgrades]", - }) - } - - describe "origins" do - describe "with param defaults" do - let(:params) {{ }} - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"\$\{distro_id\}:\$\{distro_codename\}-security";\n\};$/) } - end - - describe "with origins => ['ubuntu:precise-security']" do - let :params do - { :origins => ['ubuntu:precise-security'] } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) } - end - end - - describe "blacklist" do - describe "with param defaults" do - let(:params) {{ }} - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\};$/) } - end - - describe "with blacklist => []" do - let :params do - { :blacklist => ['libc6', 'libc6-dev'] } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) } - end - end - - describe "with update => 2" do - let :params do - { :update => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) } - end - - describe "with download => 2" do - let :params do - { :download => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) } - end - - describe "with upgrade => 2" do - let :params do - { :upgrade => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) } - end - - describe "with autoclean => 2" do - let :params do - { :autoclean => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) } - end - - describe "with auto_fix => false" do - let :params do - { :auto_fix => false } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) } - end - - describe "with minimal_steps => true" do - let :params do - { :minimal_steps => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) } - end - - describe "with install_on_shutdown => true" do - let :params do - { :install_on_shutdown => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) } - end - - describe "mail_to" do - describe "param defaults" do - let(:params) {{ }} - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail /) } - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError /) } - end - - describe "with mail_to => user@website, mail_only_on_error => true" do - let :params do - { :mail_to => "user@website", - :mail_only_on_error => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail "user@website";$/) } - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) } - end - end - - describe "with remove_unused => false" do - let :params do - { :remove_unused => false } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) } - end - - describe "with auto_reboot => true" do - let :params do - { :auto_reboot => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) } - end - - describe "dl_limit" do - describe "param defaults" do - let(:params) {{ }} - it { should_not contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit /) } - end - - describe "with dl_limit => 70" do - let :params do - { :dl_limit => "70" } - end - it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) } - end - end - - describe "with enable => 0" do - let :params do - { :enable => "0" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) } - end - - describe "with backup_interval => 1" do - let :params do - { :backup_interval => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) } - end - - describe "with backup_level => 0" do - let :params do - { :backup_level => "0" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) } - end - - describe "with max_age => 1" do - let :params do - { :max_age => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) } - end - - describe "with min_age => 1" do - let :params do - { :min_age => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) } - end - - describe "with max_size => 1" do - let :params do - { :max_size => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) } - end - - describe "with download_delta => 2" do - let :params do - { :download_delta => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) } - end - - describe "with verbose => 2" do - let :params do - { :verbose => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) } - end - -end diff --git a/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb b/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb deleted file mode 100644 index a0cbaa4c..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' -describe 'apt::builddep', :type => :define do - - let(:facts) { { :lsbdistid => 'Debian' } } - let(:title) { 'my_package' } - - describe "should require apt-get update" do - it { should contain_exec("apt_update").with({ - 'command' => "/usr/bin/apt-get update", - 'refreshonly' => true - }) - } - it { should contain_anchor("apt::builddep::my_package").with({ - 'require' => 'Class[Apt::Update]', - }) - } - end - -end diff --git a/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb b/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb deleted file mode 100644 index cda5900c..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' -describe 'apt::conf', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - 'norecommends' - end - - describe "when creating an apt preference" do - let :params do - { - :priority => '00', - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - } - end - - let :filename do - "/etc/apt/apt.conf.d/00norecommends" - end - - it { should contain_apt__conf('norecommends').with({ - 'priority' => '00', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - }) - } - - it { should contain_file(filename).with({ - 'ensure' => 'present', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - }) - } - end - - describe "when removing an apt preference" do - let :params do - { - :ensure => 'absent', - :priority => '00', - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - } - end - - let :filename do - "/etc/apt/apt.conf.d/00norecommends" - end - - it { should contain_file(filename).with({ - 'ensure' => 'absent', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - }) - } - end -end diff --git a/puphpet/puppet/modules/apt/spec/defines/force_spec.rb b/puphpet/puppet/modules/apt/spec/defines/force_spec.rb deleted file mode 100644 index b8665e6d..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/force_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' -describe 'apt::force', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :pre_condition do - 'include apt::params' - end - - let :title do - 'my_package' - end - - let :default_params do - { - :release => 'testing', - :version => false - } - end - - describe "when using default parameters" do - let :params do - default_params - end - it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}").with( - :unless => "/usr/bin/test \$(/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1", - :timeout => '300' - ) } - end - - describe "when specifying false release parameter" do - let :params do - default_params.merge(:release => false) - end - it { should contain_exec("/usr/bin/apt-get -y install #{title}").with( - :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Status: install'" - ) } - end - - describe "when specifying version parameter" do - let :params do - default_params.merge(:version => '1') - end - it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}=#{params[:version]}").with( - :unless => "/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -q 'Installed: #{params[:version]}'" - ) } - end - - describe "when specifying false release and version parameters" do - let :params do - default_params.merge( - :release => false, - :version => '1' - ) - end - it { should contain_exec("/usr/bin/apt-get -y install #{title}=1").with( - :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Version: #{params[:version]}'" - ) } - end -end diff --git a/puphpet/puppet/modules/apt/spec/defines/key_spec.rb b/puphpet/puppet/modules/apt/spec/defines/key_spec.rb deleted file mode 100644 index 4ba7b87e..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/key_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'spec_helper' -describe 'apt::key', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - '8347A27F' - end - - let :default_params do - { - :key => title, - :ensure => 'present', - :key_server => "keyserver.ubuntu.com", - :key_source => false, - :key_content => false - } - end - - [{}, - { - :ensure => 'absent' - }, - { - :ensure => 'random' - }, - { - :key_source => 'ftp://ftp.example.org/key', - }, - { - :key_content => 'deadbeef', - } - ].each do |param_set| - - let :param_hash do - param_hash = default_params.merge(param_set) - param_hash[:key].upcase! if param_hash[:key] - param_hash - end - - let :params do - param_set - end - - let :digest do - str = String.new - str << param_hash[:key].to_s << '/' - str << param_hash[:key_content].to_s << '/' - str << param_hash[:key_source].to_s << '/' - str << param_hash[:key_server].to_s << '/' - Digest::SHA1.hexdigest(str) - end - - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do - - it { - if [:present, 'present', :absent, 'absent'].include? param_hash[:ensure] - should contain_apt__params - end - } - - it { - if [:present, 'present'].include? param_hash[:ensure] - should_not contain_exec("apt::key #{param_hash[:key]} absent") - should contain_anchor("apt::key #{param_hash[:key]} present") - should contain_exec(digest).with({ - "path" => "/bin:/usr/bin", - "unless" => "/usr/bin/apt-key list | /bin/grep '#{param_hash[:key]}'" - }) - elsif [:absent, 'absent'].include? param_hash[:ensure] - should_not contain_anchor("apt::key #{param_hash[:key]} present") - should contain_exec("apt::key #{param_hash[:key]} absent").with({ - "path" => "/bin:/usr/bin", - "onlyif" => "apt-key list | grep '#{param_hash[:key]}'", - "command" => "apt-key del '#{param_hash[:key]}'" - }) - else - expect { should raise_error(Puppet::Error) } - end - } - - it { - if [:present, 'present'].include? param_hash[:ensure] - if param_hash[:key_content] - should contain_exec(digest).with({ - "command" => "echo '#{param_hash[:key_content]}' | /usr/bin/apt-key add -" - }) - elsif param_hash[:key_source] - should contain_exec(digest).with({ - "command" => "wget -q '#{param_hash[:key_source]}' -O- | apt-key add -" - }) - elsif param_hash[:key_server] - should contain_exec(digest).with({ - "command" => "apt-key adv --keyserver '#{param_hash[:key_server]}' --recv-keys '#{param_hash[:key]}'" - }) - end - end - } - - end - end - - [{ :ensure => 'present' }, { :ensure => 'absent' }].each do |param_set| - describe "should correctly handle duplicate definitions" do - - let :pre_condition do - "apt::key { 'duplicate': key => '#{title}'; }" - end - - let(:params) { param_set } - - it { - if param_set[:ensure] == 'present' - should contain_anchor("apt::key #{title} present") - should contain_apt__key(title) - should contain_apt__key("duplicate") - elsif param_set[:ensure] == 'absent' - expect { should raise_error(Puppet::Error) } - end - } - - end - end - -end - diff --git a/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb b/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb deleted file mode 100644 index 78a9b126..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb +++ /dev/null @@ -1,102 +0,0 @@ -require 'spec_helper' -describe 'apt::pin', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let(:title) { 'my_pin' } - - let :default_params do - { - :ensure => 'present', - :order => '', - :packages => '*', - :priority => '0', - :release => nil - } - end - - [ - { :params => {}, - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :order => 50, - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :ensure => 'absent', - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :release => 'my_newpin' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_newpin\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :version => '2.2.16*' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: version 2.2.16*\nPin-Priority: 1\n" - }, - { - :params => { - :priority => '1', - :origin => 'ftp.de.debian.org' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin ftp.de.debian.org\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :release => 'stable', - :codename => 'wheezy', - :release_version => '3.0', - :component => 'main', - :originator => 'Debian', - :label => 'Debian' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n" - }, - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do - let :param_hash do - default_params.merge(param_set[:params]) - end - - let :params do - param_set[:params] - end - - it { should contain_class("apt::params") } - - it { should contain_file("#{title}.pref").with({ - 'ensure' => param_hash[:ensure], - 'path' => "/etc/apt/preferences.d/#{param_hash[:order] == '' ? "" : "#{param_hash[:order]}-"}#{title}.pref", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'content' => param_set[:content], - }) - } - end - end -end diff --git a/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb b/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb deleted file mode 100644 index 0c3bd75e..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'spec_helper' -describe 'apt::ppa', :type => :define do - [ - { - :lsbdistrelease => '11.04', - :lsbdistcodename => 'natty', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu', - :package => 'python-software-properties' - }, - { - :lsbdistrelease => '12.10', - :lsbdistcodename => 'quantal', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu', - :package => 'software-properties-common' - }, - ].each do |platform| - context "on #{platform[:lsbdistcodename]}" do - let :facts do - { - :lsbdistrelease => platform[:lsbdistrelease], - :lsbdistcodename => platform[:lsbdistcodename], - :operatingsystem => platform[:operatingsystem], - :lsbdistid => platform[:lsbdistid], - } - end - let :release do - "#{platform[:lsbdistcodename]}" - end - let :package do - "#{platform[:package]}" - end - let :options do - "-y" - end - ['ppa:dans_ppa', 'dans_ppa','ppa:dans-daily/ubuntu'].each do |t| - describe "with title #{t}" do - let :pre_condition do - 'class { "apt": }' - end - let :title do - t - end - let :filename do - t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list" - end - - it { should contain_package("#{package}") } - - it { should contain_exec("apt_update").with( - 'command' => '/usr/bin/apt-get update', - 'refreshonly' => true - ) - } - - it { should contain_exec("add-apt-repository-#{t}").with( - 'command' => "/usr/bin/add-apt-repository #{options} #{t}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - - it { should create_file("/etc/apt/sources.list.d/#{filename}").with( - 'ensure' => 'file', - 'require' => "Exec[add-apt-repository-#{t}]" - ) - } - end - end - describe 'without a proxy defined' do - let :title do - 'rspec_ppa' - end - let :pre_condition do - 'class { "apt": - proxy_host => false - }' - end - let :filename do - "#{title}-#{release}.list" - end - - it { should contain_exec("add-apt-repository-#{title}").with( - 'environment' => [], - 'command' => "/usr/bin/add-apt-repository #{options} #{title}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - end - - describe 'behind a proxy' do - let :title do - 'rspec_ppa' - end - let :pre_condition do - 'class { "apt": - proxy_host => "user:pass@proxy", - }' - end - let :filename do - "#{title}-#{release}.list" - end - - it { should contain_exec("add-apt-repository-#{title}").with( - 'environment' => [ - "http_proxy=http://user:pass@proxy:8080", - "https_proxy=http://user:pass@proxy:8080", - ], - 'command' => "/usr/bin/add-apt-repository #{options} #{title}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - end - end - end - - [ { :lsbdistcodename => 'natty', - :package => 'python-software-properties' }, - { :lsbdistcodename => 'quantal', - :package => 'software-properties-common'}, - ].each do |platform| - context "on #{platform[:lsbdistcodename]}" do - describe "it should not error if package['#{platform[:package]}'] is already defined" do - let :pre_condition do - 'class {"apt": }' + - 'package { "#{platform[:package]}": }->Apt::Ppa["ppa"]' - end - let :facts do - {:lsbdistcodename => '#{platform[:lsbdistcodename]}', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu'} - end - let(:title) { "ppa" } - let(:release) { "#{platform[:lsbdistcodename]}" } - it { should contain_package('#{platform[:package]}') } - end - end - end - - describe "without Class[apt] should raise a Puppet::Error" do - let(:release) { "natty" } - let(:title) { "ppa" } - it { expect { should contain_apt__ppa(title) }.to raise_error(Puppet::Error) } - end - - describe "without release should raise a Puppet::Error" do - let(:title) { "ppa:" } - it { expect { should contain_apt__ppa(:release) }.to raise_error(Puppet::Error) } - end -end diff --git a/puphpet/puppet/modules/apt/spec/defines/source_spec.rb b/puphpet/puppet/modules/apt/spec/defines/source_spec.rb deleted file mode 100644 index 9da8b235..00000000 --- a/puphpet/puppet/modules/apt/spec/defines/source_spec.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'spec_helper' -describe 'apt::source', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - 'my_source' - end - - let :default_params do - { - :ensure => 'present', - :location => '', - :release => 'karmic', - :repos => 'main', - :include_src => true, - :required_packages => false, - :key => false, - :key_server => 'keyserver.ubuntu.com', - :key_content => false, - :key_source => false, - :pin => false - } - end - - [{}, - { - :location => 'http://example.com', - :release => 'precise', - :repos => 'security', - :include_src => false, - :required_packages => 'apache', - :key => 'key_name', - :key_server => 'keyserver.debian.com', - :pin => '600', - :key_content => 'ABCD1234' - }, - { - :key => 'key_name', - :key_server => 'keyserver.debian.com', - :key_content => false, - }, - { - :ensure => 'absent', - :location => 'http://example.com', - :release => 'precise', - :repos => 'security', - }, - { - :release => '', - }, - { - :release => 'custom', - }, - { - :architecture => 'amd64', - } - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do - let :param_hash do - default_params.merge(param_set) - end - - let :facts do - {:lsbdistcodename => 'karmic', :lsbdistid => 'Ubuntu'} - end - - let :params do - param_set - end - - let :filename do - "/etc/apt/sources.list.d/#{title}.list" - end - - let :content do - content = "# #{title}" - if param_hash[:architecture] - arch = "[arch=#{param_hash[:architecture]}] " - end - content << "\ndeb #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" - - if param_hash[:include_src] - content << "deb-src #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" - end - content - end - - it { should contain_apt__params } - - it { should contain_file("#{title}.list").with({ - 'ensure' => param_hash[:ensure], - 'path' => filename, - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'content' => content, - }) - } - - it { - if param_hash[:pin] - should contain_apt__pin(title).with({ - "priority" => param_hash[:pin], - "before" => "File[#{title}.list]" - }) - else - should_not contain_apt__pin(title).with({ - "priority" => param_hash[:pin], - "before" => "File[#{title}.list]" - }) - end - } - - it { - should contain_exec("apt_update").with({ - "command" => "/usr/bin/apt-get update", - "refreshonly" => true - }) - } - - it { - if param_hash[:required_packages] - should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", - "subscribe" => "File[#{title}.list]", - "refreshonly" => true, - "before" => 'Exec[apt_update]', - }) - else - should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", - "subscribe" => "File[#{title}.list]", - "refreshonly" => true - }) - end - } - - it { - if param_hash[:key] - should contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ - "key" => param_hash[:key], - "ensure" => :present, - "key_server" => param_hash[:key_server], - "key_content" => param_hash[:key_content], - "key_source" => param_hash[:key_source], - "before" => "File[#{title}.list]" - }) - else - should_not contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ - "key" => param_hash[:key], - "ensure" => :present, - "key_server" => param_hash[:key_server], - "key_content" => param_hash[:key_content], - "key_source" => param_hash[:key_source], - "before" => "File[#{title}.list]" - }) - end - } - end - end - describe "without release should raise a Puppet::Error" do - let(:default_params) { Hash.new } - let(:facts) { Hash.new } - it { expect { should raise_error(Puppet::Error) } } - let(:facts) { { :lsbdistcodename => 'lucid', :lsbdistid => 'Ubuntu' } } - it { should contain_apt__source(title) } - end -end diff --git a/puphpet/puppet/modules/apt/spec/spec_helper.rb b/puphpet/puppet/modules/apt/spec/spec_helper.rb deleted file mode 100644 index 2c6f5664..00000000 --- a/puphpet/puppet/modules/apt/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb b/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb deleted file mode 100644 index 3352564c..00000000 --- a/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'beaker-rspec' - -# Install Puppet -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris'] - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'apt') - hosts.each do |host| - shell('/bin/touch /etc/puppet/hiera.yaml') - shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] }) - end - end -end diff --git a/puphpet/puppet/modules/apt/templates/10periodic.erb b/puphpet/puppet/modules/apt/templates/10periodic.erb deleted file mode 100644 index 5737c9ac..00000000 --- a/puphpet/puppet/modules/apt/templates/10periodic.erb +++ /dev/null @@ -1,12 +0,0 @@ -APT::Periodic::Enable "<%= @enable %>"; -APT::Periodic::BackUpArchiveInterval "<%= @backup_interval %>"; -APT::Periodic::BackUpLevel "<%= @backup_level %>"; -APT::Periodic::MaxAge "<%= @max_age %>"; -APT::Periodic::MinAge "<%= @min_age %>"; -APT::Periodic::MaxSize "<%= @max_size %>"; -APT::Periodic::Update-Package-Lists "<%= @update %>"; -APT::Periodic::Download-Upgradeable-Packages "<%= @download %>"; -APT::Periodic::Download-Upgradeable-Packages-Debdelta "<%= @download_delta %>"; -APT::Periodic::Unattended-Upgrade "<%= @upgrade %>"; -APT::Periodic::AutocleanInterval "<%= @autoclean %>"; -APT::Periodic::Verbose "<%= @verbose %>"; diff --git a/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb b/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb deleted file mode 100644 index 4df0f744..00000000 --- a/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb +++ /dev/null @@ -1,53 +0,0 @@ -// Automatically upgrade packages from these (origin:archive) pairs -Unattended-Upgrade::Allowed-Origins { -<% @origins.each do |origin| -%> - "<%= origin %>"; -<% end -%> -}; - -// List of packages to not update -Unattended-Upgrade::Package-Blacklist { -<% @blacklist.each do |package| -%> - "<%= package %>"; -<% end -%> -}; - -// This option allows you to control if on a unclean dpkg exit -// unattended-upgrades will automatically run -// dpkg --force-confold --configure -a -// The default is true, to ensure updates keep getting installed -Unattended-Upgrade::AutoFixInterruptedDpkg "<%= @auto_fix %>"; - -// Split the upgrade into the smallest possible chunks so that -// they can be interrupted with SIGUSR1. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade -// is running is possible (with a small delay) -Unattended-Upgrade::MinimalSteps "<%= @minimal_steps %>"; - -// Install all unattended-upgrades when the machine is shuting down -// instead of doing it in the background while the machine is running -// This will (obviously) make shutdown slower -Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown %>"; - -// Send email to this address for problems or packages upgrades -// If empty or unset then no email is sent, make sure that you -// have a working mail setup on your system. A package that provides -// 'mailx' must be installed. -<% if @mail_to != "NONE" %>Unattended-Upgrade::Mail "<%= @mail_to %>";<% end %> - -// Set this value to "true" to get emails only on errors. Default -// is to always send a mail if Unattended-Upgrade::Mail is set -<% if @mail_to != "NONE" %>Unattended-Upgrade::MailOnlyOnError "<%= @mail_only_on_error %>";<% end %> - -// Do automatic removal of new unused dependencies after the upgrade -// (equivalent to apt-get autoremove) -Unattended-Upgrade::Remove-Unused-Dependencies "<%= @remove_unused %>"; - -// Automatically reboot *WITHOUT CONFIRMATION* if a -// the file /var/run/reboot-required is found after the upgrade -Unattended-Upgrade::Automatic-Reboot "<%= @auto_reboot %>"; - - -// Use apt bandwidth limit feature, this example limits the download -// speed to 70kb/sec -<% if @dl_limit != "NONE" %>Acquire::http::Dl-Limit "<%= @dl_limit %>";<% end %> diff --git a/puphpet/puppet/modules/apt/templates/pin.pref.erb b/puphpet/puppet/modules/apt/templates/pin.pref.erb deleted file mode 100644 index eed0c10d..00000000 --- a/puphpet/puppet/modules/apt/templates/pin.pref.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%- -@pin = "release a=#{@name}" # default value -if @pin_release.length > 0 - options = [] - options.push("a=#{@release}") if @release.length > 0 - options.push("n=#{@codename}") if @codename.length > 0 - options.push("v=#{@release_version}") if @release_version.length > 0 - options.push("c=#{@component}") if @component.length > 0 - options.push("o=#{@originator}") if @originator.length > 0 - options.push("l=#{@label}") if @label.length > 0 - @pin = "release #{options.join(', ')}" -elsif @version.length > 0 - @pin = "version #{@version}" -elsif @origin.length > 0 - @pin = "origin #{@origin}" -end --%> -# <%= @name %> -Explanation: <%= @explanation %> -Package: <%= @packages %> -Pin: <%= @pin %> -Pin-Priority: <%= @priority %> diff --git a/puphpet/puppet/modules/apt/templates/source.list.erb b/puphpet/puppet/modules/apt/templates/source.list.erb deleted file mode 100644 index 9946966e..00000000 --- a/puphpet/puppet/modules/apt/templates/source.list.erb +++ /dev/null @@ -1,5 +0,0 @@ -# <%= @name %> -deb <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> -<%- if @include_src then -%> -deb-src <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> -<%- end -%> diff --git a/puphpet/puppet/modules/apt/tests/builddep.pp b/puphpet/puppet/modules/apt/tests/builddep.pp deleted file mode 100644 index 8b4f7964..00000000 --- a/puphpet/puppet/modules/apt/tests/builddep.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -apt::builddep{ 'glusterfs-server': } diff --git a/puphpet/puppet/modules/apt/tests/debian/testing.pp b/puphpet/puppet/modules/apt/tests/debian/testing.pp deleted file mode 100644 index 8245b3a3..00000000 --- a/puphpet/puppet/modules/apt/tests/debian/testing.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -class { 'apt::debian::testing': } diff --git a/puphpet/puppet/modules/apt/tests/debian/unstable.pp b/puphpet/puppet/modules/apt/tests/debian/unstable.pp deleted file mode 100644 index 86051792..00000000 --- a/puphpet/puppet/modules/apt/tests/debian/unstable.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -class { 'apt::debian::unstable': } diff --git a/puphpet/puppet/modules/apt/tests/force.pp b/puphpet/puppet/modules/apt/tests/force.pp deleted file mode 100644 index 59ad8f1b..00000000 --- a/puphpet/puppet/modules/apt/tests/force.pp +++ /dev/null @@ -1,17 +0,0 @@ -# force.pp - -# force a package from a specific release -apt::force { 'package1': - release => 'backports', -} - -# force a package to be a specific version -apt::force { 'package2': - version => '1.0.0-1', -} - -# force a package from a specific release to be a specific version -apt::force { 'package3': - release => 'sid', - version => '2.0.0-1', -} diff --git a/puphpet/puppet/modules/apt/tests/init.pp b/puphpet/puppet/modules/apt/tests/init.pp deleted file mode 100644 index abc75afa..00000000 --- a/puphpet/puppet/modules/apt/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'apt': } diff --git a/puphpet/puppet/modules/apt/tests/key.pp b/puphpet/puppet/modules/apt/tests/key.pp deleted file mode 100644 index 79e0e1b7..00000000 --- a/puphpet/puppet/modules/apt/tests/key.pp +++ /dev/null @@ -1,6 +0,0 @@ -# Declare Apt key for apt.puppetlabs.com source -apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - key_options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', -} diff --git a/puphpet/puppet/modules/apt/tests/params.pp b/puphpet/puppet/modules/apt/tests/params.pp deleted file mode 100644 index 5ddf3c65..00000000 --- a/puphpet/puppet/modules/apt/tests/params.pp +++ /dev/null @@ -1 +0,0 @@ -include apt::params diff --git a/puphpet/puppet/modules/apt/tests/pin.pp b/puphpet/puppet/modules/apt/tests/pin.pp deleted file mode 100644 index 6a9024c2..00000000 --- a/puphpet/puppet/modules/apt/tests/pin.pp +++ /dev/null @@ -1,5 +0,0 @@ -# pin a release in apt, useful for unstable repositories -apt::pin { 'foo': - packages => '*', - priority => 0, -} diff --git a/puphpet/puppet/modules/apt/tests/ppa.pp b/puphpet/puppet/modules/apt/tests/ppa.pp deleted file mode 100644 index e728f6f1..00000000 --- a/puphpet/puppet/modules/apt/tests/ppa.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apt': } - -# Example declaration of an Apt PPA -apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': } diff --git a/puphpet/puppet/modules/apt/tests/release.pp b/puphpet/puppet/modules/apt/tests/release.pp deleted file mode 100644 index 823f5861..00000000 --- a/puphpet/puppet/modules/apt/tests/release.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apt': } -class { 'apt::release': - release_id => 'karmic' -} diff --git a/puphpet/puppet/modules/apt/tests/source.pp b/puphpet/puppet/modules/apt/tests/source.pp deleted file mode 100644 index c20b5966..00000000 --- a/puphpet/puppet/modules/apt/tests/source.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Declare the apt class to manage /etc/apt/sources.list and /etc/sources.list.d -class { 'apt': } - -# Install the puppetlabs apt source -# Release is automatically obtained from lsbdistcodename fact if available. -apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', -} - -# test two sources with the same key -apt::source { 'debian_testing': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'testing', - repos => 'main contrib non-free', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', -} -apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', -} diff --git a/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp b/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp deleted file mode 100644 index 3b9b49eb..00000000 --- a/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp +++ /dev/null @@ -1 +0,0 @@ -include apt::unattended_upgrades diff --git a/puphpet/puppet/modules/beanstalkd/.travis.yml b/puphpet/puppet/modules/beanstalkd/.travis.yml deleted file mode 100644 index 78894640..00000000 --- a/puphpet/puppet/modules/beanstalkd/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: ruby -rvm: - - "1.8.7" -# life with later versions of ruby gets interesting with 2.6..so lets -# ignore them for now -# - "1.9.2" -# - "1.9.3" -# - ruby-head ..that doesnt work. would be nice to do "current" - -env: -#find versions here https://rubygems.org/gems/puppet/versions -# spec_helper pretty much fails on these earlier versions. -# - PUPPET_VERSION=0.24.5 -# - PUPPET_VERSION=0.25.5 - - PUPPET_VERSION=2.6.18 - - PUPPET_VERSION=2.7.21 - - PUPPET_VERSION=3.1.1 - - -before_script: - - cd beanstalkd - - bundle install - - bundle show - -script: - - bundle exec rake diff --git a/puphpet/puppet/modules/beanstalkd/Gemfile b/puphpet/puppet/modules/beanstalkd/Gemfile deleted file mode 100644 index c9aabd4b..00000000 --- a/puphpet/puppet/modules/beanstalkd/Gemfile +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' - -puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] - - -gem 'rake' -gem 'rspec-expectations' -gem 'rspec' -gem 'facter' -gem 'puppet', puppetversion -gem 'rspec-puppet' -gem 'puppetlabs_spec_helper' diff --git a/puphpet/puppet/modules/beanstalkd/README.md b/puphpet/puppet/modules/beanstalkd/README.md deleted file mode 100644 index 6abbcb7f..00000000 --- a/puphpet/puppet/modules/beanstalkd/README.md +++ /dev/null @@ -1,68 +0,0 @@ -puppet-beanstalkd -================= -[![Build Status](https://travis-ci.org/keen99/puppet-beanstalkd.png?branch=master)](https://travis-ci.org/keen99/puppet-beanstalkd) - -puppet module for managing beanstalkd, a simple and fast work queue - https://github.com/kr/beanstalkd - - -## Supported OSes - -redhat/centos and debian/ubuntu currently. Please PR updates for others! - -Requires packages (rpm, etc) with traditional init scripts supported by service{} for your OS. - - -## Basic Usage - -Drop the beanstalkd directory into your modules tree and realize the define: - - beanstalkd::config{"my beanstalk install": } - -## Optional parameters - - listenaddress => '0.0.0.0', - listenport => '13000', - maxjobsize => '65535', - maxconnections => '1024', - binlogdir => '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - binlogfsync => undef, - binlogsize => '10485760', - ensure => 'running', # running, stopped, absent - packageversion => 'latest', # latest, present, or specific version - packagename => undef, # override package name - servicename => undef # override service name - - - - - -## Tests - -To run unit tests, cd into beanstalkd and execute "run-tests.sh" - -Requires ruby and bundler, everything else should get installed by the test. - -``` -$$ puppet-beanstalkd/beanstalkd# ./run-tests.sh -Using rake (10.0.4) -Using diff-lcs (1.2.4) -Using facter (1.7.0) -Using json_pure (1.7.7) -Using hiera (1.2.1) -Using metaclass (0.0.1) -Using mocha (0.13.3) -Using puppet (3.1.1) -Using rspec-core (2.13.1) -Using rspec-expectations (2.13.0) -Using rspec-mocks (2.13.1) -Using rspec (2.13.0) -Using rspec-puppet (0.1.6) -Using puppetlabs_spec_helper (0.4.1) -Using bundler (1.1.4) -Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. -/usr/bin/ruby1.9.1 -S rspec spec/defines/config_spec.rb -................... - -Finished in 0.84772 seconds -19 examples, 0 failures -``` diff --git a/puphpet/puppet/modules/beanstalkd/Rakefile b/puphpet/puppet/modules/beanstalkd/Rakefile deleted file mode 100644 index f6d5a0c4..00000000 --- a/puphpet/puppet/modules/beanstalkd/Rakefile +++ /dev/null @@ -1,10 +0,0 @@ -require 'rake' - -require 'rspec/core/rake_task' - -task :default => [:spec] - - -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = 'spec/*/*_spec.rb' -end diff --git a/puphpet/puppet/modules/beanstalkd/manifests/init.pp b/puphpet/puppet/modules/beanstalkd/manifests/init.pp deleted file mode 100644 index fc57ab85..00000000 --- a/puphpet/puppet/modules/beanstalkd/manifests/init.pp +++ /dev/null @@ -1,124 +0,0 @@ - -# usage: -# -# beanstalkd::config { name: -# listenaddress => '0.0.0.0', -# listenport => '13000', -# maxjobsize => '65535', -# maxconnections => '1024', -# binlogdir => '/var/lib/beanstalkd/binlog', -# binlogfsync => undef, -# binlogsize => '10485760', -# ensure => 'running', # running, stopped, absent -# packageversion => 'latest', # latest, present, or specific version -# packagename => undef, # override package name -# servicename => undef # override service name -# } - - -define beanstalkd::config ( # name - $listenaddress = '0.0.0.0', - $listenport = '13000', - $maxjobsize = '65535', - $maxconnections = '1024', # results in open file limit - $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - $binlogfsync = undef, # unset = no explicit fsync - $binlogsize = '10485760', - # - $ensure = 'running', # running, stopped, absent - $packageversion = 'latest', # latest, present, or specific version - $packagename = undef, # got your own custom package? override the default name/service here. - $servicename = undef -) { - - case $::operatingsystem { - ubuntu, debian: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/default/beanstalkd' - $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - centos, redhat: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/sysconfig/beanstalkd' - $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - # TODO: add more OS support! - default: { - fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") - } - } - - # simply the users experience for running/stopped/absent, and use ensure to cover those bases - case $ensure { - absent: { - $ourpackageversion = 'absent' - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'absent' - } - running: { - $serviceenable = 'true' - $serviceensure = 'running' - $fileensure = 'present' - } - stopped: { - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'present' - } - default: { - fail("ERROR [${module_name}]: enable must be one of: running stopped absent") - } - } - - # for packageversion, use what's configured unless we're set (which should only be in the absent case..) - if ! $ourpackageversion { - $ourpackageversion = $packageversion - } - - # for service and package name - if we've specified one, use it. else use the default - if $packagename == undef { - $ourpackagename = $defaultpackagename - } else { - $ourpackagename = $packagename - } - - if $servicename == undef { - $ourservicename = $defaultservicename - } else { - $ourservicename = $servicename - } - - package { $ourpackagename: - ensure => $ourpackageversion - } - - service { $ourservicename: - enable => $serviceenable, - ensure => $serviceensure, - hasstatus => $hasstatus, - restart => $restart, - subscribe => [ - Package[$ourpackagename], - File[$configfile] - ], - } - - file { $configfile: - content => template($configtemplate), - owner => 'root', - group => 'root', - mode => 0644, - ensure => $fileensure, - require => Package[$ourpackagename], - } - -} diff --git a/puphpet/puppet/modules/beanstalkd/run-tests.sh b/puphpet/puppet/modules/beanstalkd/run-tests.sh deleted file mode 100644 index 89896b94..00000000 --- a/puphpet/puppet/modules/beanstalkd/run-tests.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env sh - -bundle="bundle" -gotbundle=0 -for i in $(echo "$PATH" | tr ":" " ") - do - if [ -e $i/$bundle ] - then - gotbundle=1 - break - fi -done -if [ $gotbundle = 0 ] - then - echo "ERROR: please install 'bundler' for ruby from http://gembundler.com/ and make sure '$bundle' is in your path" - exit 1 -fi - -$bundle install || exit $? -$bundle exec rake || exit $? diff --git a/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb b/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb deleted file mode 100644 index e70c3fe4..00000000 --- a/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'spec_helper' - - -describe 'beanstalkd::config' do - let (:title) {'a title is required'} - - #basic OS support testing - context "on Debian" do - let (:facts) { { :operatingsystem => 'debian' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on redhat" do - let (:facts) { { :operatingsystem => 'debian' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on ubuntu" do - let (:facts) { { :operatingsystem => 'ubuntu' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on centos" do - let (:facts) { { :operatingsystem => 'centos' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on unsupported OS" do - let (:facts) { { :operatingsystem => 'unsupported' } } - it { expect { raise_error(Puppet::Error) } } - end - - #now lets test our various parameters - for the most part this shouldn't care what OS it is - #if your OS support needs more specific testing, do it! - - #ensure testing - remember this does both service and packages, so test both - context "on redhat, ensure absent" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'absent' } } - it { should contain_package('beanstalkd').with_ensure('absent') } - it { should contain_service('beanstalkd').with_ensure('stopped') } - end - context "on redhat, ensure running" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'running' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on redhat, ensure stopped" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'stopped' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('stopped') } - end - context "on redhat, ensure broken" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'broken' } } - it { expect { raise_error(Puppet::Error) } } - end - - #custom package/service names - context "on redhat, servicename testbeans" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :servicename => 'testbeans' } } - it { should contain_service('testbeans').with_ensure('running') } - end - context "on redhat, packagename testbeans" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :packagename => 'testbeans' } } - it { should contain_package('testbeans').with_ensure('latest') } - end - #and custom version - context "on redhat, package version" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :packageversion => 'testversion' } } - it { should contain_package('beanstalkd').with_ensure('testversion') } - end - - -end diff --git a/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp b/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp deleted file mode 100644 index e69de29b..00000000 diff --git a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp b/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp deleted file mode 100644 index fc57ab85..00000000 --- a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp +++ /dev/null @@ -1,124 +0,0 @@ - -# usage: -# -# beanstalkd::config { name: -# listenaddress => '0.0.0.0', -# listenport => '13000', -# maxjobsize => '65535', -# maxconnections => '1024', -# binlogdir => '/var/lib/beanstalkd/binlog', -# binlogfsync => undef, -# binlogsize => '10485760', -# ensure => 'running', # running, stopped, absent -# packageversion => 'latest', # latest, present, or specific version -# packagename => undef, # override package name -# servicename => undef # override service name -# } - - -define beanstalkd::config ( # name - $listenaddress = '0.0.0.0', - $listenport = '13000', - $maxjobsize = '65535', - $maxconnections = '1024', # results in open file limit - $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - $binlogfsync = undef, # unset = no explicit fsync - $binlogsize = '10485760', - # - $ensure = 'running', # running, stopped, absent - $packageversion = 'latest', # latest, present, or specific version - $packagename = undef, # got your own custom package? override the default name/service here. - $servicename = undef -) { - - case $::operatingsystem { - ubuntu, debian: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/default/beanstalkd' - $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - centos, redhat: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/sysconfig/beanstalkd' - $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - # TODO: add more OS support! - default: { - fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") - } - } - - # simply the users experience for running/stopped/absent, and use ensure to cover those bases - case $ensure { - absent: { - $ourpackageversion = 'absent' - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'absent' - } - running: { - $serviceenable = 'true' - $serviceensure = 'running' - $fileensure = 'present' - } - stopped: { - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'present' - } - default: { - fail("ERROR [${module_name}]: enable must be one of: running stopped absent") - } - } - - # for packageversion, use what's configured unless we're set (which should only be in the absent case..) - if ! $ourpackageversion { - $ourpackageversion = $packageversion - } - - # for service and package name - if we've specified one, use it. else use the default - if $packagename == undef { - $ourpackagename = $defaultpackagename - } else { - $ourpackagename = $packagename - } - - if $servicename == undef { - $ourservicename = $defaultservicename - } else { - $ourservicename = $servicename - } - - package { $ourpackagename: - ensure => $ourpackageversion - } - - service { $ourservicename: - enable => $serviceenable, - ensure => $serviceensure, - hasstatus => $hasstatus, - restart => $restart, - subscribe => [ - Package[$ourpackagename], - File[$configfile] - ], - } - - file { $configfile: - content => template($configtemplate), - owner => 'root', - group => 'root', - mode => 0644, - ensure => $fileensure, - require => Package[$ourpackagename], - } - -} diff --git a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb deleted file mode 100644 index 9aae80fb..00000000 --- a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to -##hack up the debian init script. -keen99 4/2013 - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - - -options="" - -##the debian init script leaves everything to be desired. so lets put our setup logic here. - -case "$1" in - start|restart|force-reload|reload) - exec=$DAEMON - [ -x $exec ] || exit 5 - - # if not running, start it up here, usually something like "daemon $exec" - options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" - if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then - options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" - fi - - if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then - if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then - echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" - mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} - fi - options="${options} -b ${BEANSTALKD_BINLOG_DIR}" - if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then - options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" - else - options="${options} -F" - fi - if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then - options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" - fi - - ##1.4.6 at least is prone to leave a lock file around after shutting down - ##this breaks startup after upgrade to 1.5, so work around this - ##unknown if this happens w/o binlog enabled... - #check for stale lock file in binlog - if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] - then - if ! ps xa| grep -v grep | grep -q $exec - then - echo "found old lock file and beanstalk isn't running - deleting it" - rm -f ${BEANSTALKD_BINLOG_DIR}/lock - fi - fi - fi - - if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then - #increase open files ulimit to support higher concurrent connections - echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" - ulimit -n $BEANSTALKD_MAXCONNECTIONS - fi - ;; - *) - #nothing, please keep moving - ;; -esac - - -DAEMON_OPTS="$options" -DAEMONUSER=$BEANSTALKD_USER - - -## Uncomment to enable startup during boot. -START=yes - diff --git a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb deleted file mode 100644 index 6e3bb422..00000000 --- a/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb +++ /dev/null @@ -1,56 +0,0 @@ -# System configuration for the beanstalkd daemon - -# Available options correspond to the options to the -# beanstalkd commandline. - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - diff --git a/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb b/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb deleted file mode 100644 index d3923f83..00000000 --- a/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'rspec-puppet' - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') -end diff --git a/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb deleted file mode 100644 index 9aae80fb..00000000 --- a/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh -##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to -##hack up the debian init script. -keen99 4/2013 - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - - -options="" - -##the debian init script leaves everything to be desired. so lets put our setup logic here. - -case "$1" in - start|restart|force-reload|reload) - exec=$DAEMON - [ -x $exec ] || exit 5 - - # if not running, start it up here, usually something like "daemon $exec" - options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" - if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then - options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" - fi - - if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then - if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then - echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" - mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} - fi - options="${options} -b ${BEANSTALKD_BINLOG_DIR}" - if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then - options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" - else - options="${options} -F" - fi - if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then - options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" - fi - - ##1.4.6 at least is prone to leave a lock file around after shutting down - ##this breaks startup after upgrade to 1.5, so work around this - ##unknown if this happens w/o binlog enabled... - #check for stale lock file in binlog - if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] - then - if ! ps xa| grep -v grep | grep -q $exec - then - echo "found old lock file and beanstalk isn't running - deleting it" - rm -f ${BEANSTALKD_BINLOG_DIR}/lock - fi - fi - fi - - if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then - #increase open files ulimit to support higher concurrent connections - echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" - ulimit -n $BEANSTALKD_MAXCONNECTIONS - fi - ;; - *) - #nothing, please keep moving - ;; -esac - - -DAEMON_OPTS="$options" -DAEMONUSER=$BEANSTALKD_USER - - -## Uncomment to enable startup during boot. -START=yes - diff --git a/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb deleted file mode 100644 index 6e3bb422..00000000 --- a/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb +++ /dev/null @@ -1,56 +0,0 @@ -# System configuration for the beanstalkd daemon - -# Available options correspond to the options to the -# beanstalkd commandline. - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - diff --git a/puphpet/puppet/modules/composer/.fixtures.yml b/puphpet/puppet/modules/composer/.fixtures.yml deleted file mode 100644 index c0123415..00000000 --- a/puphpet/puppet/modules/composer/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - git: "git://github.com/puppetlabs/puppetlabs-git" - symlinks: - composer: "#{source_dir}" diff --git a/puphpet/puppet/modules/composer/.travis.yml b/puphpet/puppet/modules/composer/.travis.yml deleted file mode 100644 index 033f11dd..00000000 --- a/puphpet/puppet/modules/composer/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: ruby -rvm: - - 1.9.3 -before_script: -after_script: -script: "bundle exec rake spec" -env: - - PUPPET_VERSION=2.7.23 - - PUPPET_VERSION=3.0.2 - - PUPPET_VERSION=3.2.4 - - PUPPET_VERSION=3.3.0 -notifications: - email: false diff --git a/puphpet/puppet/modules/composer/CHANGELOG.md b/puphpet/puppet/modules/composer/CHANGELOG.md deleted file mode 100644 index bd8105b1..00000000 --- a/puphpet/puppet/modules/composer/CHANGELOG.md +++ /dev/null @@ -1,133 +0,0 @@ -v1.2.1 -====== -f44b7e5 Now also supports Amazon Linux (RedHat) - -9341805 Now `suhosin_enabled` parameter is correctly documented. - -v1.2.0 -====== -66b071a (HEAD, tag: 1.2.0, master) Bumping version to 1.2.0 - -166ec87 Updated README.md - -626ee43 (origin/master, origin/HEAD) Updated CHANGELOG format - -1364058 Moved CHANGELOG to markdown format - -6f21dcb Updated LICENSE file - -6209eb8 Added CHANGELOG file - -6307d5a Add parameter 'php_bin' to override name or path of php binary - -9e484e9 (origin/rspec_head_fixes, rspec_head_fixes) just match on errorname, not specific exception - -db4176e update specs for latest rspec-puppet 1.0.1+ - -v1.1.1 -====== -17b2309 (tag: 1.1.1) Update Modulefile - -d848038 Used puppetlabs/git >= 0.0.2 - -0d75cff doc updates for 1.1.0 release - -v1.1.0 -====== -3b46e4d (tag: 1.1.0) bumping version to 1.1.0 for refreshonly and user features - -5290e8e support setting exec user for project and exec - -6af1e25 ignore puppet module package folder - -c2106ec Add refreshonly parameter to exec - -v1.0.1 -====== -fb1fd04 (tag: 1.0.1) Bumped version to 1.0.1 - -bf43913 (origin/deprecated_erb_variables) fix deprecated variables in the exec erb template - -342b898 (origin/documentation_refactor) document refactor, add spec test information - -3677acc adding tests for new suhosin_enable param and Debian family - -de86c0d Only run augeas commands if suhosin is enabled - -v1.0.0 -====== -f5d214a (tag: 1.0.0) Bumping version to 1.0.0 - -12589bf fixes for travis-ci building - -5279b92 spec testing using rspec-puppet - -3069608 documentation updates for composer_home and previous PRs - -b5faa45 add a composer_home fact and use it to set up environment - -v0.1.1 -====== -dbc0c74 Bumping version to 0.1.1 - -b4833d6 no-custom-installers is deprecated in favor of no-plugins - -acdc73c dry up the composer binary download code - -41f3a7b CentOS isn't actually an $::osfamily value - -d54c0db PHP binary is provided by php-cli on RHEL systems - -v0.1.0 -====== -1e8f9f1 (tag: 0.1.0) Adding License file. - -523c28f (igalic/option-names, igalic-option-names) update readme with the new options - -3d2ddda double-negating option names is confusing - -be518cf (igalic/style, igalic-style) Fix puppet lint complaints - -4050077 There's no need for these files to be executable - -522e93c Updated temp path. - -bf0f9e7 Support centos/redhat - -f45e9de Support redhat/centos - -920d1ca Support redhat/centos - -v0.0.6 -====== -78643ef (tag: 0.0.6) Bumping version to 0.0.6 - -0fbfb53 Fixing bug where global path is overwritten by local scope. - -v0.0.5 -====== -ee4e49b (tag: 0.0.5) Bumping version to 0.0.5 - -17ca5ee Added varaible composer path to exec calls. - -v0.0.4 -====== -e94be5e (tag: 0.0.4) Bumping version to 0.0.4 - -a27e45f Fixed dry_run parameter - -28cfee8 Adding version parameter to project task README - -v0.0.3 -====== -4787b24 Bumping version to 0.0.3 - -4ee9547 (tag: 0.0.3) Fixing type in exec manifest. - -v0.0.2 -====== -974d2ad (tag: 0.0.2) Bumping version to 0.0.2 - -667eb18 Fixed README - -925aa97 Fixed Modulefile. diff --git a/puphpet/puppet/modules/composer/Gemfile b/puphpet/puppet/modules/composer/Gemfile deleted file mode 100644 index 992fecaa..00000000 --- a/puphpet/puppet/modules/composer/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -#ruby=1.9.3@puppet-composer - -if ENV.key?('PUPPET_VERSION') - puppetversion = "= #{ENV['PUPPET_VERSION']}" -else - puppetversion = ['>= 2.7'] -end - -source 'https://rubygems.org' - -ruby '1.9.3' - -gem 'puppet', puppetversion -gem 'puppetlabs_spec_helper' -gem 'rspec-puppet', :github => 'rodjek/rspec-puppet', :ref => '03e94422fb9bbdd950d5a0bec6ead5d76e06616b' -gem 'mocha' -gem 'puppet-lint' diff --git a/puphpet/puppet/modules/composer/LICENSE b/puphpet/puppet/modules/composer/LICENSE deleted file mode 100644 index 3cff4803..00000000 --- a/puphpet/puppet/modules/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 - 2014 Thomas Ploch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/puphpet/puppet/modules/composer/Modulefile b/puphpet/puppet/modules/composer/Modulefile deleted file mode 100644 index b1a9c8c4..00000000 --- a/puphpet/puppet/modules/composer/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'tPl0ch-composer' -version '1.2.1' -dependency 'puppetlabs/git', '>= 0.0.2' -summary "This module provides the 'Composer' PHP dependency manager." -description "This module installs the 'Composer' PHP dependency manager and provides some custom types to create, update - and install projects. Until now the Debian and Redhat OS families are supported." -project_page "https://github.com/tPl0ch/puppet-composer" -author "tPl0ch - Thomas Ploch " diff --git a/puphpet/puppet/modules/composer/README.md b/puphpet/puppet/modules/composer/README.md deleted file mode 100644 index c142e258..00000000 --- a/puphpet/puppet/modules/composer/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# Composer Puppet Module - -[![Build Status](https://travis-ci.org/tPl0ch/puppet-composer.png?branch=master)](https://travis-ci.org/tPl0ch/puppet-composer) - -## Description - -The `puppet-composer` module installs the latest version of Composer from http://getcomposer.org. Composer is a dependency manager for PHP. - -## Supported Platforms - -* `Debian` -* `Redhat` -* `Centos` -* `Amazon Linux` - -## Installation - -#### Puppet Forge -We recommend installing using the Puppet Forge as it automatically satisfies dependencies. - - puppet module install --target-dir=/your/path/to/modules tPl0ch-composer - -#### Installation via git submodule -You can also install as a git submodule and handle the dependencies manually. See the [Dependencies](#dependencies) section below. - - git submodule add git://github.com/tPl0ch/puppet-composer.git modules/composer - -## Dependencies - -This module requires the following Puppet modules: - -* [`puppetlabs-git`](https://github.com/puppetlabs/puppetlabs-git/) - -And additional (for puppet version lower than 3.0.0) you need: - -* [`libaugeas`](http://augeas.net/) (For automatically updating php.ini settings for suhosin patch) - -## Usage -To install the `composer` binary globally in `/usr/local/bin` you only need to declare the `composer` class. We try to set some sane defaults. There are also a number of parameters you can tweak should the defaults not be sufficient. - -### Simple Include -To install the binary with the defaults you just need to include the following in your manifests: - - include composer - -### Full Include -Alternatively, you can set a number of options by declaring the class with parameters: - -```puppet -class { 'composer': - target_dir => '/usr/local/bin', - composer_file => 'composer', # could also be 'composer.phar' - download_method => 'curl', # or 'wget' - logoutput => false, - tmp_path => '/tmp', - php_package => 'php5-cli', - curl_package => 'curl', - wget_package => 'wget', - composer_home => '/root', - php_bin => 'php', # could also i.e. be 'php -d "apc.enable_cli=0"' for more fine grained control - suhosin_enabled => true, -} -``` - -### Creating Projects - -The `composer::project` definition provides a way to create projects in a target directory. - -```puppet -composer::project { 'silex': - project_name => 'fabpot/silex-skeleton', # REQUIRED - target_dir => '/vagrant/silex', # REQUIRED - version => '2.1.x-dev', # Some valid version string - prefer_source => true, - stability => 'dev', # Minimum stability setting - keep_vcs => false, # Keep the VCS information - dev => true, # Install dev dependencies - repository_url => 'http://repo.example.com', # Custom repository URL - user => undef, # Set the user to run as -} -``` - -#### Updating Packages - -The `composer::exec` definition provides a more generic wrapper arround composer `update` and `install` commands. The following example will update the `silex/silex` and `symfony/browser-kit` packages in the `/vagrant/silex` directory. You can omit `packages` to update the entire project. - -```puppet -composer::exec { 'silex-update': - cmd => 'update', # REQUIRED - cwd => '/vagrant/silex', # REQUIRED - packages => ['silex/silex', 'symfony/browser-kit'], # leave empty or omit to update whole project - prefer_source => false, # Only one of prefer_source or prefer_dist can be true - prefer_dist => false, # Only one of prefer_source or prefer_dist can be true - dry_run => false, # Just simulate actions - custom_installers => false, # No custom installers - scripts => false, # No script execution - interaction => false, # No interactive questions - optimize => false, # Optimize autoloader - dev => false, # Install dev dependencies - user => undef, # Set the user to run as - refreshonly => false, # Only run on refresh -} -``` - -#### Installing Packages - -We support the `install` command in addition to `update`. The install command will ignore the `packages` parameter and the following example is the equivalent to running `composer install` in the `/vagrant/silex` directory. - -```puppet -composer::exec { 'silex-install': - cmd => 'install', # REQUIRED - cwd => '/vagrant/silex', # REQUIRED - prefer_source => false, - prefer_dist => false, - dry_run => false, # Just simulate actions - custom_installers => false, # No custom installers - scripts => false, # No script execution - interaction => false, # No interactive questions - optimize => false, # Optimize autoloader - dev => false, # Install dev dependencies -} -``` - -## Development - -We have `rspec-puppet` and Travis CI setup for the project. To run the spec tests locally you need `bundler` installed: - -``` -gem install bundler -``` - -Then you can install the required gems: - -``` -bundle install -``` - -Finally, the tests can be run: - -``` -rake spec -``` - -## Contributing - -We welcome everyone to help develop this module. To contribute: - -* Fork this repository -* Add features and spec tests for them -* Commit to feature named branch -* Open a pull request outlining your changes and the reasoning for them - -## Todo - -* Add a `composer::require` type diff --git a/puphpet/puppet/modules/composer/Rakefile b/puphpet/puppet/modules/composer/Rakefile deleted file mode 100644 index 1a388518..00000000 --- a/puphpet/puppet/modules/composer/Rakefile +++ /dev/null @@ -1,2 +0,0 @@ -require 'puppet-lint/tasks/puppet-lint' -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/puphpet/puppet/modules/composer/lib/facter/composer_home.rb b/puphpet/puppet/modules/composer/lib/facter/composer_home.rb deleted file mode 100644 index b815cfa4..00000000 --- a/puphpet/puppet/modules/composer/lib/facter/composer_home.rb +++ /dev/null @@ -1,5 +0,0 @@ -Facter.add(:composer_home) do - setcode do - ENV['HOME'] - end -end diff --git a/puphpet/puppet/modules/composer/manifests/exec.pp b/puphpet/puppet/modules/composer/manifests/exec.pp deleted file mode 100644 index 82039e85..00000000 --- a/puphpet/puppet/modules/composer/manifests/exec.pp +++ /dev/null @@ -1,55 +0,0 @@ -# == Type: composer::exec -# -# Either installs from composer.json or updates project or specific packages -# -# === Authors -# -# Thomas Ploch -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -define composer::exec ( - $cmd, - $cwd, - $packages = [], - $prefer_source = false, - $prefer_dist = false, - $dry_run = false, - $custom_installers = false, - $scripts = false, - $optimize = false, - $interaction = false, - $dev = false, - $logoutput = false, - $verbose = false, - $refreshonly = false, - $user = undef, -) { - require composer - require git - - Exec { - path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", - environment => "COMPOSER_HOME=${composer::composer_home}", - user => $user, - } - - if $cmd != 'install' and $cmd != 'update' { - fail("Only types 'install' and 'update' are allowed, ${cmd} given") - } - - if $prefer_source and $prefer_dist { - fail('Only one of \$prefer_source or \$prefer_dist can be true.') - } - - $command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} ${cmd}" - - exec { "composer_update_${title}": - command => template('composer/exec.erb'), - cwd => $cwd, - logoutput => $logoutput, - refreshonly => $refreshonly - } -} diff --git a/puphpet/puppet/modules/composer/manifests/init.pp b/puphpet/puppet/modules/composer/manifests/init.pp deleted file mode 100644 index 5b3a4319..00000000 --- a/puphpet/puppet/modules/composer/manifests/init.pp +++ /dev/null @@ -1,156 +0,0 @@ -# == Class: composer -# -# The parameters for the composer class and corresponding definitions -# -# === Parameters -# -# Document parameters here. -# -# [*target_dir*] -# The target dir that composer should be installed to. -# Defaults to ```/usr/local/bin```. -# -# [*composer_file*] -# The name of the composer binary, which will reside in ```target_dir```. -# -# [*download_method*] -# Either ```curl``` or ```wget```. -# -# [*logoutput*] -# If the output should be logged. Defaults to FALSE. -# -# [*tmp_path*] -# Where the composer.phar file should be temporarily put. -# -# [*php_package*] -# The Package name of tht PHP CLI package. -# -# [*curl_package*] -# The name of the curl package to override the default set in the -# composer::params class. -# -# [*wget_package*] -# The name of the wget package to override the default set in the -# composer::params class. -# -# [*composer_home*] -# Folder to use as the COMPOSER_HOME environment variable. Default comes -# from our composer::params class which derives from our own $composer_home -# fact. The fact returns the current users $HOME environment variable. -# -# [*php_bin*] -# The name or path of the php binary to override the default set in the -# composer::params class. -# -# === Authors -# -# Thomas Ploch -# -class composer( - $target_dir = $composer::params::target_dir, - $composer_file = $composer::params::composer_file, - $download_method = $composer::params::download_method, - $logoutput = $composer::params::logoutput, - $tmp_path = $composer::params::tmp_path, - $php_package = $composer::params::php_package, - $curl_package = $composer::params::curl_package, - $wget_package = $composer::params::wget_package, - $composer_home = $composer::params::composer_home, - $php_bin = $composer::params::php_bin, - $suhosin_enabled = $composer::params::suhosin_enabled -) inherits composer::params { - - Exec { path => "/bin:/usr/bin/:/sbin:/usr/sbin:${target_dir}" } - - if defined(Package[$php_package]) == false { - package { $php_package: ensure => present, } - } - - # download composer - case $download_method { - 'curl': { - $download_command = "curl -s http://getcomposer.org/installer | ${composer::php_bin}" - $download_require = $suhosin_enabled ? { - true => [ Package['curl', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], - false => [ Package['curl', $php_package] ] - } - $method_package = $curl_package - } - 'wget': { - $download_command = 'wget http://getcomposer.org/composer.phar -O composer.phar' - $download_require = $suhosin_enabled ? { - true => [ Package['wget', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], - false => [ Package['wget', $php_package] ] - } - $method_package = $wget_package - } - default: { - fail("The param download_method ${download_method} is not valid. Please set download_method to curl or wget.") - } - } - - if defined(Package[$method_package]) == false { - package { $method_package: ensure => present, } - } - - exec { 'download_composer': - command => $download_command, - cwd => $tmp_path, - require => $download_require, - creates => "${tmp_path}/composer.phar", - logoutput => $logoutput, - } - - # check if directory exists - file { $target_dir: - ensure => directory, - } - - # move file to target_dir - file { "${target_dir}/${composer_file}": - ensure => present, - source => "${tmp_path}/composer.phar", - require => [ Exec['download_composer'], File[$target_dir] ], - mode => 0755, - } - - if $suhosin_enabled { - case $family { - - 'Redhat','Centos': { - - # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar - augeas { 'whitelist_phar': - context => '/files/etc/suhosin.ini/suhosin', - changes => 'set suhosin.executor.include.whitelist phar', - require => Package[$php_package], - } - - # set /etc/cli/php.ini/PHP/allow_url_fopen = On - augeas{ 'allow_url_fopen': - context => '/files/etc/php.ini/PHP', - changes => 'set allow_url_fopen On', - require => Package[$php_package], - } - - } - 'Debian': { - - # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar - augeas { 'whitelist_phar': - context => '/files/etc/php5/conf.d/suhosin.ini/suhosin', - changes => 'set suhosin.executor.include.whitelist phar', - require => Package[$php_package], - } - - # set /etc/php5/cli/php.ini/PHP/allow_url_fopen = On - augeas{ 'allow_url_fopen': - context => '/files/etc/php5/cli/php.ini/PHP', - changes => 'set allow_url_fopen On', - require => Package[$php_package], - } - - } - } - } -} diff --git a/puphpet/puppet/modules/composer/manifests/params.pp b/puphpet/puppet/modules/composer/manifests/params.pp deleted file mode 100644 index 54f752a4..00000000 --- a/puphpet/puppet/modules/composer/manifests/params.pp +++ /dev/null @@ -1,53 +0,0 @@ -# == Class: composer::params -# -# The parameters for the composer class and corresponding definitions -# -# === Authors -# -# Thomas Ploch -# Andrew Johnstone -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -class composer::params { - $composer_home = $::composer_home - - # Support Amazon Linux which is supported by RedHat family - if $::osfamily == 'Linux' and $::operatingsystem == 'Amazon' { - $family = 'RedHat' - } else { - $family = $::osfamily - } - - case $family { - 'Debian': { - $target_dir = '/usr/local/bin' - $composer_file = 'composer' - $download_method = 'curl' - $logoutput = false - $tmp_path = '/tmp' - $php_package = 'php5-cli' - $curl_package = 'curl' - $wget_package = 'wget' - $php_bin = 'php' - $suhosin_enabled = true - } - 'RedHat', 'Centos': { - $target_dir = '/usr/local/bin' - $composer_file = 'composer' - $download_method = 'curl' - $logoutput = false - $tmp_path = '/tmp' - $php_package = 'php-cli' - $curl_package = 'curl' - $wget_package = 'wget' - $php_bin = 'php' - $suhosin_enabled = true - } - default: { - fail("Unsupported platform: ${family}") - } - } -} diff --git a/puphpet/puppet/modules/composer/manifests/project.pp b/puphpet/puppet/modules/composer/manifests/project.pp deleted file mode 100644 index 594f67f1..00000000 --- a/puphpet/puppet/modules/composer/manifests/project.pp +++ /dev/null @@ -1,96 +0,0 @@ -# == Type: composer::project -# -# Installs a given project with composer create-project -# -# === Parameters -# -# Document parameters here. -# -# [*target_dir*] -# The target dir that composer should be installed to. -# Defaults to ```/usr/local/bin```. -# -# [*composer_file*] -# The name of the composer binary, which will reside in ```target_dir```. -# -# [*download_method*] -# Either ```curl``` or ```wget```. -# -# [*logoutput*] -# If the output should be logged. Defaults to FALSE. -# -# [*tmp_path*] -# Where the composer.phar file should be temporarily put. -# -# [*php_package*] -# The Package name of the PHP CLI package. -# -# [*user*] -# The user name to exec the composer commands as. Default is undefined. -# -# === Authors -# -# Thomas Ploch -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -define composer::project( - $project_name, - $target_dir, - $version = undef, - $dev = false, - $prefer_source = false, - $stability = 'dev', - $repository_url = undef, - $keep_vcs = false, - $tries = 3, - $timeout = 1200, - $user = undef, -) { - require git - require composer - - Exec { - path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", - environment => "COMPOSER_HOME=${composer::composer_home}", - user => $user, - } - - $exec_name = "composer_create_project_${title}" - $base_command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} --stability=${stability}" - $end_command = "${project_name} ${target_dir}" - - $dev_arg = $dev ? { - true => ' --dev', - default => '', - } - - $vcs = $keep_vcs? { - true => ' --keep-vcs', - default => '', - } - - $repo = $repository_url? { - undef => '', - default => " --repository-url=${repository_url}", - } - - $pref_src = $prefer_source? { - true => ' --prefer-source', - false => '' - } - - $v = $version? { - undef => '', - default => " ${version}", - } - - exec { $exec_name: - command => "${base_command}${dev_arg}${repo}${pref_src}${vcs} create-project ${end_command}${v}", - tries => $tries, - timeout => $timeout, - creates => $target_dir, - } -} diff --git a/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb b/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb deleted file mode 100644 index 914de711..00000000 --- a/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' - -describe 'composer::params' do - ['RedHat', 'Debian', 'Linux'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - :operatingsystem => 'Amazon', - } } - - it { should compile } - end - end -end diff --git a/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb b/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb deleted file mode 100644 index a34e335e..00000000 --- a/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'spec_helper' - -describe 'composer' do - ['RedHat', 'Debian', 'Linux'].each do |osfamily| - case osfamily - when 'RedHat' - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - when 'Linux' - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - when 'Debian' - php_package = 'php5-cli' - php_context = '/files/etc/php5/cli/php.ini/PHP' - suhosin_context = '/files/etc/php5/conf.d/suhosin.ini/suhosin' - else - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - end - - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - :operatingsystem => 'Amazon' - } } - - it { should contain_class('composer::params') } - - it { - should contain_exec('download_composer').with({ - :command => 'curl -s http://getcomposer.org/installer | php', - :cwd => '/tmp', - :creates => '/tmp/composer.phar', - :logoutput => false, - }) - } - - it { - should contain_augeas('whitelist_phar').with({ - :context => suhosin_context, - :changes => 'set suhosin.executor.include.whitelist phar', - }) - } - - it { - should contain_augeas('allow_url_fopen').with({ - :context => php_context, - :changes => 'set allow_url_fopen On', - }) - } - - context 'with default parameters' do - it 'should compile' do - compile - end - - it { should contain_package(php_package).with_ensure('present') } - it { should contain_package('curl').with_ensure('present') } - it { should contain_file('/usr/local/bin').with_ensure('directory') } - - it { - should contain_file('/usr/local/bin/composer').with({ - :source => 'present', - :source => '/tmp/composer.phar', - :mode => '0755', - }) - } - end - - context "on invalid operating system family" do - let(:facts) { { - :osfamily => 'Invalid', - :operatingsystem => 'Amazon' - } } - - it 'should not compile' do - expect { should compile }.to raise_error(/Unsupported platform: Invalid/) - end - end - - context 'with custom parameters' do - let(:params) { { - :target_dir => '/you_sir/lowcal/been', - :php_package => 'php8-cli', - :composer_file => 'compozah', - :curl_package => 'kerl', - :php_bin => 'pehpe', - :suhosin_enabled => false, - } } - - it 'should compile' do - compile - end - - it { should contain_package('php8-cli').with_ensure('present') } - it { should contain_package('kerl').with_ensure('present') } - it { should contain_file('/you_sir/lowcal/been').with_ensure('directory') } - - it { - should contain_file('/you_sir/lowcal/been/compozah').with({ - :source => 'present', - :source => '/tmp/composer.phar', - :mode => '0755', - }) - } - - it { should_not contain_augeas('whitelist_phar') } - it { should_not contain_augeas('allow_url_fopen') } - - end - end - end -end diff --git a/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb b/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb deleted file mode 100644 index 36a062f4..00000000 --- a/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'spec_helper' - -describe 'composer::exec' do - ['RedHat', 'Debian'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - } } - - context 'using install command' do - it { should contain_class('git') } - it { should contain_class('composer') } - - let(:title) { 'myproject' } - let(:params) { { - :cmd => 'install', - :cwd => '/my/awesome/project', - :user => 'linus', - } } - - it { - should contain_exec('composer_update_myproject').with({ - :command => %r{php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction}, - :cwd => '/my/awesome/project', - :user => 'linus', - :logoutput => false, - }) - } - end - - context 'using update command' do - it { should contain_class('git') } - it { should contain_class('composer') } - - let(:title) { 'yourpr0ject' } - let(:params) { { - :cmd => 'update', - :cwd => '/just/in/time', - :packages => ['package1', 'packageinf'], - :logoutput => true, - } } - - it { - should contain_exec('composer_update_yourpr0ject').without_user.with({ - :command => %r{php /usr/local/bin/composer update --no-plugins --no-scripts --no-interaction package1 packageinf}, - :cwd => '/just/in/time', - :logoutput => true, - }) - } - end - end - end - - context 'on unsupported operating system family' do - let(:facts) { { - :osfamily => 'Darwin', - } } - - let(:title) { 'someproject' } - - it 'should not compile' do - expect { should compile }.to raise_error(/Unsupported platform: Darwin/) - end - end -end diff --git a/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb b/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb deleted file mode 100644 index 624f9111..00000000 --- a/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'spec_helper' - -describe 'composer::project' do - ['RedHat', 'Debian'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - } } - - context 'with default params' do - let(:title) { 'myproject' } - let(:params) { { - :project_name => 'projectzzz', - :target_dir => '/my/subpar/project', - } } - - it { should contain_class('git') } - it { should contain_class('composer') } - - it { - should contain_exec('composer_create_project_myproject').without_user.with({ - :command => "php /usr/local/bin/composer --stability=dev create-project projectzzz /my/subpar/project", - :tries => 3, - :timeout => 1200, - :creates => '/my/subpar/project', - }) - } - end - - context 'with all custom params' do - let(:title) { 'whoadawg' } - let(:params) { { - :project_name => 'whoadawg99', - :target_dir => '/my/mediocre/project', - :version => '0.0.8', - :dev => true, - :prefer_source => true, - :stability => 'dev', - :repository_url => 'git@github.com:trollface/whoadawg.git', - :keep_vcs => true, - :tries => 2, - :timeout => 600, - :user => 'mrploch', - } } - - it { should contain_class('git') } - it { should contain_class('composer') } - - it { - should contain_exec('composer_create_project_whoadawg').with({ - :command => %r{php /usr/local/bin/composer --stability=dev --dev --repository-url=git@github.com:trollface/whoadawg.git --prefer-source --keep-vcs create-project whoadawg99 /my/mediocre/project 0.0.8}, - :tries => 2, - :timeout => 600, - :creates => '/my/mediocre/project', - :user => 'mrploch', - }) - } - end - end - end -end diff --git a/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp b/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp deleted file mode 100644 index d669ee38..00000000 --- a/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp +++ /dev/null @@ -1,8 +0,0 @@ -node default { - include composer - - composer::exec {'ohai': - cmd => 'install', - cwd => '/some/cool/dir', - } -} diff --git a/puphpet/puppet/modules/composer/spec/spec.opts b/puphpet/puppet/modules/composer/spec/spec.opts deleted file mode 100644 index 22420e39..00000000 --- a/puphpet/puppet/modules/composer/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace \ No newline at end of file diff --git a/puphpet/puppet/modules/composer/spec/spec_helper.rb b/puphpet/puppet/modules/composer/spec/spec_helper.rb deleted file mode 100644 index 2c6f5664..00000000 --- a/puphpet/puppet/modules/composer/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/puphpet/puppet/modules/composer/templates/exec.erb b/puphpet/puppet/modules/composer/templates/exec.erb deleted file mode 100644 index 960002f9..00000000 --- a/puphpet/puppet/modules/composer/templates/exec.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%= @command -%> -<% if @prefer_source %> --prefer-source<% end -%> -<% if @prefer_dist %> --prefer-dist<% end -%> -<% unless @custom_installers %> --no-plugins<% end -%> -<% unless @scripts %> --no-scripts<% end -%> -<% unless @interaction %> --no-interaction<% end -%> -<% if @dev %> --dev<% end -%> -<% if @verbose %> -v<% end -%> -<% if @dry_run %> --dry-run<% end -%> -<% if @cmd == 'update' -%> - <%- if @packages -%> - <%- @packages.each do |package| -%> - <%= ' ' + package -%> - <%- end -%> - <%- end -%> -<% end -%> - diff --git a/puphpet/puppet/modules/composer/tests/init.pp b/puphpet/puppet/modules/composer/tests/init.pp deleted file mode 100644 index 36afe85f..00000000 --- a/puphpet/puppet/modules/composer/tests/init.pp +++ /dev/null @@ -1,11 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation errors -# and view a log of events) or by fully applying the test in a virtual environment -# (to compare the resulting system state to the desired state). -# -# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html -# -include composer diff --git a/puphpet/puppet/modules/composer/tests/project.pp b/puphpet/puppet/modules/composer/tests/project.pp deleted file mode 100644 index 6208a5ee..00000000 --- a/puphpet/puppet/modules/composer/tests/project.pp +++ /dev/null @@ -1,23 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation errors -# and view a log of events) or by fully applying the test in a virtual environment -# (to compare the resulting system state to the desired state). -# -# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html -# - -composer::project { 'my_first_test': - project_name => 'fabpot/silex-skeleton', - target_dir => '/tmp/first_test', -} - -composer::project { 'my_second_test': - project_name => 'fabpot/silex-skeleton', - target_dir => '/tmp/second_test', - prefer_source => true, - stability => 'dev', -} - diff --git a/puphpet/puppet/modules/concat/.fixtures.yml b/puphpet/puppet/modules/concat/.fixtures.yml deleted file mode 100644 index dc6b41f8..00000000 --- a/puphpet/puppet/modules/concat/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - 'stdlib': - repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' - ref: '4.0.0' - symlinks: - 'concat': '#{source_dir}' diff --git a/puphpet/puppet/modules/concat/.gitattributes b/puphpet/puppet/modules/concat/.gitattributes deleted file mode 100644 index 2e05fd47..00000000 --- a/puphpet/puppet/modules/concat/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.sh eol=lf diff --git a/puphpet/puppet/modules/concat/.travis.yml b/puphpet/puppet/modules/concat/.travis.yml deleted file mode 100644 index 4e72cd4c..00000000 --- a/puphpet/puppet/modules/concat/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -# work around RubyGems 2.2.0 breaking ruby 1.8.7 -# https://github.com/rubygems/rubygems/pull/763 -# https://github.com/freerange/mocha/commit/66bab2a8f4e7cd8734bf88e6f32157c0d5153125 -before_install: - - gem update --system 2.1.11 - - gem --version -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - PUPPET_GEM_VERSION="~> 3.0" -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" -notifications: - email: false diff --git a/puphpet/puppet/modules/concat/CHANGELOG b/puphpet/puppet/modules/concat/CHANGELOG deleted file mode 100644 index c66b922d..00000000 --- a/puphpet/puppet/modules/concat/CHANGELOG +++ /dev/null @@ -1,127 +0,0 @@ -2014-05-14 1.1.0 - -Summary - -This release is primarily a bugfix release since 1.1.0-rc1. - -Features: -- Improved testing, with tests moved to beaker - -Bugfixes: -- No longer attempts to set fragment owner and mode on Windows -- Fix numeric sorting -- Fix incorrect quoting -- Fix newlines - -2014-01-03 1.1.0-rc1 - -Summary: - -This release of concat was 90% written by Joshua Hoblitt, and the module team -would like to thank him for the huge amount of work he put into this release. - -This module deprecates a bunch of old parameters and usage patterns, modernizes -much of the manifest code, simplifies a whole bunch of logic and makes -improvements to almost all parts of the module. - -The other major feature is windows support, courtesy of luisfdez, with an -alternative version of the concat bash script in ruby. We've attempted to -ensure that there are no backwards incompatible changes, all users of 1.0.0 -should be able to use 1.1.0 without any failures, but you may find deprecation -warnings and we'll be aggressively moving for a 2.0 to remove those too. - -For further information on deprecations, please read: -https://github.com/puppetlabs/puppetlabs-concat/blob/master/README.md#api-deprecations - -Removed: -- Puppet 0.24 support. -- Filebucket backup of all file resources except the target concatenated file. -- Default owner/user/group values. -- Purging of long unused /usr/local/bin/concatfragments.sh - -Features: -- Windows support via a ruby version of the concat bash script. -- Huge amount of acceptance testing work added. -- Documentation (README) completely rewritten. -- New parameters in concat: - - `ensure`: Controls if the file should be present/absent at all. -- Remove requirement to include concat::setup in manifests. -- Made `gnu` parameter deprecated. -- Added parameter validation. - -Bugfixes: -- Ensure concat::setup runs before concat::fragment in all cases. -- Pluginsync references updated for modern Puppet. -- Fix incorrect group parameter. -- Use $owner instead of $id to avoid confusion with $::id -- Compatibility fixes for Puppet 2.7/ruby 1.8.7 -- Use LC_ALL=C instead of LANG=C -- Always exec the concatfragments script as root when running as root. -- Syntax and other cleanup changes. - -2013-08-09 1.0.0 - -Summary: - -Many new features and bugfixes in this release, and if you're a heavy concat -user you should test carefully before upgrading. The features should all be -backwards compatible but only light testing has been done from our side before -this release. - -Features: -- New parameters in concat: - - `replace`: specify if concat should replace existing files. - - `ensure_newline`: controls if fragments should contain a newline at the end. -- Improved README documentation. -- Add rspec:system tests (rake spec:system to test concat) - -Bugfixes -- Gracefully handle \n in a fragment resource name. -- Adding more helpful message for 'pluginsync = true' -- Allow passing `source` and `content` directly to file resource, rather than -defining resource defaults. -- Added -r flag to read so that filenames with \ will be read correctly. -- sort always uses LANG=C. -- Allow WARNMSG to contain/start with '#'. -- Replace while-read pattern with for-do in order to support Solaris. - -CHANGELOG: -- 2010/02/19 - initial release -- 2010/03/12 - add support for 0.24.8 and newer - - make the location of sort configurable - - add the ability to add shell comment based warnings to - top of files - - add the ablity to create empty files -- 2010/04/05 - fix parsing of WARN and change code style to match rest - of the code - - Better and safer boolean handling for warn and force - - Don't use hard coded paths in the shell script, set PATH - top of the script - - Use file{} to copy the result and make all fragments owned - by root. This means we can chnage the ownership/group of the - resulting file at any time. - - You can specify ensure => "/some/other/file" in concat::fragment - to include the contents of a symlink into the final file. -- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name -- 2010/05/22 - Improve documentation and show the use of ensure => -- 2010/07/14 - Add support for setting the filebucket behavior of files -- 2010/10/04 - Make the warning message configurable -- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett -- 2011/02/03 - Make the shell script more portable and add a config option for root group -- 2011/06/21 - Make base dir root readable only for security -- 2011/06/23 - Set base directory using a fact instead of hardcoding it -- 2011/06/23 - Support operating as non privileged user -- 2011/06/23 - Support dash instead of bash or sh -- 2011/07/11 - Better solaris support -- 2011/12/05 - Use fully qualified variables -- 2011/12/13 - Improve Nexenta support -- 2012/04/11 - Do not use any GNU specific extensions in the shell script -- 2012/03/24 - Comply to community style guides -- 2012/05/23 - Better errors when basedir isnt set -- 2012/05/31 - Add spec tests -- 2012/07/11 - Include concat::setup in concat improving UX -- 2012/08/14 - Puppet Lint improvements -- 2012/08/30 - The target path can be different from the $name -- 2012/08/30 - More Puppet Lint cleanup -- 2012/09/04 - RELEASE 0.2.0 -- 2012/12/12 - Added (file) $replace parameter to concat diff --git a/puphpet/puppet/modules/concat/Gemfile b/puphpet/puppet/modules/concat/Gemfile deleted file mode 100644 index 56b97759..00000000 --- a/puphpet/puppet/modules/concat/Gemfile +++ /dev/null @@ -1,20 +0,0 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" - -group :development, :test do - gem 'rake', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'puppet-lint', :require => false - gem 'serverspec', :require => false - gem 'pry', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/puphpet/puppet/modules/concat/LICENSE b/puphpet/puppet/modules/concat/LICENSE deleted file mode 100644 index 6a9e9a19..00000000 --- a/puphpet/puppet/modules/concat/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ - Copyright 2012 R.I.Pienaar - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/puphpet/puppet/modules/concat/Modulefile b/puphpet/puppet/modules/concat/Modulefile deleted file mode 100644 index ea9ef2c3..00000000 --- a/puphpet/puppet/modules/concat/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'puppetlabs-concat' -version '1.1.0' -source 'git://github.com/puppetlabs/puppetlabs-concat.git' -author 'Puppetlabs' -license 'Apache 2.0' -summary 'Concat module' -description 'Concat module' -project_page 'http://github.com/puppetlabs/puppetlabs-concat' -dependency 'puppetlabs/stdlib', '>= 4.0.0' diff --git a/puphpet/puppet/modules/concat/README.md b/puphpet/puppet/modules/concat/README.md deleted file mode 100644 index 60eca383..00000000 --- a/puphpet/puppet/modules/concat/README.md +++ /dev/null @@ -1,441 +0,0 @@ -#Concat - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-concat.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-concat) - -####Table of Contents - -1. [Overview](#overview) -2. [Module Description - What the module does and why it is useful](#module-description) -3. [Setup - The basics of getting started with concat](#setup) - * [What concat affects](#what-concat-affects) - * [Setup requirements](#setup-requirements) - * [Beginning with concat](#beginning-with-concat) -4. [Usage - Configuration options and additional functionality](#usage) - * [API _deprecations_](#api-deprecations) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -5. [Limitations - OS compatibility, etc.](#limitations) -6. [Development - Guide for contributing to the module](#development) - -##Overview - -This module constructs files from multiple fragments in an ordered way. - -##Module Description - -This module lets you use many concat::fragment{} resources throughout -your modules to construct a single file at the end. It does this through -a shell (or ruby) script and a temporary holding space for the fragments. - -##Setup - -###What concat affects - -* Installs concatfragments.[sh|rb] based on platform. -* Adds a concat/ directory into Puppets `vardir`. - -###Beginning with concat - -To start using concat you need to create: - -* A concat{} resource for the final file. -* One or more concat::fragment{}'s. - -A minimal example might be: - -```puppet -concat { '/tmp/file': - ensure => present, -} - -concat::fragment { 'tmpfile': - target => '/tmp/file' - content => 'test contents', - order => '01' -} -``` - -##Usage - -Please be aware that there have been a number of [API -_deprecations_](#api-deprecations). - -If you wanted a /etc/motd file that listed all the major modules -on the machine. And that would be maintained automatically even -if you just remove the include lines for other modules you could -use code like below, a sample /etc/motd would be: - -
-Puppet modules on this server:
-
-    -- Apache
-    -- MySQL
-
- -Local sysadmins can also append to the file by just editing /etc/motd.local -their changes will be incorporated into the puppet managed motd. - -```puppet -class motd { - $motd = '/etc/motd' - - concat { $motd: - owner => 'root', - group => 'root', - mode => '0644' - } - - concat::fragment{ 'motd_header': - target => $motd, - content => "\nPuppet modules on this server:\n\n", - order => '01' - } - - # local users on the machine can append to motd by just creating - # /etc/motd.local - concat::fragment{ 'motd_local': - target => $motd, - source => '/etc/motd.local', - order => '15' - } -} - -# used by other modules to register themselves in the motd -define motd::register($content="", $order=10) { - if $content == "" { - $body = $name - } else { - $body = $content - } - - concat::fragment{ "motd_fragment_$name": - target => '/etc/motd', - order => $order, - content => " -- $body\n" - } -} -``` - -To use this you'd then do something like: - -```puppet -class apache { - include apache::install, apache::config, apache::service - - motd::register{ 'Apache': } -} -``` - -##Reference - -###Classes - -####Public classes - -####Private classes -* `concat::setup`: Sets up the concat script/directories. - -###Parameters - -###Defines - -####concat - -#####`ensure` -Controls if the combined file is present or absent. - -######Example -- ensure => present -- ensure => absent - -#####`path` -Controls the destination of the file to create. - -######Example -- path => '/tmp/filename' - -#####`owner` -Set the owner of the combined file. - -######Example -- owner => 'root' - -#####`group` -Set the group of the combined file. - -######Example -- group => 'root' - -#####`mode` -Set the mode of the combined file. - -######Example -- mode => '0644' - -#####`warn` -Determine if a warning message should be added at the top of the file to let -users know it was autogenerated by Puppet. - -######Example -- warn => true -- warn => false - -#####`warn_message` -Set the contents of the warning message. - -######Example -- warn_message => 'This file is autogenerated!' - -#####`force` -Determine if empty files are allowed when no fragments were added. - -######Example -- force => true -- force => false - -#####`backup` -Controls the filebucket behavior used for the file. - -######Example -- backup => 'puppet' - -#####`replace` -Controls if Puppet should replace the destination file if it already exists. - -######Example -- replace => true -- replace => false - -#####`order` -Controls the way in which the shell script chooses to sort the files. It's -rare you'll need to adjust this. - -######Allowed Values -- order => 'alpha' -- order => 'numeric' - -#####`ensure_newline` -Ensure there's a newline at the end of the fragments. - -######Example -- ensure_newline => true -- ensure_newline => false - -####concat::fragment - -#####`target` -Choose the destination file of the fragment. - -######Example -- target => '/tmp/testfile' - -#####`content` -Create the content of the fragment. - -######Example -- content => 'test file contents' - -#####`source` -Find the sources within Puppet of the fragment. - -######Example -- source => 'puppet:///modules/test/testfile' -- source => ['puppet:///modules/test/1', 'puppet:///modules/test/2'] - -#####`order` -Order the fragments. - -######Example -- order => '01' - -#####`ensure` -Control the file of fragment created. - -######Example -- ensure => 'present' -- ensure => 'absent' -- ensure => 'file' -- ensure => 'directory' - -#####`mode` -Set the mode of the fragment. - -######Example -- mode => '0644' - -#####`owner` -Set the owner of the fragment. - -######Example -- owner => 'root' - -#####`group` -Set the group of the fragment. - -######Example -- group => 'root' - -#####`backup` -Control the filebucket behavior for the fragment. - -######Example -- backup => 'puppet' - -### API _deprecations_ - -#### Since version `1.0.0` - -##### `concat{}` `warn` parameter - -```puppet -concat { '/tmp/file': - ensure => present, - warn => 'true', # generates stringified boolean value warning -} -``` - -Using stringified Boolean values as the `warn` parameter to `concat` is -deprecated, generates a catalog compile time warning, and will be silently -treated as the concatenated file header/warning message in a future release. - -The following strings are considered a stringified Boolean value: - - * `'true'` - * `'yes'` - * `'on'` - * `'false'` - * `'no'` - * `'off'` - -Please migrate to using the Puppet DSL's native [Boolean data -type](http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#booleans). - -##### `concat{}` `gnu` parameter - -```puppet -concat { '/tmp/file': - ensure => present, - gnu => $foo, # generates deprecation warning -} -``` - -The `gnu` parameter to `concat` is deprecated, generates a catalog compile time -warning, and has no effect. This parameter will be removed in a future -release. - -Note that this parameter was silently ignored in the `1.0.0` release. - -##### `concat::fragment{}` `ensure` parameter - -```puppet -concat::fragment { 'cpuinfo': - ensure => '/proc/cpuinfo', # generates deprecation warning - target => '/tmp/file', -} -``` - -Passing a value other than `'present'` or `'absent'` as the `ensure` parameter -to `concat::fragment` is deprecated and generates a catalog compile time -warning. The warning will become a catalog compilation failure in a future -release. - -This type emulates the Puppet core `file` type's disfavored [`ensure` -semantics](http://docs.puppetlabs.com/references/latest/type.html#file-attribute-ensure) -of treating a file path as a directive to create a symlink. This feature is -problematic in several ways. It copies an API semantic of another type that is -both frowned upon and not generally well known. It's behavior may be -surprising in that the target concatenated file will not be a symlink nor is -there any common file system that has a concept of a section of a plain file -being symbolically linked to another file. Additionally, the behavior is -generally inconsistent with most Puppet types in that a missing source file -will be silently ignored. - -If you want to use the content of a file as a fragment please use the `source` -parameter. - -##### `concat::fragment{}` `mode/owner/group` parameters - -```puppet -concat::fragment { 'foo': - target => '/tmp/file', - content => 'foo', - mode => $mode, # generates deprecation warning - owner => $owner, # generates deprecation warning - group => $group, # generates deprecation warning -} -``` - -The `mode` parameter to `concat::fragment` is deprecated, generates a catalog compile time warning, and has no effect. - -The `owner` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. - -The `group` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. - -These parameters had no user visible effect in version `1.0.0` and will be -removed in a future release. - -##### `concat::fragment{}` `backup` parameter - -```puppet -concat::fragment { 'foo': - target => '/tmp/file', - content => 'foo', - backup => 'bar', # generates deprecation warning -} -``` - -The `backup` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. It will be removed in a future -release. - -In the `1.0.0` release this parameter controlled file bucketing of the file -fragment. Bucketting the fragment(s) is redundant with bucketting the final -concatenated file and this feature has been removed. - -##### `class { 'concat::setup': }` - -```puppet -include concat::setup # generates deprecation warning - -class { 'concat::setup: } # generates deprecation warning -``` - -The `concat::setup` class is deprecated as a public API of this module and -should no longer be directly included in the manifest. This class may be -removed in a future release. - -##### Parameter validation - -While not an API depreciation, users should be aware that all public parameters -in this module are now validated for at least variable type. This may cause -validation errors in a manifest that was previously silently misbehaving. - -##Limitations - -This module has been tested on: - -* RedHat Enterprise Linux (and Centos) 5/6 -* Debian 6/7 -* Ubuntu 12.04 - -Testing on other platforms has been light and cannot be guaranteed. - -#Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -###Contributors - -The list of contributors can be found at: - -https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors diff --git a/puphpet/puppet/modules/concat/Rakefile b/puphpet/puppet/modules/concat/Rakefile deleted file mode 100644 index 23aea87d..00000000 --- a/puphpet/puppet/modules/concat/Rakefile +++ /dev/null @@ -1,5 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_quoted_booleans') diff --git a/puphpet/puppet/modules/concat/files/concatfragments.rb b/puphpet/puppet/modules/concat/files/concatfragments.rb deleted file mode 100644 index 73fd7f9b..00000000 --- a/puphpet/puppet/modules/concat/files/concatfragments.rb +++ /dev/null @@ -1,137 +0,0 @@ -# Script to concat files to a config file. -# -# Given a directory like this: -# /path/to/conf.d -# |-- fragments -# | |-- 00_named.conf -# | |-- 10_domain.net -# | `-- zz_footer -# -# The script supports a test option that will build the concat file to a temp location and -# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening -# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. -# -# Without the test option and the unless combo your services that depend on the final file would end up -# restarting on each run, or in other manifest models some changes might get missed. -# -# OPTIONS: -# -o The file to create from the sources -# -d The directory where the fragments are kept -# -t Test to find out if a build is needed, basically concats the files to a temp -# location and compare with what's in the final location, return codes are designed -# for use with unless on an exec resource -# -w Add a shell style comment at the top of the created file to warn users that it -# is generated by puppet -# -f Enables the creation of empty output files when no fragments are found -# -n Sort the output numerically rather than the default alpha sort -# -# the command: -# -# concatfragments.rb -o /path/to/conffile.cfg -d /path/to/conf.d -# -# creates /path/to/conf.d/fragments.concat and copies the resulting -# file to /path/to/conffile.cfg. The files will be sorted alphabetically -# pass the -n switch to sort numerically. -# -# The script does error checking on the various dirs and files to make -# sure things don't fail. -require 'optparse' -require 'fileutils' - -settings = { - :outfile => "", - :workdir => "", - :test => false, - :force => false, - :warn => "", - :sortarg => "" -} - -OptionParser.new do |opts| - opts.banner = "Usage: #{$0} [options]" - opts.separator "Specific options:" - - opts.on("-o", "--outfile OUTFILE", String, "The file to create from the sources") do |o| - settings[:outfile] = o - end - - opts.on("-d", "--workdir WORKDIR", String, "The directory where the fragments are kept") do |d| - settings[:workdir] = d - end - - opts.on("-t", "--test", "Test to find out if a build is needed") do - settings[:test] = true - end - - opts.separator "Other options:" - opts.on("-w", "--warn WARNMSG", String, - "Add a shell style comment at the top of the created file to warn users that it is generated by puppet") do |w| - settings[:warn] = w - end - - opts.on("-f", "--force", "Enables the creation of empty output files when no fragments are found") do - settings[:force] = true - end - - opts.on("-n", "--sort", "Sort the output numerically rather than the default alpha sort") do - settings[:sortarg] = "-n" - end -end.parse! - -# do we have -o? -raise 'Please specify an output file with -o' unless !settings[:outfile].empty? - -# do we have -d? -raise 'Please specify fragments directory with -d' unless !settings[:workdir].empty? - -# can we write to -o? -if File.file?(settings[:outfile]) - if !File.writable?(settings[:outfile]) - raise "Cannot write to #{settings[:outfile]}" - end -else - if !File.writable?(File.dirname(settings[:outfile])) - raise "Cannot write to dirname #{File.dirname(settings[:outfile])} to create #{settings[:outfile]}" - end -end - -# do we have a fragments subdir inside the work dir? -if !File.directory?(File.join(settings[:workdir], "fragments")) && !File.executable?(File.join(settings[:workdir], "fragments")) - raise "Cannot access the fragments directory" -end - -# are there actually any fragments? -if (Dir.entries(File.join(settings[:workdir], "fragments")) - %w{ . .. }).empty? - if !settings[:force] - raise "The fragments directory is empty, cowardly refusing to make empty config files" - end -end - -Dir.chdir(settings[:workdir]) - -if settings[:warn].empty? - File.open("fragments.concat", 'w') {|f| f.write("") } -else - File.open("fragments.concat", 'w') {|f| f.write("#{settings[:warn]}\n") } -end - -# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir -open('fragments.concat', 'a') do |f| - Dir.entries("fragments").sort.each{ |entry| - if File.file?(File.join("fragments", entry)) - f << File.read(File.join("fragments", entry)) - end - } -end - -if !settings[:test] - # This is a real run, copy the file to outfile - FileUtils.cp 'fragments.concat', settings[:outfile] -else - # Just compare the result to outfile to help the exec decide - if FileUtils.cmp 'fragments.concat', settings[:outfile] - exit 0 - else - exit 1 - end -end diff --git a/puphpet/puppet/modules/concat/files/concatfragments.sh b/puphpet/puppet/modules/concat/files/concatfragments.sh deleted file mode 100644 index 7e6b0f5c..00000000 --- a/puphpet/puppet/modules/concat/files/concatfragments.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh - -# Script to concat files to a config file. -# -# Given a directory like this: -# /path/to/conf.d -# |-- fragments -# | |-- 00_named.conf -# | |-- 10_domain.net -# | `-- zz_footer -# -# The script supports a test option that will build the concat file to a temp location and -# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening -# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. -# -# Without the test option and the unless combo your services that depend on the final file would end up -# restarting on each run, or in other manifest models some changes might get missed. -# -# OPTIONS: -# -o The file to create from the sources -# -d The directory where the fragments are kept -# -t Test to find out if a build is needed, basically concats the files to a temp -# location and compare with what's in the final location, return codes are designed -# for use with unless on an exec resource -# -w Add a shell style comment at the top of the created file to warn users that it -# is generated by puppet -# -f Enables the creation of empty output files when no fragments are found -# -n Sort the output numerically rather than the default alpha sort -# -# the command: -# -# concatfragments.sh -o /path/to/conffile.cfg -d /path/to/conf.d -# -# creates /path/to/conf.d/fragments.concat and copies the resulting -# file to /path/to/conffile.cfg. The files will be sorted alphabetically -# pass the -n switch to sort numerically. -# -# The script does error checking on the various dirs and files to make -# sure things don't fail. - -OUTFILE="" -WORKDIR="" -TEST="" -FORCE="" -WARN="" -SORTARG="" -ENSURE_NEWLINE="" - -PATH=/sbin:/usr/sbin:/bin:/usr/bin - -## Well, if there's ever a bad way to do things, Nexenta has it. -## http://nexenta.org/projects/site/wiki/Personalities -unset SUN_PERSONALITY - -while getopts "o:s:d:tnw:fl" options; do - case $options in - o ) OUTFILE=$OPTARG;; - d ) WORKDIR=$OPTARG;; - n ) SORTARG="-n";; - w ) WARNMSG="$OPTARG";; - f ) FORCE="true";; - t ) TEST="true";; - l ) ENSURE_NEWLINE="true";; - * ) echo "Specify output file with -o and fragments directory with -d" - exit 1;; - esac -done - -# do we have -o? -if [ "x${OUTFILE}" = "x" ]; then - echo "Please specify an output file with -o" - exit 1 -fi - -# do we have -d? -if [ "x${WORKDIR}" = "x" ]; then - echo "Please fragments directory with -d" - exit 1 -fi - -# can we write to -o? -if [ -f "${OUTFILE}" ]; then - if [ ! -w "${OUTFILE}" ]; then - echo "Cannot write to ${OUTFILE}" - exit 1 - fi -else - if [ ! -w `dirname "${OUTFILE}"` ]; then - echo "Cannot write to `dirname \"${OUTFILE}\"` to create ${OUTFILE}" - exit 1 - fi -fi - -# do we have a fragments subdir inside the work dir? -if [ ! -d "${WORKDIR}/fragments" ] && [ ! -x "${WORKDIR}/fragments" ]; then - echo "Cannot access the fragments directory" - exit 1 -fi - -# are there actually any fragments? -if [ ! "$(ls -A """${WORKDIR}/fragments""")" ]; then - if [ "x${FORCE}" = "x" ]; then - echo "The fragments directory is empty, cowardly refusing to make empty config files" - exit 1 - fi -fi - -cd "${WORKDIR}" - -if [ "x${WARNMSG}" = "x" ]; then - : > "fragments.concat" -else - printf '%s\n' "$WARNMSG" > "fragments.concat" -fi - -# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir -IFS_BACKUP=$IFS -IFS=' -' -for fragfile in `find fragments/ -type f -follow -print0 | xargs -0 -n1 basename | LC_ALL=C sort ${SORTARG}` -do - cat "fragments/$fragfile" >> "fragments.concat" - # Handle newlines. - if [ "x${ENSURE_NEWLINE}" != "x" ]; then - echo >> "fragments.concat" - fi -done -IFS=$IFS_BACKUP - -if [ "x${TEST}" = "x" ]; then - # This is a real run, copy the file to outfile - cp fragments.concat "${OUTFILE}" - RETVAL=$? -else - # Just compare the result to outfile to help the exec decide - cmp "${OUTFILE}" fragments.concat - RETVAL=$? -fi - -exit $RETVAL diff --git a/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb b/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb deleted file mode 100644 index bfac0710..00000000 --- a/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb +++ /dev/null @@ -1,11 +0,0 @@ -# == Fact: concat_basedir -# -# A custom fact that sets the default location for fragments -# -# "${::vardir}/concat/" -# -Facter.add("concat_basedir") do - setcode do - File.join(Puppet[:vardir],"concat") - end -end diff --git a/puphpet/puppet/modules/concat/manifests/fragment.pp b/puphpet/puppet/modules/concat/manifests/fragment.pp deleted file mode 100644 index 40baadd2..00000000 --- a/puphpet/puppet/modules/concat/manifests/fragment.pp +++ /dev/null @@ -1,121 +0,0 @@ -# == Define: concat::fragment -# -# Puts a file fragment into a directory previous setup using concat -# -# === Options: -# -# [*target*] -# The file that these fragments belong to -# [*content*] -# If present puts the content into the file -# [*source*] -# If content was not specified, use the source -# [*order*] -# By default all files gets a 10_ prefix in the directory you can set it to -# anything else using this to influence the order of the content in the file -# [*ensure*] -# Present/Absent or destination to a file to include another file -# [*mode*] -# Deprecated -# [*owner*] -# Deprecated -# [*group*] -# Deprecated -# [*backup*] -# Deprecated -# -define concat::fragment( - $target, - $content = undef, - $source = undef, - $order = 10, - $ensure = undef, - $mode = undef, - $owner = undef, - $group = undef, - $backup = undef -) { - validate_string($target) - validate_string($content) - if !(is_string($source) or is_array($source)) { - fail('$source is not a string or an Array.') - } - validate_string($order) - if $mode { - warning('The $mode parameter to concat::fragment is deprecated and has no effect') - } - if $owner { - warning('The $owner parameter to concat::fragment is deprecated and has no effect') - } - if $group { - warning('The $group parameter to concat::fragment is deprecated and has no effect') - } - if $backup { - warning('The $backup parameter to concat::fragment is deprecated and has no effect') - } - if $ensure == undef { - $_ensure = getparam(Concat[$target], 'ensure') - } else { - if ! ($ensure in [ 'present', 'absent' ]) { - warning('Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.') - } - $_ensure = $ensure - } - - include concat::setup - - $safe_name = regsubst($name, '[/:\n]', '_', 'GM') - $safe_target_name = regsubst($target, '[/:\n]', '_', 'GM') - $concatdir = $concat::setup::concatdir - $fragdir = "${concatdir}/${safe_target_name}" - $fragowner = $concat::setup::fragment_owner - $fragmode = $concat::setup::fragment_mode - - # The file type's semantics are problematic in that ensure => present will - # not over write a pre-existing symlink. We are attempting to provide - # backwards compatiblity with previous concat::fragment versions that - # supported the file type's ensure => /target syntax - - # be paranoid and only allow the fragment's file resource's ensure param to - # be file, absent, or a file target - $safe_ensure = $_ensure ? { - '' => 'file', - undef => 'file', - 'file' => 'file', - 'present' => 'file', - 'absent' => 'absent', - default => $_ensure, - } - - # if it looks line ensure => /target syntax was used, fish that out - if ! ($_ensure in ['', 'present', 'absent', 'file' ]) { - $ensure_target = $_ensure - } else { - $ensure_target = undef - } - - # the file type's semantics only allows one of: ensure => /target, content, - # or source - if ($ensure_target and $source) or - ($ensure_target and $content) or - ($source and $content) { - fail('You cannot specify more than one of $content, $source, $ensure => /target') - } - - if ! ($content or $source or $ensure_target) { - crit('No content, source or symlink specified') - } - - # punt on group ownership until some point in the distant future when $::gid - # can be relied on to be present - file { "${fragdir}/fragments/${order}_${safe_name}": - ensure => $safe_ensure, - owner => $fragowner, - mode => $fragmode, - source => $source, - content => $content, - backup => false, - alias => "concat_fragment_${name}", - notify => Exec["concat_${target}"] - } -} diff --git a/puphpet/puppet/modules/concat/manifests/init.pp b/puphpet/puppet/modules/concat/manifests/init.pp deleted file mode 100644 index 91d82ebd..00000000 --- a/puphpet/puppet/modules/concat/manifests/init.pp +++ /dev/null @@ -1,232 +0,0 @@ -# == Define: concat -# -# Sets up so that you can use fragments to build a final config file, -# -# === Options: -# -# [*ensure*] -# Present/Absent -# [*path*] -# The path to the final file. Use this in case you want to differentiate -# between the name of a resource and the file path. Note: Use the name you -# provided in the target of your fragments. -# [*owner*] -# Who will own the file -# [*group*] -# Who will own the file -# [*mode*] -# The mode of the final file -# [*force*] -# Enables creating empty files if no fragments are present -# [*warn*] -# Adds a normal shell style comment top of the file indicating that it is -# built by puppet -# [*force*] -# [*backup*] -# Controls the filebucketing behavior of the final file and see File type -# reference for its use. Defaults to 'puppet' -# [*replace*] -# Whether to replace a file that already exists on the local system -# [*order*] -# [*ensure_newline*] -# [*gnu*] -# Deprecated -# -# === Actions: -# * Creates fragment directories if it didn't exist already -# * Executes the concatfragments.sh script to build the final file, this -# script will create directory/fragments.concat. Execution happens only -# when: -# * The directory changes -# * fragments.concat != final destination, this means rebuilds will happen -# whenever someone changes or deletes the final file. Checking is done -# using /usr/bin/cmp. -# * The Exec gets notified by something else - like the concat::fragment -# define -# * Copies the file over to the final destination using a file resource -# -# === Aliases: -# -# * The exec can notified using Exec["concat_/path/to/file"] or -# Exec["concat_/path/to/directory"] -# * The final file can be referenced as File["/path/to/file"] or -# File["concat_/path/to/file"] -# -define concat( - $ensure = 'present', - $path = $name, - $owner = undef, - $group = undef, - $mode = '0644', - $warn = false, - $force = false, - $backup = 'puppet', - $replace = true, - $order = 'alpha', - $ensure_newline = false, - $gnu = undef -) { - validate_re($ensure, '^present$|^absent$') - validate_absolute_path($path) - validate_string($owner) - validate_string($group) - validate_string($mode) - if ! (is_string($warn) or $warn == true or $warn == false) { - fail('$warn is not a string or boolean') - } - validate_bool($force) - validate_string($backup) - validate_bool($replace) - validate_re($order, '^alpha$|^numeric$') - validate_bool($ensure_newline) - if $gnu { - warning('The $gnu parameter to concat is deprecated and has no effect') - } - - include concat::setup - - $safe_name = regsubst($name, '[/:]', '_', 'G') - $concatdir = $concat::setup::concatdir - $fragdir = "${concatdir}/${safe_name}" - $concat_name = 'fragments.concat.out' - $script_command = $concat::setup::script_command - $default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' - $bool_warn_message = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - case $warn { - true: { - $warn_message = $default_warn_message - } - 'true', 'yes', 'on': { - warning($bool_warn_message) - $warn_message = $default_warn_message - } - false: { - $warn_message = '' - } - 'false', 'no', 'off': { - warning($bool_warn_message) - $warn_message = '' - } - default: { - $warn_message = $warn - } - } - - $warnmsg_escaped = regsubst($warn_message, '\'', '\'\\\'\'', 'G') - $warnflag = $warnmsg_escaped ? { - '' => '', - default => "-w '${warnmsg_escaped}'" - } - - $forceflag = $force ? { - true => '-f', - false => '', - } - - $orderflag = $order ? { - 'numeric' => '-n', - 'alpha' => '', - } - - $newlineflag = $ensure_newline ? { - true => '-l', - false => '', - } - - File { - backup => false, - } - - if $ensure == 'present' { - file { $fragdir: - ensure => directory, - mode => '0750', - } - - file { "${fragdir}/fragments": - ensure => directory, - mode => '0750', - force => true, - ignore => ['.svn', '.git', '.gitignore'], - notify => Exec["concat_${name}"], - purge => true, - recurse => true, - } - - file { "${fragdir}/fragments.concat": - ensure => present, - mode => '0640', - } - - file { "${fragdir}/${concat_name}": - ensure => present, - mode => '0640', - } - - file { $name: - ensure => present, - owner => $owner, - group => $group, - mode => $mode, - replace => $replace, - path => $path, - alias => "concat_${name}", - source => "${fragdir}/${concat_name}", - backup => $backup, - } - - # remove extra whitespace from string interpolation to make testing easier - $command = strip(regsubst("${script_command} -o \"${fragdir}/${concat_name}\" -d \"${fragdir}\" ${warnflag} ${forceflag} ${orderflag} ${newlineflag}", '\s+', ' ', 'G')) - - # if puppet is running as root, this exec should also run as root to allow - # the concatfragments.sh script to potentially be installed in path that - # may not be accessible by a target non-root owner. - exec { "concat_${name}": - alias => "concat_${fragdir}", - command => $command, - notify => File[$name], - subscribe => File[$fragdir], - unless => "${command} -t", - path => $::path, - require => [ - File[$fragdir], - File["${fragdir}/fragments"], - File["${fragdir}/fragments.concat"], - ], - } - } else { - file { [ - $fragdir, - "${fragdir}/fragments", - "${fragdir}/fragments.concat", - "${fragdir}/${concat_name}" - ]: - ensure => absent, - force => true, - } - - file { $path: - ensure => absent, - backup => $backup, - } - - $absent_exec_command = $::kernel ? { - 'windows' => 'cmd.exe /c exit 0', - default => 'true', - } - - $absent_exec_path = $::kernel ? { - 'windows' => $::path, - default => '/bin:/usr/bin', - } - - exec { "concat_${name}": - alias => "concat_${fragdir}", - command => $absent_exec_command, - path => $absent_exec_path - } - } -} - -# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/puphpet/puppet/modules/concat/manifests/setup.pp b/puphpet/puppet/modules/concat/manifests/setup.pp deleted file mode 100644 index 17674003..00000000 --- a/puphpet/puppet/modules/concat/manifests/setup.pp +++ /dev/null @@ -1,58 +0,0 @@ -# === Class: concat::setup -# -# Sets up the concat system. This is a private class. -# -# [$concatdir] -# is where the fragments live and is set on the fact concat_basedir. -# Since puppet should always manage files in $concatdir and they should -# not be deleted ever, /tmp is not an option. -# -# It also copies out the concatfragments.sh file to ${concatdir}/bin -# -class concat::setup { - if $caller_module_name != $module_name { - warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.") - } - - if $::concat_basedir { - $concatdir = $::concat_basedir - } else { - fail ('$concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node\'s \'/etc/puppet/puppet.conf\'.') - } - - # owner and mode of fragment files (on windows owner and access rights should be inherited from concatdir and not explicitly set to avoid problems) - $fragment_owner = $osfamily ? { 'windows' => undef, default => $::id } - $fragment_mode = $osfamily ? { 'windows' => undef, default => '0640' } - - $script_name = $::kernel ? { - 'windows' => 'concatfragments.rb', - default => 'concatfragments.sh' - } - - $script_path = "${concatdir}/bin/${script_name}" - - $script_owner = $osfamily ? { 'windows' => undef, default => $::id } - - $script_mode = $osfamily ? { 'windows' => undef, default => '0755' } - - $script_command = $::kernel ? { - 'windows' => "ruby.exe ${script_path}", - default => $script_path - } - - File { - backup => false, - } - - file { $script_path: - ensure => file, - owner => $script_owner, - mode => $script_mode, - source => "puppet:///modules/concat/${script_name}", - } - - file { [ $concatdir, "${concatdir}/bin" ]: - ensure => directory, - mode => '0755', - } -} diff --git a/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb deleted file mode 100644 index 7b2858d8..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat backup parameter' do - context '=> puppet' do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => 'puppet', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - it 'applies the manifest twice with "Filebucketed" stdout and no stderr' do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - expect(r.stdout).to match(/Filebucketed \/tmp\/concat\/file to puppet with sum 0140c31db86293a1a1e080ce9b91305f/) # sum is for file contents of 'old contents' - end - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - end - - context '=> .backup' do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => '.backup', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - # XXX Puppet doesn't mention anything about filebucketing with a given - # extension like .backup - it 'applies the manifest twice no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - describe file('/tmp/concat/file.backup') do - it { should be_file } - it { should contain 'old contents' } - end - end - - # XXX The backup parameter uses validate_string() and thus can't be the - # boolean false value, but the string 'false' has the same effect in Puppet 3 - context "=> 'false'" do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => '.backup', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - it 'applies the manifest twice with no "Filebucketed" stdout and no stderr' do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - expect(r.stdout).to_not match(/Filebucketed/) - end - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - end -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb deleted file mode 100644 index 89919cc5..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'basic concat test' do - - shared_examples 'successfully_applied' do |pp| - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file("#{default['puppetvardir']}/concat") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/bin") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/bin/concatfragments.sh") do - it { should be_file } - it { should be_owned_by 'root' } - #it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 750 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 750 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat.out") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - end - - context 'owner/group root' do - pp = <<-EOS - concat { '/tmp/concat/file': - owner => 'root', - group => 'root', - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - EOS - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 644 } - it { should contain '1' } - it { should contain '2' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - end - - context 'owner/group non-root' do - before(:all) do - shell "groupadd -g 64444 bob" - shell "useradd -u 42 -g 64444 bob" - end - after(:all) do - shell "userdel bob" - end - - pp=" - concat { '/tmp/concat/file': - owner => 'bob', - group => 'bob', - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - " - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_owned_by 'bob' } - it { should be_grouped_into 'bob' } - it { should be_mode 644 } - it { should contain '1' } - it { should contain '2' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - it { should contain '1' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - it { should contain '2' } - end - end - - context 'ensure' do - context 'works when set to present with path set' do - pp=" - concat { 'file': - ensure => present, - path => '/tmp/concat/file', - mode => '0644', - } - concat::fragment { '1': - target => 'file', - content => '1', - order => '01', - } - " - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_mode 644 } - it { should contain '1' } - end - end - context 'works when set to absent with path set' do - pp=" - concat { 'file': - ensure => absent, - path => '/tmp/concat/file', - mode => '0644', - } - concat::fragment { '1': - target => 'file', - content => '1', - order => '01', - } - " - - # Can't used shared examples as this will always trigger the exec when - # absent is set. - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should_not be_file } - end - end - end -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb deleted file mode 100644 index f139d818..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb +++ /dev/null @@ -1,230 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'deprecation warnings' do - - shared_examples 'has_warning'do |pp, w| - it 'applies the manifest twice with a stderr regex' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to match(/#{Regexp.escape(w)}/m) - expect(apply_manifest(pp, :catch_changes => true).stderr).to match(/#{Regexp.escape(w)}/m) - end - end - - context 'concat gnu parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': - gnu => 'foo', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'The $gnu parameter to concat is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat warn parameter =>' do - ['true', 'yes', 'on'].each do |warn| - context warn do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => '#{warn}', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain 'bar' } - end - end - end - - ['false', 'no', 'off'].each do |warn| - context warn do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => '#{warn}', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain 'bar' } - end - end - end - end - - context 'concat::fragment ensure parameter' do - context 'target file exists' do - before(:all) do - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - end - after(:all) do - # XXX this test may leave behind a symlink in the fragment directory - # which could cause warnings and/or breakage from the subsequent tests - # unless we clean it up. - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - ensure => '/tmp/concat/file1', - } - EOS - w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'file1 contents' } - end - - describe 'the fragment can be changed from a symlink to a plain file' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'new content', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new content' } - it { should_not contain 'file1 contents' } - end - end - end # target file exists - - context 'target does not exist' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - ensure => '/tmp/concat/file1', - } - EOS - w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - end - - describe 'the fragment can be changed from a symlink to a plain file' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'new content', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new content' } - end - end - end # target file exists - - end # concat::fragment ensure parameter - - context 'concat::fragment mode parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - mode => 'bar', - } - EOS - w = 'The $mode parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment owner parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - owner => 'bar', - } - EOS - w = 'The $owner parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment group parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - group => 'bar', - } - EOS - w = 'The $group parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment backup parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - backup => 'bar', - } - EOS - w = 'The $backup parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'include concat::setup' do - pp = <<-EOS - include concat::setup - EOS - w = 'concat::setup is deprecated as a public API of the concat module and should no longer be directly included in the manifest.' - - it_behaves_like 'has_warning', pp, w - end - -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb deleted file mode 100644 index 09995282..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat force empty parameter' do - context 'should run successfully' do - pp = <<-EOS - concat { '/tmp/concat/file': - owner => root, - group => root, - mode => '0644', - force => true, - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain '1\n2' } - end - end -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb deleted file mode 100644 index 3afd5343..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat::fragment source' do - context 'should read file fragments from local system' do - before(:all) do - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - shell("/bin/echo 'file2 contents' > /tmp/concat/file2") - end - - pp = <<-EOS - concat { '/tmp/concat/foo': } - - concat::fragment { '1': - target => '/tmp/concat/foo', - source => '/tmp/concat/file1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string1 contents', - } - concat::fragment { '3': - target => '/tmp/concat/foo', - source => '/tmp/concat/file2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain 'file1 contents' } - it { should contain 'string1 contents' } - it { should contain 'file2 contents' } - end - end # should read file fragments from local system - - context 'should create files containing first match only.' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - shell("/bin/echo 'file2 contents' > /tmp/concat/file2") - end - - pp = <<-EOS - concat { '/tmp/concat/result_file1': - owner => root, - group => root, - mode => '0644', - } - concat { '/tmp/concat/result_file2': - owner => root, - group => root, - mode => '0644', - } - concat { '/tmp/concat/result_file3': - owner => root, - group => root, - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/result_file1', - source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], - order => '01', - } - concat::fragment { '2': - target => '/tmp/concat/result_file2', - source => [ '/tmp/concat/file2', '/tmp/concat/file1' ], - order => '01', - } - concat::fragment { '3': - target => '/tmp/concat/result_file3', - source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], - order => '01', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - describe file('/tmp/concat/result_file1') do - it { should be_file } - it { should contain 'file1 contents' } - it { should_not contain 'file2 contents' } - end - describe file('/tmp/concat/result_file2') do - it { should be_file } - it { should contain 'file2 contents' } - it { should_not contain 'file1 contents' } - end - describe file('/tmp/concat/result_file3') do - it { should be_file } - it { should contain 'file1 contents' } - it { should_not contain 'file2 contents' } - end - end - - context 'should fail if no match on source.' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - shell('/bin/rm -rf /tmp/concat/fail_no_source /tmp/concat/nofilehere /tmp/concat/nothereeither') - end - - pp = <<-EOS - concat { '/tmp/concat/fail_no_source': - owner => root, - group => root, - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/fail_no_source', - source => [ '/tmp/concat/nofilehere', '/tmp/concat/nothereeither' ], - order => '01', - } - EOS - - it 'applies the manifest with resource failures' do - apply_manifest(pp, :expect_failures => true) - end - describe file('/tmp/concat/fail_no_source') do - #FIXME: Serverspec::Type::File doesn't support exists? for some reason. so... hack. - it { should_not be_file } - it { should_not be_directory } - end - end -end - diff --git a/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb deleted file mode 100644 index 1e989df2..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat ensure_newline parameter' do - context '=> false' do - pp = <<-EOS - concat { '/tmp/concat/file': - ensure_newline => false, - } - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '12' } - end - end - - context '=> true' do - pp = <<-EOS - concat { '/tmp/concat/file': - ensure_newline => true, - } - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - #XXX ensure_newline => true causes changes on every run because the files - #are modified in place. - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain "1\n2\n" } - end - end -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml deleted file mode 100644 index f0ae87a5..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml +++ /dev/null @@ -1,19 +0,0 @@ -HOSTS: - pe-aix-71-acceptance: - roles: - - master - - dashboard - - database - - agent - - default - platform: aix-7.1-power - hypervisor: aix - ip: pe-aix-71-acceptance.delivery.puppetlabs.net -CONFIG: - type: pe - nfs_server: NONE - consoleport: 443 - datastore: instance0 - folder: Delivery/Quality Assurance/Enterprise/Dynamic - resourcepool: delivery/Quality Assurance/Enterprise/Dynamic - pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index 2ad90b86..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index 4c8be42d..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index 19181c12..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index 3e6a3a9d..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-x64.localhost: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml deleted file mode 100644 index ae812b0a..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64.localdomain: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 13616498..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe213..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml deleted file mode 100644 index 554c37a5..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11sp1-x64: - roles: - - master - platform: sles-11-x86_64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index cba1cd04..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box : puppetlabs/ubuntu-14.04-64-nocm - box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb deleted file mode 100644 index 8bcb7131..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat order' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - context '=> alpha' do - pp = <<-EOS - concat { '/tmp/concat/foo': - order => 'alpha' - } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - } - concat::fragment { '10': - target => '/tmp/concat/foo', - content => 'string10', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string10\nstring1\nsring2" } - end - end - - context '=> numeric' do - pp = <<-EOS - concat { '/tmp/concat/foo': - order => 'numeric' - } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - } - concat::fragment { '10': - target => '/tmp/concat/foo', - content => 'string10', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string1\nstring2\nsring10" } - end - end -end # concat order - -describe 'concat::fragment order' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - context '=> reverse order' do - pp = <<-EOS - concat { '/tmp/concat/foo': } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - order => '15', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - # default order 10 - } - concat::fragment { '3': - target => '/tmp/concat/foo', - content => 'string3', - order => '1', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string3\nstring2\nsring1" } - end - end - - context '=> normal order' do - pp = <<-EOS - concat { '/tmp/concat/foo': } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - order => '01', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - order => '02' - } - concat::fragment { '3': - target => '/tmp/concat/foo', - content => 'string3', - order => '03', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string1\nstring2\nsring3" } - end - end -end # concat::fragment order diff --git a/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb deleted file mode 100644 index af352efc..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'quoted paths' do - before(:all) do - shell('rm -rf "/tmp/concat test" /var/lib/puppet/concat') - shell('mkdir -p "/tmp/concat test"') - end - - context 'path with blanks' do - pp = <<-EOS - concat { '/tmp/concat test/foo': - } - concat::fragment { '1': - target => '/tmp/concat test/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat test/foo', - content => 'string2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat test/foo') do - it { should be_file } - it { should contain "string1\nsring2" } - end - end -end diff --git a/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb b/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb deleted file mode 100644 index 7b31e09c..00000000 --- a/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb +++ /dev/null @@ -1,241 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'replacement of' do - context 'file' do - context 'should not succeed' do - before(:all) do - shell('mkdir -p /tmp/concat') - shell('echo "file exists" > /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => false, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'file exists' } - it { should_not contain '1' } - it { should_not contain '2' } - end - end - - context 'should succeed' do - before(:all) do - shell('mkdir -p /tmp/concat') - shell('echo "file exists" > /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain 'file exists' } - it { should contain '1' } - it { should contain '2' } - end - end - end # file - - context 'symlink' do - context 'should not succeed' do - # XXX the core puppet file type will replace a symlink with a plain file - # when using ensure => present and source => ... but it will not when using - # ensure => present and content => ...; this is somewhat confusing behavior - before(:all) do - shell('mkdir -p /tmp/concat') - shell('ln -s /tmp/concat/dangling /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => false, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_linked_to '/tmp/concat/dangling' } - end - - describe file('/tmp/concat/dangling') do - # XXX serverspec does not have a matcher for 'exists' - it { should_not be_file } - it { should_not be_directory } - end - end - - context 'should succeed' do - # XXX the core puppet file type will replace a symlink with a plain file - # when using ensure => present and source => ... but it will not when using - # ensure => present and content => ...; this is somewhat confusing behavior - before(:all) do - shell('mkdir -p /tmp/concat') - shell('ln -s /tmp/concat/dangling /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(p