- hosts: localhost tasks: - name: Enable haproxy service service: name: haproxy state: started enabled: true