1 2 3 4 5 6 7 8 9 10
- hosts: localhost pre_tasks: - name: verify running as root ansible.builtin.fail: when: ansible_user_id != "root" tags: always roles: - role: workstation