- hosts: localhost pre_tasks: - name: verify running as root ansible.builtin.fail: when: ansible_user_id != "root" tags: always roles: - role: workstation