ansible 2.5.1 need upgrade to 2.5.2 or 2.5.3 (bug with set_facts)

Bug #1780278 reported by George Shuklin
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ansible
Fix Released
Unknown
ansible (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Version of ansible 2.5.1 has a nasty bug. Following playbook will show foo == [3], when every other version of ansible (including 2.5.0 and 2.5.3, 2.4 and 2.6) show that foo == [1,2,3].

Please, upload a newer minor version of ansible.

Playbook in question:

 - hosts: localhost
   tasks:
     - set_fact:
         foo: []
     - set_fact:
         foo: '{{ foo + [item] }}'
       with_items: [1, 2, 3]
     - debug: var=foo

Affected version: 2.5.1+dfsg-1

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ansible 2.5.1+dfsg-1
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: X-Cinnamon
Date: Thu Jul 5 17:03:46 2018
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-xenial-amd64-20160624-2
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-06-22 (378 days ago)
InstallationMedia: Ubuntu 16.04 "Xenial" - Build amd64 LIVE Binary 20160624-10:47
PackageArchitecture: all
SourcePackage: ansible
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.ansible.ansible.cfg: [modified]
mtime.conffile..etc.ansible.ansible.cfg: 2018-04-05T15:38:10.672150

Revision history for this message
George Shuklin (george-shuklin) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ansible (Ubuntu):
status: New → Confirmed
Revision history for this message
Nicolas Delvaux (malizor) wrote :

Note that Debian Stretch Backport is already up to date. So this is just a matter of syncing version 2.5.2+dfsg-1~bpo9+1 from there.

Revision history for this message
Delvento (delvento) wrote :

Moreover, ansible v2.5.1 is affected by https://github.com/ansible/ansible/issues/54618 which has been (partially) fixed in v2.5.3 so I recommend going to v2.5.3 not v2.5.2

Revision history for this message
Bryce Harrington (bryce) wrote :

The append to list bug is also reported in 1825096, but this bug report can focus on the upstream issue https://github.com/ansible/ansible/issues/54618 that's from 2.5.3.

Changed in ansible:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.