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