Problems with Ansible 2.2

Hi Everyone,

Please forgive any mistakes as I am a noob to this community.

I just tried running an existing ansible solution on a new Ansible 2.2.0.0-1 version, and it is not happy. I have a role setup to install apache that works in previous versions of ansible, but now it doesnt seem to like the format of my vars files, which I have in standard list format.

I havent been found any documents that state what changes I need to make to my existing playbooks to make them compatible with Ansible 2.2, or any older formats that were deprecated in 2.2?

Here are some more specific details, my playbook first runs a task to set a fact called “apache_packages”, which runs successfully. Next another tasks looks for this “apache_packages” variable, and can’t find it when I run 2.2, but running 2.1.2 it was working:
(note: both these screen shots are from the same play, I changed terminal color to increase clarity)

On the changelog for 2.2 which you can see at https://github.com/ansible/ansible/blob/devel/CHANGELOG.md#removed-deprecated

with_ ‘bare variable’ handling, now loop items must always be templated {{ }} or they will be considered as plain strings.

The change that needs to happen is that your with_items should look like:

with_items: “{{ apache_packages }}”

(attachments)






Thanks so much!