--- # configure haproxy.cfg - name: "config - haproxy.cfg" ansible.builtin.template: src: "templates/haproxy.cfg.j2" dest: "/etc/haproxy/haproxy.cfg" owner: "root" group: "root" mode: "0644" validate: "haproxy -c -f %s" notify: "restart haproxy"