realityforge/chef-kibana — pull request #18 by rafaelmagu (2014-02-16 19:38:11+00:00)
Title: Adding conditional to Apache vhosts to prevent warnings after logrotation

When the Apache cookbook is included, the ports.conf file insite /etc/apache2/ gets a NameVirtualHost line for each port in node['apache']['listen_ports'].

This cookbook's vhost templates already include a NameVirtualHost, which causes Apache to spit out an error every week during log rotation. The fix included in this PR just checks if the kibana port is already included in Apache's listen_ports, and avoids the duplication of the NameVirtualHost line for ports that have already been defined.