ansible/test/integration/targets/yum/tasks/lock.yml
Martin Krizek 28077887c2 2.8: yum: take care of stale/invalid yum.pid (#58457) (#58489)
* yum: take care of stale/invalid yum.pid (#58457)

* yum: take care of stale/invalid yum.pid

* Add changelog

(cherry picked from commit 5064e67d37)

* yum: check whether the lock file disappeared (#58581)


(cherry picked from commit b0f38931b0)
2019-07-15 13:58:53 -07:00

28 lines
545 B
YAML

- block:
- name: Make sure testing package is not installed
yum:
name: sos
state: absent
- name: Create bogus lock file
copy:
content: bogus content for this lock file
dest: /var/run/yum.pid
- name: Install a package, lock file should be deleted by the module
yum:
name: sos
state: present
register: yum_result
- assert:
that:
- yum_result is success
always:
- name: Clean up
yum:
name: sos
state: absent
when: ansible_pkg_mgr == 'yum'