Use zuul | zuul_legacy_vars for legacy environment

Change-Id: I2ffe5731df66683a75fe3713b0d2416032bf6273
diff --git a/zuul/cmd/migrate.py b/zuul/cmd/migrate.py
index d714bcc..0c88482 100644
--- a/zuul/cmd/migrate.py
+++ b/zuul/cmd/migrate.py
@@ -43,7 +43,7 @@
 
 JOBS_BY_ORIG_TEMPLATE = {}  # type: ignore
 SUFFIXES = []  # type: ignore
-ENVIRONMENT = '{{ host_vars[inventory_hostname] | zuul_legacy_vars }}'
+ENVIRONMENT = '{{ zuul | zuul_legacy_vars }}'
 DESCRIPTION = """Migrate zuul v2 and Jenkins Job Builder to Zuul v3.
 
 This program takes a zuul v2 layout.yaml and a collection of Jenkins Job