Global settings

#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the ‘-r’ option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2

So, what are you saying? What is it that you want to match?
The URL begins with /dcos but the ACL url_dcos does not work?

You still only posted your template configuration with Ansible variables. Post the configuration that haproxy actually uses. Also post that http log, and when you post the curl output, do not cut out the most important information, that is the request URI.

The configuration which is send is the one installed using Ansible playbook which is copied to the management server below /etc/haproxy/haproxy.cfg , would you like to see the haproxy.cfg content after installation?

Yes, I would like the see the configuration file that haproxy reads from your hard disk before starting.
And the log output, as well as the COMPLETE request from the tcpdump output, not only the last part of it that you posted above.