Hello guys,
I've recently updated ansible to v1.8.1 and I'm having some issues with
some playbooks that worked on older ansible versions.
For example I've a reusable role that manages the installation of packages
with the following task:
- name: Install additional packages
apt: name={{ item }} update_cache=yes
with_items: additional_packages|default([])
Where the variable additional_packages is usually not defined, but can be
set on a per host or per group base.
On older versions this worked as expected:
- if additional_packages is *not* defined, default to an empty list and
skip the task
- if additional_packages is defined, install the packages in the list
Now in v1.8.1 I get the following error:
TASK: [pkgs | Install additional packages]
*********************************
fatal: [hal9000] => with_items expects a list or a set
FATAL: all hosts have already failed -- aborting
Was this an intended change or is it a bug?
Best regards,
EP
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5040f80d-3f60-4a41-bdde-a14c20c5ac68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.