Some useful magic variables
It is just magic
- role_name : current role name
- role_names : list of roles in current play
- groups : list of groups and their hosts
- inventory_hostname : name of current host
- play_hosts: list of hosts in current play
More https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html
Leave a comment