1 2 3 4 5 6
- name: restart tor systemd: name: tor state: restarted enabled: true when: ansible_facts['service_mgr'] == 'systemd'