With v1.8 the format of the env parameter is changed from list to dict.
The change was done after a bug report re the following (ansible/ansible#8199):
env="PG_ROLE=master,
PG_PORT=5432,
PG_ENABLE_ARCHIVING=1,
PG_ENABLE_WALE=1,
about 20 more..."
However, this could have been solved without the breaking change, just by using the list format in a normal way
Note that the examples in the module should be updated
env:
- PG_ROLE=master
- PG_PORT=5432
- PG_ENABLE_ARCHIVING=1
- PG_ENABLE_WALE=1
- about 20 more...
(this is a format I am currently using and is wrking fine)
This changes makes it impossible to reuse a playbook (and perhaps roles) between a <1.8 and >=1.8 environment.
I agree that a dict is to be preferred over a list, but the list was already defined. For such a minor version bump, I would not expect such a not-backward compatible change
see ansible/ansible#8199 / and ansible/ansible-modules-core/issues/197.
Hans