--- - hosts: all # Apply to all hosts in the inventory file remote_user: root tasks: - name: perform sample compliance checking to ensure that firewall service is running service: name: "{{ item }}" state: started enabled: yes with_items: - firewalld