Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/143528
Change subject: apache: get rid of apache::vhost ...................................................................... apache: get rid of apache::vhost * Get rid of apache::vhost and its template. It is no longer in use. * Get rid of LICENSE since there is literally not a single line left from the PuppetLabs module. Change-Id: Iabec0a4d4e8b12ff7f4a6f2cde177e9166f88548 --- D modules/apache/LICENSE D modules/apache/manifests/vhost.pp D modules/apache/templates/vhost-default.conf.erb 3 files changed, 0 insertions(+), 146 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/143528/1 diff --git a/modules/apache/LICENSE b/modules/apache/LICENSE deleted file mode 100644 index 8961ce8..0000000 --- a/modules/apache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -Copyright (C) 2012 Puppet Labs Inc - -Puppet Labs can be contacted at: [email protected] - -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/modules/apache/manifests/vhost.pp b/modules/apache/manifests/vhost.pp deleted file mode 100644 index f1462eb..0000000 --- a/modules/apache/manifests/vhost.pp +++ /dev/null @@ -1,97 +0,0 @@ -# Definition: apache::vhost -# -# This class installs Apache Virtual Hosts -# -# Parameters: -# - The $port to configure the host on -# - The $docroot provides the DocumentationRoot 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 $template option specifies whether to use the default template or -# override -# - The $priority of the site -# - The $servername is the primary name of the virtual host -# - The $serveraliases of the site -# - The $options for the given vhost -# - The $override for the given vhost (array of AllowOverride arguments) -# - The $vhost_name for name based virtualhosting, defaulting to * -# - The $ensure specifies if vhost file is present or absent. -# -# Actions: -# - Install Apache Virtual Hosts -# -# Requires: -# - The apache class -# -# Sample Usage: -# apache::vhost { 'site.name.fqdn': -# priority => '20', -# port => '80', -# docroot => '/path/to/docroot', -# } -# -define apache::vhost( - $port, - $docroot, - $docroot_owner = 'root', - $docroot_group = 'root', - $docroot_dir_order = 'allow,deny', - $docroot_dir_allows = ['all'], - $docroot_dir_denies = '', - $serveradmin = false, - $ssl = true, - $template = 'apache/vhost-default.conf.erb', - $priority = '25', - $servername = '', - $serveraliases = '', - $auth = false, - $redirect_ssl = false, - $options = 'Indexes FollowSymLinks MultiViews', - $override = 'None', - $vhost_name = '*', - $ensure = 'present' -) { - validate_re($ensure, '^(present|absent)$', "ensure must be 'present' or 'absent' (got: '${ensure}')") - - include ::apache - - if $servername == '' { - $srvname = $name - } else { - $srvname = $servername - } - - if $ssl == true { - include apache::mod::ssl - } - - # Since the template will use auth, redirect to https requires mod_rewrite - if $redirect_ssl == true { - include apache::mod::rewrite - } - - # This ensures that the docroot exists - # But enables it to be specified across multiple vhost resources - if ! defined(File[$docroot]) { - file { $docroot: - ensure => directory, - owner => $docroot_owner, - group => $docroot_group, - } - } - - file { "${priority}-${name}.conf": - ensure => $ensure, - path => "/etc/apache2/sites-enabled/${priority}-${name}.conf", - content => template($template), - owner => 'root', - group => 'root', - mode => '0755', - require => [ - Package['apache2'], - File[$docroot], - ], - notify => Service['apache2'], - } -} diff --git a/modules/apache/templates/vhost-default.conf.erb b/modules/apache/templates/vhost-default.conf.erb deleted file mode 100644 index c60cd32..0000000 --- a/modules/apache/templates/vhost-default.conf.erb +++ /dev/null @@ -1,34 +0,0 @@ -# ************************************ -# Default template in module puppetlabs-apache -# Managed by Puppet -# ************************************ - -NameVirtualHost <%= vhost_name %>:<%= port %> -<VirtualHost <%= vhost_name %>:<%= port %>> - ServerName <%= srvname %> -<% if serveradmin %> - ServerAdmin <%= serveradmin %> -<% end %> -<% if serveraliases.is_a? Array -%> -<% serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%> -<% elsif serveraliases != '' -%> -<%= " ServerAlias #{serveraliases}" %> -<% end -%> - DocumentRoot <%= docroot %> - <Directory <%= docroot %>> - Options <%= options %> - AllowOverride <%= Array(override).join(' ') %> - Order <%= docroot_dir_order %> - <% if docroot_dir_allows.is_a? Array %> - allow from <%= docroot_dir_allows.join(' ') %> - <% end %> - <% if docroot_dir_denies.is_a? Array %> - deny from <%= docroot_dir_denies.join(' ') %> - <% end %> - </Directory> - ErrorLog /var/log/apache2/<%= name %>_error.log - LogLevel warn - CustomLog /var/log/apache2/<%= name %>_access.log combined - ServerSignature Off -</VirtualHost> - -- To view, visit https://gerrit.wikimedia.org/r/143528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabec0a4d4e8b12ff7f4a6f2cde177e9166f88548 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
