Issue 1:
Bug Report

COMPONENT NAME

zypper_module

ANSIBLE VERSION

ansible 2.2.1.0

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

I have in a role a tasks/main.yml which contains:

- include: library/setup_packages.yml
vars:
pkg: "{{ item }}"
state: present
with_items:
- "{{ wanted_packages | default([]) }}"
tags:
- packages

and a library/setup_packages.yml which contains:

---
- debug:
msg: "{{ pkg }} -> {{ state }}"

- zypper:
pkg: "{{ pkg }}"
state: "{{ state }}"

When I call this with a list wanted_packages like this:

wanted_packages:

rlwrap=0.37-2.1

This fails for me because there are two versions of rlwrap in the repository directory. Only the older one is installable in my context. So I tried to set a specific version. But the zypper module generates a commandline with both "rlwrap=0.37-2.1" AND "rlwrap" which leads into a failure.

The output is:

TASK [oracle : debug] **********************************************************
ok: [hhlokora12-tpl] => {
"msg": "rlwrap=0.37-2.1 -> present"
}

TASK [oracle : zypper] *********************************************************
fatal: [hhlokora12-tpl]: FAILED! => {"changed": false, "cmd": ["/usr/bin/zypper", "--quiet", "--non-interactive", "--xmlout", "install", "--type", "package", "--auto-agree-with-licenses", "--no-recommends", "--oldpackage", "--", "rlwrap=0.37-2.1", "rlwrap"], "failed": true, "msg": "Zypper run command failed with return code 4.", "rc": 4, "stderr": "", "stdout": "<?xml version='1.0'?>\n<stream>\n<prompt id=\"1\">\n<description>Problem: nothing provides libreadline.so.5()(64bit) needed by rlwrap-0.42-24.1.x86_64\n Solution 1: do not install rlwrap-0.42-24.1.x86_64\n Solution 2: break rlwrap-0.42-24.1.x86_64 by ignoring some of its dependencies\n</description>\n<text>Choose from above solutions by number or cancel</text>\n<option value=\"1\" desc=\"\"/>\n<option value=\"2\" desc=\"\"/>\n<option default=\"1\" value=\"c\" desc=\"\"/>\n</prompt>\n</stream>\n", "stdout_lines": ["<?xml version='1.0'?>", "<stream>", "<prompt id=\"1\">", "<description>Problem: nothing provides libreadline.so.5()(64bit) needed by rlwrap-0.42-24.1.x86_64", " Solution 1: do not install rlwrap-0.42-24.1.x86_64", " Solution 2: break rlwrap-0.42-24.1.x86_64 by ignoring some of its dependencies", "</description>", "<text>Choose from above solutions by number or cancel</text>", "<option value=\"1\" desc=\"\"/>", "<option value=\"2\" desc=\"\"/>", "<option default=\"1\" value=\"c\" desc=\"\"/>", "</prompt>", "</stream>"]}

Why is it expanding to both?

If it is needed a switch like exact_version or so which leads only to the specific version would be nice.

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Issue 2:
ISSUE TYPE

Bug Report

ANSIBLE VERSION

ansible 2.0.1.0
config file = /home/ansible/.ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

Trying to delete multiple files

STEPS TO REPRODUCE

- name: Cleanup install scripts and binaries
file: path={{ target_path }}/xxx.bin state=absent
file: path={{ target_path }}/yyy.ksh state=absent
file: path={{ target_path }}/zzz state=absent

EXPECTED RESULTS

Able to delete multiple files

ACTUAL RESULTS

only one of the three files are removed.

I have done some deep googling with little success

Thanks