mirror of https://github.com/ansible/ansible.git
Add cacheonly option to yum and dnf modules (#73820)
* Add integration test * Add changelog Co-authored-by: Matt Clay <matt@mystile.com>pull/74317/head
parent
0c101f3f76
commit
fdee5ca16d
@ -0,0 +1,4 @@
|
||||
---
|
||||
minor_changes:
|
||||
- yum - Add ``cacheonly`` option (https://github.com/ansible/ansible/issues/69397).
|
||||
- dnf - Add ``cacheonly`` option (https://github.com/ansible/ansible/issues/69397).
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Test cacheonly (clean before testing)
|
||||
command: dnf clean all
|
||||
|
||||
- name: Try installing from cache where it has been cleaned
|
||||
dnf:
|
||||
name: sos
|
||||
state: latest
|
||||
cacheonly: true
|
||||
register: dnf_result
|
||||
|
||||
- name: Verify dnf has not changed
|
||||
assert:
|
||||
that:
|
||||
- "not dnf_result is changed"
|
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Test cacheonly (clean before testing)
|
||||
command: yum clean all
|
||||
|
||||
- name: Try installing from cache where it has been cleaned
|
||||
yum:
|
||||
name: sos
|
||||
state: latest
|
||||
cacheonly: true
|
||||
register: yum_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Verify yum failure
|
||||
assert:
|
||||
that:
|
||||
- "yum_result is failed"
|
Loading…
Reference in New Issue