Integration tests: prevent loop squashing (#63847)

1. the feature will be deprecated in 2.11
2. these modules support passing lists
3. loop squashing does not work with collections
pull/63878/head
Martin Krizek 6 years ago committed by GitHub
parent d620a209a5
commit 18b9ce8b82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -283,9 +283,10 @@
- name: Clean up - name: Clean up
apt: apt:
name: "{{ item }}" name: "{{ pkgs }}"
state: absent state: absent
with_items: vars:
pkgs:
- libcaca-dev - libcaca-dev
- libslang2-dev - libslang2-dev

@ -197,9 +197,7 @@
- name: install non-existent rpm - name: install non-existent rpm
dnf: dnf:
name: "{{ item }}" name: does-not-exist
with_items:
- does-not-exist
register: non_existent_rpm register: non_existent_rpm
ignore_errors: True ignore_errors: True

@ -80,16 +80,8 @@
- name: now put it back in case someone wanted it (like us!) - name: now put it back in case someone wanted it (like us!)
pip: pip:
name: "{{ item }}" name: "{{ pip_test_packages }}"
state: present state: present
with_items: "{{ pip_test_packages }}"
register: squash_param
- name: check that list has been condensed
assert:
that:
- squash_param.results|length == 1
- squash_param.results[0].name|sort == pip_test_packages|sort
# Test virtualenv installations # Test virtualenv installations

@ -385,9 +385,10 @@
- name: install dinginessentail both archs - name: install dinginessentail both archs
yum: yum:
name: "{{ item }}" name: "{{ pkgs }}"
state: present state: present
with_items: vars:
pkgs:
- "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm" - "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm"
- "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm" - "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm"
@ -424,9 +425,10 @@
- name: install dinginessentail both archs - name: install dinginessentail both archs
yum: yum:
name: "{{ item }}" name: "{{ pkgs }}"
state: present state: present
with_items: vars:
pkgs:
- "{{ repodir }}/dinginessentail-1.0-1.x86_64.rpm" - "{{ repodir }}/dinginessentail-1.0-1.x86_64.rpm"
- "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm" - "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm"

@ -301,9 +301,8 @@
yum: name=sos,bc state=removed yum: name=sos,bc state=removed
- name: install non-existent rpm - name: install non-existent rpm
yum: name="{{ item }}" yum:
with_items: name: does-not-exist
- does-not-exist
register: non_existent_rpm register: non_existent_rpm
ignore_errors: True ignore_errors: True

@ -1,17 +1,19 @@
- name: install a group to test and yum-utils - name: install a group to test and yum-utils
yum: yum:
name: "{{ item }}" name: "{{ pkgs }}"
state: present state: present
with_items: vars:
pkgs:
- "@Custom Group" - "@Custom Group"
- yum-utils - yum-utils
when: ansible_pkg_mgr == "yum" when: ansible_pkg_mgr == "yum"
- name: install a group to test and dnf-utils - name: install a group to test and dnf-utils
yum: yum:
name: "{{ item }}" name: "{{ pkgs }}"
state: present state: present
with_items: vars:
pkgs:
- "@Custom Group" - "@Custom Group"
- dnf-utils - dnf-utils
when: ansible_pkg_mgr == "dnf" when: ansible_pkg_mgr == "dnf"

Loading…
Cancel
Save