Mark Bergsma has submitted this change and it was merged. Change subject: contint: simplify apache listen template ......................................................................
contint: simplify apache listen template I am not sure what I had in mind previously, but using a bunch of non working ruby was not really smart. The localvhost template now accepts 'port' and would simply make Apache listen locally for HTTP. Change-Id: I7ae6bb2047da1e4fa07bf234bf5e499f91b30da7 --- M modules/contint/manifests/localvhost.pp M modules/contint/templates/apache/listen.erb 2 files changed, 3 insertions(+), 16 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/contint/manifests/localvhost.pp b/modules/contint/manifests/localvhost.pp index cb08cb8..9078c92 100644 --- a/modules/contint/manifests/localvhost.pp +++ b/modules/contint/manifests/localvhost.pp @@ -27,10 +27,6 @@ content => template('contint/apache/localvhost.erb'), } - $apache_listens = [ - { 'ip' => '127.0.0.1', 'port' => $port, 'proto' => 'http', }, - { 'ip' => '[::1]', 'port' => $port, 'proto' => 'http', }, - ] file { "/etc/apache2/conf.d/listen-localhost-${port}": content => template('contint/apache/listen.erb'), } diff --git a/modules/contint/templates/apache/listen.erb b/modules/contint/templates/apache/listen.erb index af917a9..5317ea1 100644 --- a/modules/contint/templates/apache/listen.erb +++ b/modules/contint/templates/apache/listen.erb @@ -4,15 +4,6 @@ ###################################################################### # Ports Apache is listening to in addition to the default ports: -<% -# Apache Listen format is: -# Listen [IP-address:]portnumber [protocol] -@apache_listens.sort.each do |l| - # Tweak ip and proto to match Apache format - ip = l.fetch('ip', '') - ip += ':' if ip != '' - proto = l.fetch('protocol', '') - proto = ' ' + proto if proto != '' --%> - Listen <%= ip -%><%= l.fetch('port') -%><%= proto -%> -<% end -%> + +Listen 127.0.0.1:<%= @port %> http +Listen [::1]:<%= @port %> http -- To view, visit https://gerrit.wikimedia.org/r/86836 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ae6bb2047da1e4fa07bf234bf5e499f91b30da7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar <has...@free.fr> Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits