Some devices return their description on multiple lines such as:
lldp.eth0.chassis.descr=cisco CISCO7609-S running on
Cisco IOS Software, c7600s72033_rp Software (c7600s72033_rp-IPSERVICESK9-M), Version 12.2(33)SRE3, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Wed 26-Jan-11 06:54 by prod_rel_team
The generated fact will result as:
"descr": "cisco CISCO7609-S running on"
This patch fixes the line wrapping to return the full description
handling line breaks:
"descr": "cisco CISCO7609-S running on\nCisco IOS Software, c7600s72033_rp Software (c7600s72033_rp-IPSERVICESK9-M), Version 12.2(33)SRE3, RELEASE SOFTWARE (fc1)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2011 by Cisco Systems, Inc.\nCompiled Wed 26-Jan-11 06:54 by prod_rel_team"
The device option was already implemented but omitted from docs and allowed
choices. With the addition of device, a devices failover_state can be
determined.
Fix bug in ansible get_package_state and get_current_version that breaks when there are multiple versions of a package installed and there is a list of packages to install.
The previous implementation used 'zip' to match requested names to installed names which fails, because rpm outputs multiple lines per package when there are multiple versions.
Testcase: Install opensuse, install multiple kernel versions (happens by update)
Before patch: calling
zypper: state=present for name={{item}}
with_items:
- kernel-desktop
- git
leads to ansible aborting.
After the patch ansible performs as expected and makes sure both packages are present.
Also the last version number is used for further update information in this version (before if only one package name was given the oldest version number was used).
According the patch(1) manpage:
The --directory option change to the directory dir immediately, before
doing anything else.
Thus if file is not relative to dir and making file absolute ensure that
patch will find it.
Prior to openssh 6.4, ssh-keygen -F returned 0 (and no output) when no
host was found. After then, it instead returned 1 and no output. This
revised code behaves correctly with either behaviour. There is
currently no other code path that results in exit(1) and no output.