Skip to content

Commit

Permalink
Re-adding role_names magic variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jimi-c committed Oct 22, 2015
1 parent 404ded2 commit 498c27d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ansible/vars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ def _get_magic_variables(self, loader, play, host, task, include_hostvars, inclu
variables['hostvars'] = hostvars
variables['vars'] = hostvars[host.get_name()]

if play:
variables['role_names'] = [r._role_name for r in play.roles]

if task:
if task._role:
variables['role_path'] = task._role._role_path
Expand Down

0 comments on commit 498c27d

Please sign in to comment.