freighthop 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Puppetfile +4 -3
- data/Puppetfile.lock +14 -2
- data/Vagrantfile +5 -1
- data/data/common.json +4 -3
- data/freighthop.gemspec +1 -1
- data/lib/freighthop/cli/checks.rb +12 -0
- data/lib/freighthop/cli/help.rb +7 -0
- data/lib/freighthop/cli/init.rb +35 -0
- data/lib/freighthop/cli/ssh.rb +1 -0
- data/lib/freighthop/cli/vagrant.rb +1 -0
- data/lib/freighthop/cli.rb +5 -17
- data/lib/freighthop/config.rb +5 -1
- data/lib/freighthop/version.rb +1 -1
- data/lib/freighthop.rb +6 -1
- data/local_modules/freighthop/manifests/database/mysql/grant.pp +11 -0
- data/local_modules/freighthop/manifests/database/mysql.pp +5 -15
- data/local_modules/freighthop/manifests/database/postgres.pp +2 -2
- data/local_modules/freighthop/manifests/database.pp +3 -3
- data/local_modules/freighthop/manifests/init.pp +6 -23
- data/local_modules/freighthop/manifests/language/ruby.pp +5 -25
- data/local_modules/freighthop/manifests/language.pp +1 -4
- data/local_modules/freighthop/manifests/packages.pp +2 -12
- data/local_modules/freighthop/manifests/params.pp +19 -11
- data/local_modules/freighthop/manifests/web/apache.pp +60 -0
- data/local_modules/freighthop/manifests/web/nginx.pp +22 -0
- data/local_modules/freighthop/manifests/web/ssl.pp +13 -0
- data/local_modules/freighthop/manifests/web.pp +25 -21
- data/local_modules/freighthop/templates/apache/passenger.conf.erb +18 -0
- data/local_modules/freighthop/templates/nginx/vagrant-rails.conf.erb +5 -3
- data/modules/apache/CHANGELOG.md +172 -0
- data/modules/apache/CONTRIBUTING.md +234 -0
- data/modules/apache/Gemfile +25 -0
- data/modules/apache/LICENSE +15 -0
- data/modules/apache/Modulefile +12 -0
- data/modules/apache/README.md +1515 -0
- data/modules/apache/README.passenger.md +93 -0
- data/modules/apache/Rakefile +1 -0
- data/modules/apache/files/httpd +24 -0
- data/modules/apache/lib/puppet/provider/a2mod/a2mod.rb +35 -0
- data/modules/apache/lib/puppet/provider/a2mod/gentoo.rb +116 -0
- data/modules/apache/lib/puppet/provider/a2mod/modfix.rb +12 -0
- data/modules/apache/lib/puppet/provider/a2mod/redhat.rb +60 -0
- data/modules/apache/lib/puppet/provider/a2mod.rb +34 -0
- data/modules/apache/lib/puppet/type/a2mod.rb +30 -0
- data/modules/apache/manifests/balancer.pp +80 -0
- data/modules/apache/manifests/balancermember.pp +52 -0
- data/modules/apache/manifests/confd/no_accf.pp +10 -0
- data/modules/apache/manifests/default_confd_files.pp +12 -0
- data/modules/apache/manifests/default_mods/load.pp +8 -0
- data/modules/apache/manifests/default_mods.pp +108 -0
- data/modules/apache/manifests/dev.pp +11 -0
- data/modules/apache/manifests/init.pp +329 -0
- data/modules/apache/manifests/listen.pp +9 -0
- data/modules/apache/manifests/mod/alias.pp +17 -0
- data/modules/apache/manifests/mod/auth_basic.pp +3 -0
- data/modules/apache/manifests/mod/auth_kerb.pp +5 -0
- data/modules/apache/manifests/mod/authnz_ldap.pp +19 -0
- data/modules/apache/manifests/mod/autoindex.pp +12 -0
- data/modules/apache/manifests/mod/cache.pp +3 -0
- data/modules/apache/manifests/mod/cgi.pp +4 -0
- data/modules/apache/manifests/mod/cgid.pp +23 -0
- data/modules/apache/manifests/mod/dav.pp +3 -0
- data/modules/apache/manifests/mod/dav_fs.pp +20 -0
- data/modules/apache/manifests/mod/dav_svn.pp +5 -0
- data/modules/apache/manifests/mod/deflate.pp +12 -0
- data/modules/apache/manifests/mod/dev.pp +5 -0
- data/modules/apache/manifests/mod/dir.pp +21 -0
- data/modules/apache/manifests/mod/disk_cache.pp +24 -0
- data/modules/apache/manifests/mod/event.pp +54 -0
- data/modules/apache/manifests/mod/expires.pp +3 -0
- data/modules/apache/manifests/mod/fastcgi.pp +24 -0
- data/modules/apache/manifests/mod/fcgid.pp +3 -0
- data/modules/apache/manifests/mod/headers.pp +3 -0
- data/modules/apache/manifests/mod/include.pp +3 -0
- data/modules/apache/manifests/mod/info.pp +14 -0
- data/modules/apache/manifests/mod/itk.pp +64 -0
- data/modules/apache/manifests/mod/ldap.pp +12 -0
- data/modules/apache/manifests/mod/mime.pp +21 -0
- data/modules/apache/manifests/mod/mime_magic.pp +14 -0
- data/modules/apache/manifests/mod/negotiation.pp +12 -0
- data/modules/apache/manifests/mod/nss.pp +25 -0
- data/modules/apache/manifests/mod/passenger.pp +38 -0
- data/modules/apache/manifests/mod/perl.pp +3 -0
- data/modules/apache/manifests/mod/peruser.pp +73 -0
- data/modules/apache/manifests/mod/php.pp +26 -0
- data/modules/apache/manifests/mod/prefork.pp +74 -0
- data/modules/apache/manifests/mod/proxy.pp +15 -0
- data/modules/apache/manifests/mod/proxy_ajp.pp +4 -0
- data/modules/apache/manifests/mod/proxy_balancer.pp +10 -0
- data/modules/apache/manifests/mod/proxy_html.pp +28 -0
- data/modules/apache/manifests/mod/proxy_http.pp +4 -0
- data/modules/apache/manifests/mod/python.pp +5 -0
- data/modules/apache/manifests/mod/reqtimeout.pp +12 -0
- data/modules/apache/manifests/mod/rewrite.pp +4 -0
- data/modules/apache/manifests/mod/rpaf.pp +20 -0
- data/modules/apache/manifests/mod/setenvif.pp +12 -0
- data/modules/apache/manifests/mod/ssl.pp +26 -0
- data/modules/apache/manifests/mod/status.pp +42 -0
- data/modules/apache/manifests/mod/suphp.pp +14 -0
- data/modules/apache/manifests/mod/userdir.pp +17 -0
- data/modules/apache/manifests/mod/vhost_alias.pp +3 -0
- data/modules/apache/manifests/mod/worker.pp +75 -0
- data/modules/apache/manifests/mod/wsgi.pp +21 -0
- data/modules/apache/manifests/mod/xsendfile.pp +4 -0
- data/modules/apache/manifests/mod.pp +120 -0
- data/modules/apache/manifests/namevirtualhost.pp +9 -0
- data/modules/apache/manifests/package.pp +48 -0
- data/modules/apache/manifests/params.pp +207 -0
- data/modules/apache/manifests/peruser/multiplexer.pp +17 -0
- data/modules/apache/manifests/peruser/processor.pp +17 -0
- data/modules/apache/manifests/php.pp +18 -0
- data/modules/apache/manifests/proxy.pp +15 -0
- data/modules/apache/manifests/python.pp +18 -0
- data/modules/apache/manifests/service.pp +35 -0
- data/modules/apache/manifests/ssl.pp +18 -0
- data/modules/apache/manifests/vhost.pp +516 -0
- data/modules/apache/spec/acceptance/basic_spec.rb +12 -0
- data/modules/apache/spec/acceptance/class_spec.rb +58 -0
- data/modules/apache/spec/acceptance/default_mods_spec.rb +97 -0
- data/modules/apache/spec/acceptance/itk_spec.rb +35 -0
- data/modules/apache/spec/acceptance/mod_php_spec.rb +52 -0
- data/modules/apache/spec/acceptance/mod_suphp_spec.rb +44 -0
- data/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/default.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/vagrant.key +27 -0
- data/modules/apache/spec/acceptance/prefork_worker_spec.rb +81 -0
- data/modules/apache/spec/acceptance/service_spec.rb +19 -0
- data/modules/apache/spec/acceptance/vhost_spec.rb +290 -0
- data/modules/apache/spec/classes/apache_spec.rb +464 -0
- data/modules/apache/spec/classes/dev_spec.rb +38 -0
- data/modules/apache/spec/classes/mod/auth_kerb_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/authnz_ldap_spec.rb +65 -0
- data/modules/apache/spec/classes/mod/dav_svn_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/dev_spec.rb +23 -0
- data/modules/apache/spec/classes/mod/dir_spec.rb +88 -0
- data/modules/apache/spec/classes/mod/event_spec.rb +17 -0
- data/modules/apache/spec/classes/mod/fastcgi_spec.rb +32 -0
- data/modules/apache/spec/classes/mod/fcgid_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/info_spec.rb +99 -0
- data/modules/apache/spec/classes/mod/itk_spec.rb +31 -0
- data/modules/apache/spec/classes/mod/mime_magic_spec.rb +93 -0
- data/modules/apache/spec/classes/mod/passenger_spec.rb +112 -0
- data/modules/apache/spec/classes/mod/perl_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/peruser_spec.rb +17 -0
- data/modules/apache/spec/classes/mod/php_spec.rb +99 -0
- data/modules/apache/spec/classes/mod/prefork_spec.rb +47 -0
- data/modules/apache/spec/classes/mod/proxy_html_spec.rb +45 -0
- data/modules/apache/spec/classes/mod/python_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/rpaf_spec.rb +77 -0
- data/modules/apache/spec/classes/mod/ssl_spec.rb +53 -0
- data/modules/apache/spec/classes/mod/status_spec.rb +166 -0
- data/modules/apache/spec/classes/mod/suphp_spec.rb +27 -0
- data/modules/apache/spec/classes/mod/worker_spec.rb +44 -0
- data/modules/apache/spec/classes/mod/wsgi_spec.rb +54 -0
- data/modules/apache/spec/classes/params_spec.rb +21 -0
- data/modules/apache/spec/classes/service_spec.rb +109 -0
- data/modules/apache/spec/defines/mod_spec.rb +105 -0
- data/modules/apache/spec/defines/vhost_spec.rb +1152 -0
- data/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb +1 -0
- data/modules/apache/spec/spec.opts +4 -0
- data/modules/apache/spec/spec_helper.rb +1 -0
- data/modules/apache/spec/spec_helper_acceptance.rb +27 -0
- data/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb +184 -0
- data/modules/apache/templates/confd/no-accf.conf.erb +4 -0
- data/modules/apache/templates/httpd.conf.erb +92 -0
- data/modules/apache/templates/listen.erb +6 -0
- data/modules/apache/templates/mod/alias.conf.erb +9 -0
- data/modules/apache/templates/mod/authnz_ldap.conf.erb +5 -0
- data/modules/apache/templates/mod/autoindex.conf.erb +56 -0
- data/modules/apache/templates/mod/cgid.conf.erb +1 -0
- data/modules/apache/templates/mod/dav_fs.conf.erb +1 -0
- data/modules/apache/templates/mod/deflate.conf.erb +4 -0
- data/modules/apache/templates/mod/dir.conf.erb +1 -0
- data/modules/apache/templates/mod/disk_cache.conf.erb +8 -0
- data/modules/apache/templates/mod/event.conf.erb +9 -0
- data/modules/apache/templates/mod/fastcgi.conf.erb +6 -0
- data/modules/apache/templates/mod/info.conf.erb +6 -0
- data/modules/apache/templates/mod/itk.conf.erb +8 -0
- data/modules/apache/templates/mod/ldap.conf.erb +7 -0
- data/modules/apache/templates/mod/mime.conf.erb +36 -0
- data/modules/apache/templates/mod/mime_magic.conf.erb +1 -0
- data/modules/apache/templates/mod/mpm_event.conf.erb +9 -0
- data/modules/apache/templates/mod/negotiation.conf.erb +2 -0
- data/modules/apache/templates/mod/nss.conf.erb +228 -0
- data/modules/apache/templates/mod/passenger.conf.erb +30 -0
- data/modules/apache/templates/mod/peruser.conf.erb +12 -0
- data/modules/apache/templates/mod/php5.conf.erb +30 -0
- data/modules/apache/templates/mod/prefork.conf.erb +8 -0
- data/modules/apache/templates/mod/proxy.conf.erb +23 -0
- data/modules/apache/templates/mod/proxy_html.conf.erb +24 -0
- data/modules/apache/templates/mod/reqtimeout.conf.erb +2 -0
- data/modules/apache/templates/mod/rpaf.conf.erb +15 -0
- data/modules/apache/templates/mod/setenvif.conf.erb +34 -0
- data/modules/apache/templates/mod/ssl.conf.erb +24 -0
- data/modules/apache/templates/mod/status.conf.erb +12 -0
- data/modules/apache/templates/mod/suphp.conf.erb +19 -0
- data/modules/apache/templates/mod/userdir.conf.erb +19 -0
- data/modules/apache/templates/mod/worker.conf.erb +9 -0
- data/modules/apache/templates/mod/wsgi.conf.erb +13 -0
- data/modules/apache/templates/namevirtualhost.erb +8 -0
- data/modules/apache/templates/ports_header.erb +5 -0
- data/modules/apache/templates/vhost/_aliases.erb +12 -0
- data/modules/apache/templates/vhost/_block.erb +10 -0
- data/modules/apache/templates/vhost/_custom_fragment.erb +5 -0
- data/modules/apache/templates/vhost/_directories.erb +143 -0
- data/modules/apache/templates/vhost/_error_document.erb +7 -0
- data/modules/apache/templates/vhost/_fastcgi.erb +18 -0
- data/modules/apache/templates/vhost/_itk.erb +28 -0
- data/modules/apache/templates/vhost/_php_admin.erb +12 -0
- data/modules/apache/templates/vhost/_proxy.erb +20 -0
- data/modules/apache/templates/vhost/_rack.erb +7 -0
- data/modules/apache/templates/vhost/_redirect.erb +12 -0
- data/modules/apache/templates/vhost/_requestheader.erb +10 -0
- data/modules/apache/templates/vhost/_rewrite.erb +40 -0
- data/modules/apache/templates/vhost/_scriptalias.erb +24 -0
- data/modules/apache/templates/vhost/_serveralias.erb +7 -0
- data/modules/apache/templates/vhost/_setenv.erb +12 -0
- data/modules/apache/templates/vhost/_ssl.erb +41 -0
- data/modules/apache/templates/vhost/_suphp.erb +11 -0
- data/modules/apache/templates/vhost/_wsgi.erb +15 -0
- data/modules/apache/templates/vhost.conf.erb +63 -0
- data/modules/apache/tests/apache.pp +6 -0
- data/modules/apache/tests/dev.pp +1 -0
- data/modules/apache/tests/init.pp +1 -0
- data/modules/apache/tests/mod_load_params.pp +11 -0
- data/modules/apache/tests/mods.pp +9 -0
- data/modules/apache/tests/mods_custom.pp +16 -0
- data/modules/apache/tests/php.pp +4 -0
- data/modules/apache/tests/vhost.pp +237 -0
- data/modules/apache/tests/vhost_directories.pp +30 -0
- data/modules/apache/tests/vhost_ip_based.pp +25 -0
- data/modules/apache/tests/vhost_ssl.pp +23 -0
- data/modules/apache/tests/vhosts_without_listen.pp +53 -0
- data/modules/freighthop/manifests/database/mysql/grant.pp +11 -0
- data/modules/freighthop/manifests/database/mysql.pp +5 -15
- data/modules/freighthop/manifests/database/postgres.pp +2 -2
- data/modules/freighthop/manifests/database.pp +3 -3
- data/modules/freighthop/manifests/init.pp +6 -23
- data/modules/freighthop/manifests/language/ruby.pp +5 -25
- data/modules/freighthop/manifests/language.pp +1 -4
- data/modules/freighthop/manifests/packages.pp +2 -12
- data/modules/freighthop/manifests/params.pp +19 -11
- data/modules/freighthop/manifests/web/apache.pp +60 -0
- data/modules/freighthop/manifests/web/nginx.pp +22 -0
- data/modules/freighthop/manifests/web/ssl.pp +13 -0
- data/modules/freighthop/manifests/web.pp +25 -21
- data/modules/freighthop/templates/apache/passenger.conf.erb +18 -0
- data/modules/freighthop/templates/nginx/vagrant-rails.conf.erb +5 -3
- data/modules/rbenv/AUTHORS +11 -0
- data/modules/rbenv/CHANGELOG.md +70 -0
- data/modules/rbenv/Gemfile +5 -10
- data/modules/rbenv/Gemfile.lock +16 -58
- data/modules/rbenv/Modulefile +7 -7
- data/modules/rbenv/README.md +156 -20
- data/modules/rbenv/Rakefile +18 -24
- data/modules/rbenv/TODO +10 -0
- data/modules/rbenv/bin/autospec +16 -0
- data/modules/rbenv/bin/facter +16 -0
- data/modules/rbenv/bin/filebucket +16 -0
- data/modules/rbenv/bin/hiera +16 -0
- data/modules/rbenv/bin/htmldiff +16 -0
- data/modules/rbenv/bin/ldiff +16 -0
- data/modules/rbenv/bin/pi +16 -0
- data/modules/rbenv/bin/puppet +16 -0
- data/modules/rbenv/bin/puppet-lint +16 -0
- data/modules/rbenv/bin/puppet-module +16 -0
- data/modules/rbenv/bin/puppetca +16 -0
- data/modules/rbenv/bin/puppetd +16 -0
- data/modules/rbenv/bin/puppetdoc +16 -0
- data/modules/rbenv/bin/puppetmasterd +16 -0
- data/modules/rbenv/bin/puppetqd +16 -0
- data/modules/rbenv/bin/puppetrun +16 -0
- data/modules/rbenv/bin/rake +16 -0
- data/modules/rbenv/bin/ralsh +16 -0
- data/modules/rbenv/bin/rspec +16 -0
- data/modules/rbenv/bin/rspec-puppet-init +16 -0
- data/modules/rbenv/lib/puppet/provider/rbenvgem/default.rb +50 -0
- data/modules/rbenv/lib/puppet/type/rbenvgem.rb +62 -0
- data/modules/rbenv/manifests/bundle.pp +36 -0
- data/modules/rbenv/manifests/client.pp +48 -0
- data/modules/rbenv/manifests/compile.pp +102 -0
- data/modules/rbenv/manifests/definition.pp +31 -0
- data/modules/rbenv/manifests/dependencies/centos.pp +25 -0
- data/modules/rbenv/manifests/dependencies/suse.pp +28 -0
- data/modules/rbenv/manifests/dependencies/ubuntu.pp +17 -0
- data/modules/rbenv/manifests/dependencies.pp +8 -0
- data/modules/rbenv/manifests/gem.pp +29 -0
- data/modules/rbenv/manifests/install.pp +55 -0
- data/modules/rbenv/manifests/plugin/rbenvvars.pp +16 -0
- data/modules/rbenv/manifests/plugin/rubybuild.pp +16 -0
- data/modules/rbenv/manifests/plugin.pp +40 -0
- data/modules/rbenv/metadata.json +99 -31
- data/modules/rbenv/spec/classes/dependencies_spec.rb +20 -0
- data/modules/rbenv/spec/defines/rbenv__compile_spec.rb +34 -0
- data/modules/rbenv/spec/defines/rbenv__definition_spec.rb +40 -0
- data/modules/rbenv/spec/defines/rbenv__install_spec.rb +24 -0
- data/modules/rbenv/spec/defines/rbenv__plugin__rbenvvars_spec.rb +14 -0
- data/modules/rbenv/spec/defines/rbenv__plugin__rubybuild_spec.rb +14 -0
- data/modules/rbenv/spec/defines/rbenv__plugin_spec.rb +31 -0
- data/modules/rbenv/spec/fixtures/manifests/site.pp +0 -0
- data/modules/rbenv/spec/spec_helper.rb +6 -1
- data/modules/rbenv/templates/Gemfile.erb +5 -0
- data/modules/rbenv/templates/dot.rbenvrc.erb +8 -0
- metadata +271 -23
- data/modules/rbenv/CHANGELOG +0 -33
- data/modules/rbenv/LICENSE +0 -20
- data/modules/rbenv/manifests/alias.pp +0 -32
- data/modules/rbenv/manifests/global.pp +0 -22
- data/modules/rbenv/manifests/init.pp +0 -30
- data/modules/rbenv/manifests/params.pp +0 -16
- data/modules/rbenv/manifests/rehash.pp +0 -28
- data/modules/rbenv/manifests/version.pp +0 -63
- data/modules/rbenv/spec/classes/rbenv__global_spec.rb +0 -31
- data/modules/rbenv/spec/classes/rbenv_spec.rb +0 -30
- data/modules/rbenv/spec/defines/rbenv__alias_spec.rb +0 -22
- data/modules/rbenv/spec/defines/rbenv__rehash_spec.rb +0 -22
- data/modules/rbenv/spec/defines/rbenv__version_spec.rb +0 -60
- data/modules/rbenv/spec/spec_helper_system.rb +0 -16
- data/modules/rbenv/spec/system/basic_spec.rb +0 -13
- data/modules/rbenv/templates/etc/profile.d/rbenv.sh.erb +0 -2
- data/modules/rbenv/tests/init.pp +0 -12
@@ -0,0 +1,75 @@
|
|
1
|
+
class apache::mod::worker (
|
2
|
+
$startservers = '2',
|
3
|
+
$maxclients = '150',
|
4
|
+
$minsparethreads = '25',
|
5
|
+
$maxsparethreads = '75',
|
6
|
+
$threadsperchild = '25',
|
7
|
+
$maxrequestsperchild = '0',
|
8
|
+
$serverlimit = '25',
|
9
|
+
) {
|
10
|
+
if defined(Class['apache::mod::event']) {
|
11
|
+
fail('May not include both apache::mod::worker and apache::mod::event on the same node')
|
12
|
+
}
|
13
|
+
if defined(Class['apache::mod::itk']) {
|
14
|
+
fail('May not include both apache::mod::worker and apache::mod::itk on the same node')
|
15
|
+
}
|
16
|
+
if defined(Class['apache::mod::peruser']) {
|
17
|
+
fail('May not include both apache::mod::worker and apache::mod::peruser on the same node')
|
18
|
+
}
|
19
|
+
if defined(Class['apache::mod::prefork']) {
|
20
|
+
fail('May not include both apache::mod::worker and apache::mod::prefork on the same node')
|
21
|
+
}
|
22
|
+
File {
|
23
|
+
owner => 'root',
|
24
|
+
group => $apache::params::root_group,
|
25
|
+
mode => '0644',
|
26
|
+
}
|
27
|
+
|
28
|
+
# Template uses:
|
29
|
+
# - $startservers
|
30
|
+
# - $maxclients
|
31
|
+
# - $minsparethreads
|
32
|
+
# - $maxsparethreads
|
33
|
+
# - $threadsperchild
|
34
|
+
# - $maxrequestsperchild
|
35
|
+
# - $serverlimit
|
36
|
+
file { "${apache::mod_dir}/worker.conf":
|
37
|
+
ensure => file,
|
38
|
+
content => template('apache/mod/worker.conf.erb'),
|
39
|
+
require => Exec["mkdir ${apache::mod_dir}"],
|
40
|
+
before => File[$apache::mod_dir],
|
41
|
+
notify => Service['httpd'],
|
42
|
+
}
|
43
|
+
|
44
|
+
case $::osfamily {
|
45
|
+
'redhat': {
|
46
|
+
file_line { '/etc/sysconfig/httpd worker enable':
|
47
|
+
ensure => present,
|
48
|
+
path => '/etc/sysconfig/httpd',
|
49
|
+
line => 'HTTPD=/usr/sbin/httpd.worker',
|
50
|
+
match => '#?HTTPD=/usr/sbin/httpd.worker',
|
51
|
+
notify => Service['httpd'],
|
52
|
+
}
|
53
|
+
}
|
54
|
+
'debian': {
|
55
|
+
file { "${apache::mod_enable_dir}/worker.conf":
|
56
|
+
ensure => link,
|
57
|
+
target => "${apache::mod_dir}/worker.conf",
|
58
|
+
require => Exec["mkdir ${apache::mod_enable_dir}"],
|
59
|
+
before => File[$apache::mod_enable_dir],
|
60
|
+
notify => Service['httpd'],
|
61
|
+
}
|
62
|
+
package { 'apache2-mpm-worker':
|
63
|
+
ensure => present,
|
64
|
+
}
|
65
|
+
}
|
66
|
+
'freebsd' : {
|
67
|
+
class { 'apache::package':
|
68
|
+
mpm_module => 'worker'
|
69
|
+
}
|
70
|
+
}
|
71
|
+
default: {
|
72
|
+
fail("Unsupported osfamily ${::osfamily}")
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class apache::mod::wsgi (
|
2
|
+
$wsgi_socket_prefix = undef,
|
3
|
+
$wsgi_python_path = undef,
|
4
|
+
$wsgi_python_home = undef,
|
5
|
+
){
|
6
|
+
apache::mod { 'wsgi': }
|
7
|
+
|
8
|
+
# Template uses:
|
9
|
+
# - $wsgi_socket_prefix
|
10
|
+
# - $wsgi_python_path
|
11
|
+
# - $wsgi_python_home
|
12
|
+
file {'wsgi.conf':
|
13
|
+
ensure => file,
|
14
|
+
path => "${apache::mod_dir}/wsgi.conf",
|
15
|
+
content => template('apache/mod/wsgi.conf.erb'),
|
16
|
+
require => Exec["mkdir ${apache::mod_dir}"],
|
17
|
+
before => File[$apache::mod_dir],
|
18
|
+
notify => Service['httpd']
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
@@ -0,0 +1,120 @@
|
|
1
|
+
define apache::mod (
|
2
|
+
$package = undef,
|
3
|
+
$package_ensure = 'present',
|
4
|
+
$lib = undef,
|
5
|
+
$lib_path = $apache::params::lib_path,
|
6
|
+
$id = undef,
|
7
|
+
$path = undef,
|
8
|
+
) {
|
9
|
+
if ! defined(Class['apache']) {
|
10
|
+
fail('You must include the apache base class before using any apache defined resources')
|
11
|
+
}
|
12
|
+
|
13
|
+
$mod = $name
|
14
|
+
#include apache #This creates duplicate resources in rspec-puppet
|
15
|
+
$mod_dir = $apache::mod_dir
|
16
|
+
|
17
|
+
# Determine if we have special lib
|
18
|
+
$mod_libs = $apache::params::mod_libs
|
19
|
+
$mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
|
20
|
+
if $lib {
|
21
|
+
$_lib = $lib
|
22
|
+
} elsif "${mod_lib}" {
|
23
|
+
$_lib = $mod_lib
|
24
|
+
} else {
|
25
|
+
$_lib = "mod_${mod}.so"
|
26
|
+
}
|
27
|
+
|
28
|
+
# Determine if declaration specified a path to the module
|
29
|
+
if $path {
|
30
|
+
$_path = $path
|
31
|
+
} else {
|
32
|
+
$_path = "${lib_path}/${_lib}"
|
33
|
+
}
|
34
|
+
|
35
|
+
if $id {
|
36
|
+
$_id = $id
|
37
|
+
} else {
|
38
|
+
$_id = "${mod}_module"
|
39
|
+
}
|
40
|
+
|
41
|
+
# Determine if we have a package
|
42
|
+
$mod_packages = $apache::params::mod_packages
|
43
|
+
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack
|
44
|
+
if $package {
|
45
|
+
$_package = $package
|
46
|
+
} elsif "${mod_package}" {
|
47
|
+
$_package = $mod_package
|
48
|
+
}
|
49
|
+
if $_package and ! defined(Package[$_package]) {
|
50
|
+
# note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
|
51
|
+
# httpd.conf with 'LoadModule' directives; here, by proper resource
|
52
|
+
# ordering, we ensure that our version of httpd.conf is reverted after
|
53
|
+
# the module gets installed.
|
54
|
+
$package_before = $::osfamily ? {
|
55
|
+
'freebsd' => [
|
56
|
+
File["${mod_dir}/${mod}.load"],
|
57
|
+
File["${apache::params::conf_dir}/${apache::params::conf_file}"]
|
58
|
+
],
|
59
|
+
default => File["${mod_dir}/${mod}.load"],
|
60
|
+
}
|
61
|
+
# $_package may be an array
|
62
|
+
package { $_package:
|
63
|
+
ensure => $package_ensure,
|
64
|
+
require => Package['httpd'],
|
65
|
+
before => $package_before,
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
file { "${mod}.load":
|
70
|
+
ensure => file,
|
71
|
+
path => "${mod_dir}/${mod}.load",
|
72
|
+
owner => 'root',
|
73
|
+
group => $apache::params::root_group,
|
74
|
+
mode => '0644',
|
75
|
+
content => "LoadModule ${_id} ${_path}\n",
|
76
|
+
require => [
|
77
|
+
Package['httpd'],
|
78
|
+
Exec["mkdir ${mod_dir}"],
|
79
|
+
],
|
80
|
+
before => File[$mod_dir],
|
81
|
+
notify => Service['httpd'],
|
82
|
+
}
|
83
|
+
|
84
|
+
if $::osfamily == 'Debian' {
|
85
|
+
$enable_dir = $apache::mod_enable_dir
|
86
|
+
file{ "${mod}.load symlink":
|
87
|
+
ensure => link,
|
88
|
+
path => "${enable_dir}/${mod}.load",
|
89
|
+
target => "${mod_dir}/${mod}.load",
|
90
|
+
owner => 'root',
|
91
|
+
group => $apache::params::root_group,
|
92
|
+
mode => '0644',
|
93
|
+
require => [
|
94
|
+
File["${mod}.load"],
|
95
|
+
Exec["mkdir ${enable_dir}"],
|
96
|
+
],
|
97
|
+
before => File[$enable_dir],
|
98
|
+
notify => Service['httpd'],
|
99
|
+
}
|
100
|
+
# Each module may have a .conf file as well, which should be
|
101
|
+
# defined in the class apache::mod::module
|
102
|
+
# Some modules do not require this file.
|
103
|
+
if defined(File["${mod}.conf"]) {
|
104
|
+
file{ "${mod}.conf symlink":
|
105
|
+
ensure => link,
|
106
|
+
path => "${enable_dir}/${mod}.conf",
|
107
|
+
target => "${mod_dir}/${mod}.conf",
|
108
|
+
owner => 'root',
|
109
|
+
group => $apache::params::root_group,
|
110
|
+
mode => '0644',
|
111
|
+
require => [
|
112
|
+
File["${mod}.conf"],
|
113
|
+
Exec["mkdir ${enable_dir}"],
|
114
|
+
],
|
115
|
+
before => File[$enable_dir],
|
116
|
+
notify => Service['httpd'],
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
class apache::package (
|
2
|
+
$ensure = 'present',
|
3
|
+
$mpm_module = $apache::params::mpm_module,
|
4
|
+
) {
|
5
|
+
case $::osfamily {
|
6
|
+
'freebsd' : {
|
7
|
+
$all_mpms = [
|
8
|
+
'www/apache22',
|
9
|
+
'www/apache22-worker-mpm',
|
10
|
+
'www/apache22-event-mpm',
|
11
|
+
'www/apache22-itk-mpm',
|
12
|
+
'www/apache22-peruser-mpm',
|
13
|
+
]
|
14
|
+
if $mpm_module {
|
15
|
+
$apache_package = $mpm_module ? {
|
16
|
+
'prefork' => 'www/apache22',
|
17
|
+
default => "www/apache22-${mpm_module}-mpm"
|
18
|
+
}
|
19
|
+
} else {
|
20
|
+
$apache_package = 'www/apache22'
|
21
|
+
}
|
22
|
+
$other_mpms = delete($all_mpms, $apache_package)
|
23
|
+
# Configure ports to have apache module packages dependent on correct
|
24
|
+
# version of apache package (apache22, apache22-worker-mpm, ...)
|
25
|
+
file_line { 'APACHE_PORT in /etc/make.conf':
|
26
|
+
ensure => $ensure,
|
27
|
+
path => '/etc/make.conf',
|
28
|
+
line => "APACHE_PORT=${apache_package}",
|
29
|
+
match => "^\\s*#?\\s*APACHE_PORT\\s*=\\s*",
|
30
|
+
before => Package['httpd'],
|
31
|
+
}
|
32
|
+
# remove other packages
|
33
|
+
ensure_resource('package', $other_mpms, {
|
34
|
+
ensure => absent,
|
35
|
+
before => Package['httpd'],
|
36
|
+
require => File_line['APACHE_PORT in /etc/make.conf'],
|
37
|
+
})
|
38
|
+
}
|
39
|
+
default: {
|
40
|
+
$apache_package = $apache::params::apache_name
|
41
|
+
}
|
42
|
+
}
|
43
|
+
package { 'httpd':
|
44
|
+
ensure => $ensure,
|
45
|
+
name => $apache_package,
|
46
|
+
notify => Class['Apache::Service'],
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# Class: apache::params
|
2
|
+
#
|
3
|
+
# This class manages Apache parameters
|
4
|
+
#
|
5
|
+
# Parameters:
|
6
|
+
# - The $user that Apache runs as
|
7
|
+
# - The $group that Apache runs as
|
8
|
+
# - The $apache_name is the name of the package and service on the relevant
|
9
|
+
# distribution
|
10
|
+
# - The $php_package is the name of the package that provided PHP
|
11
|
+
# - The $ssl_package is the name of the Apache SSL package
|
12
|
+
# - The $apache_dev is the name of the Apache development libraries package
|
13
|
+
# - The $conf_contents is the contents of the Apache configuration file
|
14
|
+
#
|
15
|
+
# Actions:
|
16
|
+
#
|
17
|
+
# Requires:
|
18
|
+
#
|
19
|
+
# Sample Usage:
|
20
|
+
#
|
21
|
+
class apache::params {
|
22
|
+
# This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, 3 on Amazon, etc.
|
23
|
+
$osr_array = split($::operatingsystemrelease,'[\/\.]')
|
24
|
+
$distrelease = $osr_array[0]
|
25
|
+
if ! $distrelease {
|
26
|
+
fail("Class['apache::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
|
27
|
+
}
|
28
|
+
|
29
|
+
if($::fqdn) {
|
30
|
+
$servername = $::fqdn
|
31
|
+
} else {
|
32
|
+
$servername = $::hostname
|
33
|
+
}
|
34
|
+
|
35
|
+
# The default error log level
|
36
|
+
$log_level = 'warn'
|
37
|
+
|
38
|
+
if $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
|
39
|
+
$user = 'apache'
|
40
|
+
$group = 'apache'
|
41
|
+
$root_group = 'root'
|
42
|
+
$apache_name = 'httpd'
|
43
|
+
$service_name = 'httpd'
|
44
|
+
$httpd_dir = '/etc/httpd'
|
45
|
+
$server_root = '/etc/httpd'
|
46
|
+
$conf_dir = "${httpd_dir}/conf"
|
47
|
+
$confd_dir = "${httpd_dir}/conf.d"
|
48
|
+
$mod_dir = "${httpd_dir}/conf.d"
|
49
|
+
$vhost_dir = "${httpd_dir}/conf.d"
|
50
|
+
$conf_file = 'httpd.conf'
|
51
|
+
$ports_file = "${conf_dir}/ports.conf"
|
52
|
+
$logroot = '/var/log/httpd'
|
53
|
+
$lib_path = 'modules'
|
54
|
+
$mpm_module = 'prefork'
|
55
|
+
$dev_packages = 'httpd-devel'
|
56
|
+
$default_ssl_cert = '/etc/pki/tls/certs/localhost.crt'
|
57
|
+
$default_ssl_key = '/etc/pki/tls/private/localhost.key'
|
58
|
+
$ssl_certs_dir = '/etc/pki/tls/certs'
|
59
|
+
$passenger_root = '/usr/share/rubygems/gems/passenger-3.0.17'
|
60
|
+
$passenger_ruby = '/usr/bin/ruby'
|
61
|
+
$suphp_addhandler = 'php5-script'
|
62
|
+
$suphp_engine = 'off'
|
63
|
+
$suphp_configpath = undef
|
64
|
+
$mod_packages = {
|
65
|
+
'auth_kerb' => 'mod_auth_kerb',
|
66
|
+
'authnz_ldap' => 'mod_authz_ldap',
|
67
|
+
'fastcgi' => 'mod_fastcgi',
|
68
|
+
'fcgid' => 'mod_fcgid',
|
69
|
+
'passenger' => 'mod_passenger',
|
70
|
+
'perl' => 'mod_perl',
|
71
|
+
'php5' => $distrelease ? {
|
72
|
+
'5' => 'php53',
|
73
|
+
default => 'php',
|
74
|
+
},
|
75
|
+
'proxy_html' => 'mod_proxy_html',
|
76
|
+
'python' => 'mod_python',
|
77
|
+
'shibboleth' => 'shibboleth',
|
78
|
+
'ssl' => 'mod_ssl',
|
79
|
+
'wsgi' => 'mod_wsgi',
|
80
|
+
'dav_svn' => 'mod_dav_svn',
|
81
|
+
'suphp' => 'mod_suphp',
|
82
|
+
'xsendfile' => 'mod_xsendfile',
|
83
|
+
'nss' => 'mod_nss',
|
84
|
+
}
|
85
|
+
$mod_libs = {
|
86
|
+
'php5' => 'libphp5.so',
|
87
|
+
'nss' => 'libmodnss.so',
|
88
|
+
}
|
89
|
+
$conf_template = 'apache/httpd.conf.erb'
|
90
|
+
$keepalive = 'Off'
|
91
|
+
$keepalive_timeout = 15
|
92
|
+
$fastcgi_lib_path = undef
|
93
|
+
$mime_support_package = 'mailcap'
|
94
|
+
$mime_types_config = '/etc/mime.types'
|
95
|
+
} elsif $::osfamily == 'Debian' {
|
96
|
+
$user = 'www-data'
|
97
|
+
$group = 'www-data'
|
98
|
+
$root_group = 'root'
|
99
|
+
$apache_name = 'apache2'
|
100
|
+
$service_name = 'apache2'
|
101
|
+
$httpd_dir = '/etc/apache2'
|
102
|
+
$server_root = '/etc/apache2'
|
103
|
+
$conf_dir = $httpd_dir
|
104
|
+
$confd_dir = "${httpd_dir}/conf.d"
|
105
|
+
$mod_dir = "${httpd_dir}/mods-available"
|
106
|
+
$mod_enable_dir = "${httpd_dir}/mods-enabled"
|
107
|
+
$vhost_dir = "${httpd_dir}/sites-available"
|
108
|
+
$vhost_enable_dir = "${httpd_dir}/sites-enabled"
|
109
|
+
$conf_file = 'apache2.conf'
|
110
|
+
$ports_file = "${conf_dir}/ports.conf"
|
111
|
+
$logroot = '/var/log/apache2'
|
112
|
+
$lib_path = '/usr/lib/apache2/modules'
|
113
|
+
$mpm_module = 'worker'
|
114
|
+
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
|
115
|
+
$default_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
116
|
+
$default_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key'
|
117
|
+
$ssl_certs_dir = '/etc/ssl/certs'
|
118
|
+
$passenger_root = '/usr'
|
119
|
+
$passenger_ruby = '/usr/bin/ruby'
|
120
|
+
$suphp_addhandler = 'x-httpd-php'
|
121
|
+
$suphp_engine = 'off'
|
122
|
+
$suphp_configpath = '/etc/php5/apache2'
|
123
|
+
$mod_packages = {
|
124
|
+
'auth_kerb' => 'libapache2-mod-auth-kerb',
|
125
|
+
'dav_svn' => 'libapache2-svn',
|
126
|
+
'fastcgi' => 'libapache2-mod-fastcgi',
|
127
|
+
'fcgid' => 'libapache2-mod-fcgid',
|
128
|
+
'nss' => 'libapache2-mod-nss',
|
129
|
+
'passenger' => 'libapache2-mod-passenger',
|
130
|
+
'perl' => 'libapache2-mod-perl2',
|
131
|
+
'php5' => 'libapache2-mod-php5',
|
132
|
+
'proxy_html' => 'libapache2-mod-proxy-html',
|
133
|
+
'python' => 'libapache2-mod-python',
|
134
|
+
'rpaf' => 'libapache2-mod-rpaf',
|
135
|
+
'suphp' => 'libapache2-mod-suphp',
|
136
|
+
'wsgi' => 'libapache2-mod-wsgi',
|
137
|
+
'xsendfile' => 'libapache2-mod-xsendfile',
|
138
|
+
}
|
139
|
+
$mod_libs = {
|
140
|
+
'php5' => 'libphp5.so',
|
141
|
+
}
|
142
|
+
$conf_template = 'apache/httpd.conf.erb'
|
143
|
+
$keepalive = 'Off'
|
144
|
+
$keepalive_timeout = 15
|
145
|
+
$fastcgi_lib_path = '/var/lib/apache2/fastcgi'
|
146
|
+
$mime_support_package = 'mime-support'
|
147
|
+
$mime_types_config = '/etc/mime.types'
|
148
|
+
} elsif $::osfamily == 'FreeBSD' {
|
149
|
+
$user = 'www'
|
150
|
+
$group = 'www'
|
151
|
+
$root_group = 'wheel'
|
152
|
+
$apache_name = 'apache22'
|
153
|
+
$service_name = 'apache22'
|
154
|
+
$httpd_dir = '/usr/local/etc/apache22'
|
155
|
+
$server_root = '/usr/local'
|
156
|
+
$conf_dir = $httpd_dir
|
157
|
+
$confd_dir = "${httpd_dir}/Includes"
|
158
|
+
$mod_dir = "${httpd_dir}/Modules"
|
159
|
+
$mod_enable_dir = undef
|
160
|
+
$vhost_dir = "${httpd_dir}/Vhosts"
|
161
|
+
$vhost_enable_dir = undef
|
162
|
+
$conf_file = 'httpd.conf'
|
163
|
+
$ports_file = "${conf_dir}/ports.conf"
|
164
|
+
$logroot = '/var/log/apache22'
|
165
|
+
$lib_path = '/usr/local/libexec/apache22'
|
166
|
+
$mpm_module = 'prefork'
|
167
|
+
$dev_packages = undef
|
168
|
+
$default_ssl_cert = '/usr/local/etc/apache22/server.crt'
|
169
|
+
$default_ssl_key = '/usr/local/etc/apache22/server.key'
|
170
|
+
$ssl_certs_dir = '/usr/local/etc/apache22'
|
171
|
+
$passenger_root = '/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.10'
|
172
|
+
$passenger_ruby = '/usr/bin/ruby'
|
173
|
+
$suphp_addhandler = 'php5-script'
|
174
|
+
$suphp_engine = 'off'
|
175
|
+
$suphp_configpath = undef
|
176
|
+
$mod_packages = {
|
177
|
+
# NOTE: I list here only modules that are not included in www/apache22
|
178
|
+
# NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config
|
179
|
+
# NOTE: 'php' needs to enable APACHE option in make config
|
180
|
+
# NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config
|
181
|
+
# NOTE: not sure where the shibboleth should come from
|
182
|
+
# NOTE: don't know where the shibboleth module should come from
|
183
|
+
'auth_kerb' => 'www/mod_auth_kerb2',
|
184
|
+
'fcgid' => 'www/mod_fcgid',
|
185
|
+
'passenger' => 'www/rubygem-passenger',
|
186
|
+
'perl' => 'www/mod_perl2',
|
187
|
+
'php5' => 'lang/php5',
|
188
|
+
'proxy_html' => 'www/mod_proxy_html',
|
189
|
+
'python' => 'www/mod_python3',
|
190
|
+
'wsgi' => 'www/mod_wsgi',
|
191
|
+
'dav_svn' => 'devel/subversion',
|
192
|
+
'xsendfile' => 'www/mod_xsendfile',
|
193
|
+
'rpaf' => 'www/mod_rpaf2'
|
194
|
+
}
|
195
|
+
$mod_libs = {
|
196
|
+
'php5' => 'libphp5.so',
|
197
|
+
}
|
198
|
+
$conf_template = 'apache/httpd.conf.erb'
|
199
|
+
$keepalive = 'Off'
|
200
|
+
$keepalive_timeout = 15
|
201
|
+
$fastcgi_lib_path = undef # TODO: revisit
|
202
|
+
$mime_support_package = 'misc/mime-support'
|
203
|
+
$mime_types_config = '/usr/local/etc/mime.types'
|
204
|
+
} else {
|
205
|
+
fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}")
|
206
|
+
}
|
207
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
define apache::peruser::multiplexer (
|
2
|
+
$user = $apache::user,
|
3
|
+
$group = $apache::group,
|
4
|
+
$file = undef,
|
5
|
+
) {
|
6
|
+
if ! $file {
|
7
|
+
$filename = "${name}.conf"
|
8
|
+
} else {
|
9
|
+
$filename = $file
|
10
|
+
}
|
11
|
+
file { "${apache::mod_dir}/peruser/multiplexers/${filename}":
|
12
|
+
ensure => file,
|
13
|
+
content => "Multiplexer ${user} ${group}\n",
|
14
|
+
require => File["${apache::mod_dir}/peruser/multiplexers"],
|
15
|
+
notify => Service['httpd'],
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
define apache::peruser::processor (
|
2
|
+
$user,
|
3
|
+
$group,
|
4
|
+
$file = undef,
|
5
|
+
) {
|
6
|
+
if ! $file {
|
7
|
+
$filename = "${name}.conf"
|
8
|
+
} else {
|
9
|
+
$filename = $file
|
10
|
+
}
|
11
|
+
file { "${apache::mod_dir}/peruser/processors/${filename}":
|
12
|
+
ensure => file,
|
13
|
+
content => "Processor ${user} ${group}\n",
|
14
|
+
require => File["${apache::mod_dir}/peruser/processors"],
|
15
|
+
notify => Service['httpd'],
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Class: apache::php
|
2
|
+
#
|
3
|
+
# This class installs PHP for Apache
|
4
|
+
#
|
5
|
+
# Parameters:
|
6
|
+
# - $php_package
|
7
|
+
#
|
8
|
+
# Actions:
|
9
|
+
# - Install Apache PHP package
|
10
|
+
#
|
11
|
+
# Requires:
|
12
|
+
#
|
13
|
+
# Sample Usage:
|
14
|
+
#
|
15
|
+
class apache::php {
|
16
|
+
warning('apache::php is deprecated; please use apache::mod::php')
|
17
|
+
include apache::mod::php
|
18
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Class: apache::proxy
|
2
|
+
#
|
3
|
+
# This class enabled the proxy module for Apache
|
4
|
+
#
|
5
|
+
# Actions:
|
6
|
+
# - Enables Apache Proxy module
|
7
|
+
#
|
8
|
+
# Requires:
|
9
|
+
#
|
10
|
+
# Sample Usage:
|
11
|
+
#
|
12
|
+
class apache::proxy {
|
13
|
+
warning('apache::proxy is deprecated; please use apache::mod::proxy')
|
14
|
+
include apache::mod::proxy
|
15
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Class: apache::python
|
2
|
+
#
|
3
|
+
# This class installs Python for Apache
|
4
|
+
#
|
5
|
+
# Parameters:
|
6
|
+
# - $php_package
|
7
|
+
#
|
8
|
+
# Actions:
|
9
|
+
# - Install Apache Python package
|
10
|
+
#
|
11
|
+
# Requires:
|
12
|
+
#
|
13
|
+
# Sample Usage:
|
14
|
+
#
|
15
|
+
class apache::python {
|
16
|
+
warning('apache::python is deprecated; please use apache::mod::python')
|
17
|
+
include apache::mod::python
|
18
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Class: apache::service
|
2
|
+
#
|
3
|
+
# Manages the Apache daemon
|
4
|
+
#
|
5
|
+
# Parameters:
|
6
|
+
#
|
7
|
+
# Actions:
|
8
|
+
# - Manage Apache service
|
9
|
+
#
|
10
|
+
# Requires:
|
11
|
+
#
|
12
|
+
# Sample Usage:
|
13
|
+
#
|
14
|
+
# sometype { 'foo':
|
15
|
+
# notify => Class['apache::service],
|
16
|
+
# }
|
17
|
+
#
|
18
|
+
#
|
19
|
+
class apache::service (
|
20
|
+
$service_name = $apache::params::service_name,
|
21
|
+
$service_enable = true,
|
22
|
+
$service_ensure = 'running',
|
23
|
+
) {
|
24
|
+
# The base class must be included first because parameter defaults depend on it
|
25
|
+
if ! defined(Class['apache::params']) {
|
26
|
+
fail('You must include the apache::params class before using any apache defined resources')
|
27
|
+
}
|
28
|
+
validate_bool($service_enable)
|
29
|
+
|
30
|
+
service { 'httpd':
|
31
|
+
ensure => $service_ensure,
|
32
|
+
name => $service_name,
|
33
|
+
enable => $service_enable,
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Class: apache::ssl
|
2
|
+
#
|
3
|
+
# This class installs Apache SSL capabilities
|
4
|
+
#
|
5
|
+
# Parameters:
|
6
|
+
# - The $ssl_package name from the apache::params class
|
7
|
+
#
|
8
|
+
# Actions:
|
9
|
+
# - Install Apache SSL capabilities
|
10
|
+
#
|
11
|
+
# Requires:
|
12
|
+
#
|
13
|
+
# Sample Usage:
|
14
|
+
#
|
15
|
+
class apache::ssl {
|
16
|
+
warning('apache::ssl is deprecated; please use apache::mod::ssl')
|
17
|
+
include apache::mod::ssl
|
18
|
+
}
|