Fix for issue #2916 : for each host promote the host variables as global...

...ly scoped variables for the sake of the groups determination