From 2ba9e35d09226f7c3664bf343f11043708a58997 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 24 Aug 2021 17:17:08 +0200 Subject: yum: fix yumstate when wildcards are used in list arg (#75545) Fixes #74557 * map is not available on centos 6's jinja... --- test/integration/targets/yum/tasks/repo.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/integration/targets/yum') diff --git a/test/integration/targets/yum/tasks/repo.yml b/test/integration/targets/yum/tasks/repo.yml index c1a7a01654..f312b1ca3d 100644 --- a/test/integration/targets/yum/tasks/repo.yml +++ b/test/integration/targets/yum/tasks/repo.yml @@ -703,3 +703,27 @@ yum: name: dinginessentail,dinginessentail-olive,landsidescalping state: absent + +- block: + - yum: + name: dinginessentail + state: present + + - yum: + list: dinginessentail* + register: list_out + + - set_fact: + passed: true + loop: "{{ list_out.results }}" + when: item.yumstate == 'installed' + + - name: Test that there is yumstate=installed in the result + assert: + that: + - passed is defined + always: + - name: Clean up + yum: + name: dinginessentail + state: absent -- cgit v1.2.3