# Instance configuration for Baserock HAProxy instance. # # This playbook should be run after starting an instance of the Baserock # frontend image. --- - hosts: frontend-haproxy gather_facts: false sudo: yes tasks: - name: install SSL certificate copy: content: "{{ lookup('file', '../private/frontend-with-key.pem') }}" dest: /etc/pki/tls/private/baserock.pem owner: haproxy mode: 400 notify: - restart haproxy - name: HAProxy configuration copy: src: haproxy.cfg dest: /etc/haproxy/haproxy.cfg notify: - restart haproxy handlers: - name: restart haproxy service: name: haproxy enabled: true state: restarted