1 2 3 4 5 6 7 8
- name: update grub command: update-grub - name: restart tor systemd: name: tor state: restarted when: ansible_facts['service_mgr'] == 'systemd'