diff options
Diffstat (limited to 'test/integration/targets/yum/tasks/yum.yml')
-rw-r--r-- | test/integration/targets/yum/tasks/yum.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/targets/yum/tasks/yum.yml b/test/integration/targets/yum/tasks/yum.yml index 180a4696c7..e486eeb63c 100644 --- a/test/integration/targets/yum/tasks/yum.yml +++ b/test/integration/targets/yum/tasks/yum.yml @@ -427,3 +427,32 @@ that: - "'changed' in yum_result" - "'msg' in yum_result" + +- name: use latest to install httpd + yum: + name: httpd + state: latest + register: yum_result + +- name: verify httpd was installed + assert: + that: + - "'changed' in yum_result" + +- name: uninstall httpd + yum: + name: httpd + state: removed + +- name: update httpd only if it exists + yum: + name: httpd + state: latest + update_only: yes + register: yum_result + +- name: verify httpd not installed + assert: + that: + - "not yum_result.changed" + - "'Packages providing httpd not installed due to update_only specified' in yum_result.results" |