diff options
-rw-r--r-- | test/integration/targets/apt/tasks/apt.yml | 9 | ||||
-rw-r--r-- | test/integration/targets/dnf/tasks/dnf.yml | 4 | ||||
-rw-r--r-- | test/integration/targets/pip/tasks/pip.yml | 10 | ||||
-rw-r--r-- | test/integration/targets/yum/tasks/repo.yml | 18 | ||||
-rw-r--r-- | test/integration/targets/yum/tasks/yum.yml | 5 | ||||
-rw-r--r-- | test/integration/targets/yum/tasks/yum_group_remove.yml | 18 |
6 files changed, 29 insertions, 35 deletions
diff --git a/test/integration/targets/apt/tasks/apt.yml b/test/integration/targets/apt/tasks/apt.yml index 9a51a7609e..f9fcdfe3d0 100644 --- a/test/integration/targets/apt/tasks/apt.yml +++ b/test/integration/targets/apt/tasks/apt.yml @@ -283,11 +283,12 @@ - name: Clean up apt: - name: "{{ item }}" + name: "{{ pkgs }}" state: absent - with_items: - - libcaca-dev - - libslang2-dev + vars: + pkgs: + - libcaca-dev + - libslang2-dev # https://github.com/ansible/ansible/issues/38995 - name: build-dep for a package diff --git a/test/integration/targets/dnf/tasks/dnf.yml b/test/integration/targets/dnf/tasks/dnf.yml index 0b013d0e10..9ae8f84796 100644 --- a/test/integration/targets/dnf/tasks/dnf.yml +++ b/test/integration/targets/dnf/tasks/dnf.yml @@ -197,9 +197,7 @@ - name: install non-existent rpm dnf: - name: "{{ item }}" - with_items: - - does-not-exist + name: does-not-exist register: non_existent_rpm ignore_errors: True diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml index 3ff453289c..3dd451a630 100644 --- a/test/integration/targets/pip/tasks/pip.yml +++ b/test/integration/targets/pip/tasks/pip.yml @@ -80,16 +80,8 @@ - name: now put it back in case someone wanted it (like us!) pip: - name: "{{ item }}" + name: "{{ pip_test_packages }}" 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 diff --git a/test/integration/targets/yum/tasks/repo.yml b/test/integration/targets/yum/tasks/repo.yml index 6334a385fd..630659d4a9 100644 --- a/test/integration/targets/yum/tasks/repo.yml +++ b/test/integration/targets/yum/tasks/repo.yml @@ -385,11 +385,12 @@ - name: install dinginessentail both archs yum: - name: "{{ item }}" + name: "{{ pkgs }}" state: present - with_items: - - "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm" - - "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm" + vars: + pkgs: + - "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm" + - "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm" - name: try to install lower version of dinginessentail from rpm file, without allow_downgrade, just one arch yum: @@ -424,11 +425,12 @@ - name: install dinginessentail both archs yum: - name: "{{ item }}" + name: "{{ pkgs }}" state: present - with_items: - - "{{ repodir }}/dinginessentail-1.0-1.x86_64.rpm" - - "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm" + vars: + pkgs: + - "{{ repodir }}/dinginessentail-1.0-1.x86_64.rpm" + - "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm" - name: Update both arch in one task using rpm files yum: diff --git a/test/integration/targets/yum/tasks/yum.yml b/test/integration/targets/yum/tasks/yum.yml index bf70882ed0..e2683e2280 100644 --- a/test/integration/targets/yum/tasks/yum.yml +++ b/test/integration/targets/yum/tasks/yum.yml @@ -301,9 +301,8 @@ yum: name=sos,bc state=removed - name: install non-existent rpm - yum: name="{{ item }}" - with_items: - - does-not-exist + yum: + name: does-not-exist register: non_existent_rpm ignore_errors: True diff --git a/test/integration/targets/yum/tasks/yum_group_remove.yml b/test/integration/targets/yum/tasks/yum_group_remove.yml index 5a681c70d4..22c6dcb11c 100644 --- a/test/integration/targets/yum/tasks/yum_group_remove.yml +++ b/test/integration/targets/yum/tasks/yum_group_remove.yml @@ -1,19 +1,21 @@ - name: install a group to test and yum-utils yum: - name: "{{ item }}" + name: "{{ pkgs }}" state: present - with_items: - - "@Custom Group" - - yum-utils + vars: + pkgs: + - "@Custom Group" + - yum-utils when: ansible_pkg_mgr == "yum" - name: install a group to test and dnf-utils yum: - name: "{{ item }}" + name: "{{ pkgs }}" state: present - with_items: - - "@Custom Group" - - dnf-utils + vars: + pkgs: + - "@Custom Group" + - dnf-utils when: ansible_pkg_mgr == "dnf" - name: check mode remove the group |