diff --git a/lib/ansible/vars/__init__.py b/lib/ansible/vars/__init__.py index 2d116854390..8c098b30f10 100644 --- a/lib/ansible/vars/__init__.py +++ b/lib/ansible/vars/__init__.py @@ -213,6 +213,8 @@ class VariableManager: # FIXME: make sure all special vars are here # Finally, we create special vars + all_vars['playbook_dir'] = loader.get_basedir() + if host: all_vars['groups'] = [group.name for group in host.get_groups()]