Ensure 'environment' is set in the magic variables

Fixes #13033
This commit is contained in:
James Cammarata 2015-11-09 14:50:39 -05:00
parent d6f61d5397
commit 937584cd52

View file

@ -366,6 +366,7 @@ class VariableManager:
variables['role_names'] = [r._role_name for r in play.roles]
if task:
variables['environment'] = task.environment
if task._role:
variables['role_path'] = task._role._role_path