summaryrefslogtreecommitdiff
path: root/test/integration/targets/yum
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2021-08-24 17:17:08 +0200
committerGitHub <noreply@github.com>2021-08-24 11:17:08 -0400
commit2ba9e35d09226f7c3664bf343f11043708a58997 (patch)
treecb528f478d5a98b900e069eabe6cafc42887011d /test/integration/targets/yum
parent3ca50a2200cba04b6fa82e27e485784cee011277 (diff)
downloadansible-2ba9e35d09226f7c3664bf343f11043708a58997.tar.gz
yum: fix yumstate when wildcards are used in list arg (#75545)
Fixes #74557 * map is not available on centos 6's jinja...
Diffstat (limited to 'test/integration/targets/yum')
-rw-r--r--test/integration/targets/yum/tasks/repo.yml24
1 files changed, 24 insertions, 0 deletions
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