- name: vérifier les services de riseup hosts: localhost become: true become_user: root vars: server_name: localhost tasks: - name: Make sure there is no 'apache2' systemd: name: apache2 state: stopped enabled: no register: result_apache - name: Make sure 'nginx' is started systemd: name: nginx state: started enabled: yes register: result_nginx - name: Show result debug: msg: "{{ result_nginx }}"