How to get current role name in an ansible task January 3, 2024 by Tarik The simplest way is to just use the following {{role_path|basename}}