---
- name: HAProxy defaults
  template: src=etc/default/haproxy dest=/etc/default/haproxy
  notify: restart haproxy

- name: haproxy ppa - required to get a version new enough to support ssl
  apt_repository: repo='ppa:vbernat/haproxy-1.5' update_cache=yes

- name: install haproxy
  apt: pkg=haproxy

# WORKAROUND: `service haproxy stop` fails due to incorrect `start-stop-daemon --pid`
- template: src=etc/init.d/haproxy dest=/etc/init.d/haproxy mode=0644

- name: install ssl cert+key
  template: >
    src=etc/haproxy/openstack.pem
    dest=/etc/haproxy/openstack.pem
    owner=haproxy
    group=haproxy
    mode=0600
  notify: reload haproxy
  tags:
    - ssl

---
- name: HAProxy defaults
  template: src=etc/default/haproxy dest=/etc/default/haproxy
  notify: restart haproxy

- name: haproxy ppa - required to get a version new enough to support ssl
  apt_repository: repo='ppa:vbernat/haproxy-1.5' update_cache=yes

- name: install haproxy
  apt: pkg=haproxy

# WORKAROUND: `service haproxy stop` fails due to incorrect `start-stop-daemon --pid`
- template: src=etc/init.d/haproxy dest=/etc/init.d/haproxy mode=0755

- name: install ssl cert+key
  template: >
    src=etc/haproxy/openstack.pem
    dest=/etc/haproxy/openstack.pem
    owner=haproxy
    group=haproxy
    mode=0600
  notify: reload haproxy
  tags:
    - ssl

Correct mode on service script
haproxy: Correct mode on service script
