diff --git a/ansible/roles/common/templates/heka.json.j2 b/ansible/roles/common/templates/heka.json.j2
index 94bd31d1e1b43876c8d79c6bc22e05fbebc2b4dd..a23162d0195653c24edd575f7a9076a240fea144 100644
--- a/ansible/roles/common/templates/heka.json.j2
+++ b/ansible/roles/common/templates/heka.json.j2
@@ -19,7 +19,8 @@
             "source": "{{ container_config_directory }}/heka-haproxy.toml",
             "dest": "/etc/heka/heka-haproxy.toml",
             "owner": "heka",
-            "perm": "0600"
+            "perm": "0600",
+            "optional": {{ (not enable_haproxy | bool) | string | lower }}
         },
         {
             "source": "{{ container_config_directory }}/heka-rabbitmq.toml",