Public bug reported:

The ansible-2.5.1+dfsg-1 package that is included in the Ubuntu 18.04.2
LTS is faulty. Adding items to a list inside a loop using set_fact will
actually only keep the last item of the list. This is a known problem
upstream [1] and has been fixed in Ansible 2.5.2. This currently renders
Ansible unusable in my use case.

Backport of this fix or update to at least 2.5.2 would be crucial to fix
the issue.

olli@FI-00000770:~/ansible$ ansible --version
ansible 2.5.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/eollsal/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]

olli@FI-00000770:~/ansible$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

References:
[1] https://github.com/ansible/ansible/issues/38991

** Affects: ansible (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1825096

Title:
  ansible: set_fact in with_items append loop only keeps last item

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ansible/+bug/1825096/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to