--- - yum: name="{{ item }}" state=latest update_cache=yes with_items: - nmap-ncat - git - screen - vim - ntp - haproxy - socat - name: Configure the haproxy cnf file with hosts template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg notify: restart haproxy - name: Start the haproxy service service: name=haproxy state=started enabled=yes