Friday, December 9, 2016

Ansible 2.2 with_items Deprecation

Prior to 2.2, this worked
- name: do something
# do something here
with_items: ec2.instances

However, this has been deprecated. Changelog item: "with_ 'bare variable' handling, now loop items must always be templated {{ }} or they will be considered as plain strings"

It's now required to do this:
- name: do something
# do something here
with_items: "{{ ec2.instances }}"


References: