--- - hosts: webservers tasks: - name: Inclui task de instalação do Apache include_tasks: 3.1-install-apache.yaml - name: Inclui task de configuração do Apache include_tasks: 3.2-configure-apache.yaml handlers: - name: Restart Apache when: ansible_os_family == "Debian" ansible.builtin.service: name: apache2 state: restarted - name: Restart Httpd when: ansible_os_family == "RedHat" ansible.builtin.service: name: httpd state: restarted enabled: yes