You do have to set it on a per task basis, at least presently.
The best way to do this is to assign it to a task variable, on each task, just
- some_module: some_args=1234
environment: my_env
I'm open to including environment as a playbook value also, it's just something that's not there presently. If it were, it would need to have the task ones merged in each time so the play variables get overriden if any of the same ones are set.
Pull requests would be entertained and welcome (and awesome), otherwise open a feature request on github?