From 937584cd525d1f268989b9094c996d5147bca3e5 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 9 Nov 2015 14:50:39 -0500 Subject: [PATCH] Ensure 'environment' is set in the magic variables Fixes #13033 --- lib/ansible/vars/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index a332bbd2c7..402a975fc0 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -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