--- - name: Install haproxy package community.general.pacman: name: - haproxy - name: Deploy haproxy config template: src: haproxy.cfg.j2 dest: /etc/haproxy/haproxy.cfg lstrip_blocks: true - name: Enable haproxy service systemd: name: haproxy enabled: yes state: started