Remove use of the equalto filter in Jinja

equalto is only supported with Jinja >= 2.8 which isn't always
the installed version.

Change-Id: I0f241ec28c1f258143bb850051fdc5153f103d42
diff --git a/apache/meta/heka.yml b/apache/meta/heka.yml
index e488815..b2ff1f3 100644
--- a/apache/meta/heka.yml
+++ b/apache/meta/heka.yml
@@ -1,9 +1,17 @@
 {%- from "apache/map.jinja" import server with context %}
-{%- if server.get('enabled', False) and server.get('site', {}).values()|selectattr("type", "equalto", "keystone")|list|length > 0 %}
 
+{# Build a dict of Apache sites we are interested in #}
+{%- set apache_sites = {} %}
+{%- for site_name, site in server.get('site', {}).iteritems() if server.get('enabled', True) %}
+{%- if site.type == 'keystone' %}
+{%- do apache_sites.update({site_name: site}) %}
+{%- endif %}
+{%- endfor %}
+
+{%- if apache_sites|list|length > 0 %}
 log_collector:
   decoder:
-{%- for site_name, site in server.site.iteritems() %}
+{%- for site_name, site in apache_sites.iteritems() %}
 {%- if site.type == 'keystone' %}
     keystone_wsgi:
       engine: sandbox
@@ -16,7 +24,7 @@
 {%- endfor %}
 
   input:
-{%- for site_name, site in server.site.iteritems() %}
+{%- for site_name, site in apache_sites.iteritems() %}
 {%- if site.type == 'keystone' %}
 {%- set apache_log_file = site.get('log', {}).get('custom', {}).file|default(server.log_dir ~ '/' ~ site_name ~ '.access.log') %}
     keystone_wsgi_log:
@@ -29,8 +37,8 @@
       splitter: "TokenSplitter"
 {%- endif %}
 {%- endfor %}
-
 {%- endif %}
+
 {%- if server.get('enabled', False) %}
 metric_collector:
   trigger: