diff options
author | Adam Miller <admiller@redhat.com> | 2019-10-02 10:05:12 -0500 |
---|---|---|
committer | Sam Doran <sdoran@redhat.com> | 2019-10-02 11:05:12 -0400 |
commit | 8bcf11fee9842af35efc66087c1195200cb2990e (patch) | |
tree | 81c7be3fc8cfadd8be2017efb69bbf514b148fca /test/integration/targets/yum | |
parent | 911aa6aab9aea867bc79e38684ab1b198fa36937 (diff) | |
download | ansible-8bcf11fee9842af35efc66087c1195200cb2990e.tar.gz |
dnf - properly handle idempotent removal of wildcard globs (#63034)
Signed-off-by: Adam Miller <admiller@redhat.com>
Diffstat (limited to 'test/integration/targets/yum')
-rw-r--r-- | test/integration/targets/yum/tasks/yum.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/integration/targets/yum/tasks/yum.yml b/test/integration/targets/yum/tasks/yum.yml index 800fe91289..bf70882ed0 100644 --- a/test/integration/targets/yum/tasks/yum.yml +++ b/test/integration/targets/yum/tasks/yum.yml @@ -693,6 +693,40 @@ yum_version: "{%- if item.yumstate == 'installed' -%}{{ item.version }}{%- else -%}{{ yum_version }}{%- endif -%}" with_items: "{{ yum_version.results }}" +- name: Ensure double uninstall of wildcard globs works + block: + - name: "Install lohit-*-fonts" + yum: + name: "lohit-*-fonts" + state: present + + - name: "Remove lohit-*-fonts (1st time)" + yum: + name: "lohit-*-fonts" + state: absent + register: remove_lohit_fonts_1 + + - name: "Verify lohit-*-fonts (1st time)" + assert: + that: + - "remove_lohit_fonts_1 is changed" + - "'msg' in remove_lohit_fonts_1" + - "'results' in remove_lohit_fonts_1" + + - name: "Remove lohit-*-fonts (2nd time)" + yum: + name: "lohit-*-fonts" + state: absent + register: remove_lohit_fonts_2 + + - name: "Verify lohit-*-fonts (2nd time)" + assert: + that: + - "remove_lohit_fonts_2 is not changed" + - "'msg' in remove_lohit_fonts_2" + - "'results' in remove_lohit_fonts_2" + - "'lohit-*-fonts is not installed' in remove_lohit_fonts_2['results']" + - block: - name: uninstall bc yum: name=bc state=removed |