mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Allow empty list of names in pip module (#38789)
pip 10 gives exit code 1 for empty argument lists (pip < 10 gave exit 0) see also https://github.com/pypa/pip/pull/4210 To still allow playbooks to pass when giving empty lists, don't call pip in that case, but show a warning.
This commit is contained in:
committed by
Martin Krizek
parent
42953c40ce
commit
d6e711b1de
@@ -208,3 +208,14 @@
|
||||
assert:
|
||||
that:
|
||||
- "venv_chdir.changed"
|
||||
|
||||
# ansible#38785
|
||||
- name: allow empty list of packages
|
||||
pip:
|
||||
name: []
|
||||
register: pip_install_empty
|
||||
|
||||
- name: ensure empty install is successful
|
||||
assert:
|
||||
that:
|
||||
- not pip_install_empty.changed
|
||||
|
||||
Reference in New Issue
Block a user