mirror of https://github.com/ansible/ansible.git
yum: take care of stale/invalid yum.pid (#58457)
* yum: take care of stale/invalid yum.pid * Add changelogpull/58475/head
parent
939e2b4c79
commit
5064e67d37
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- yum - handle stale/invalid yum.pid lock file (https://github.com/ansible/ansible/issues/57189)
|
@ -0,0 +1,28 @@
|
||||
- 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'
|
Loading…
Reference in New Issue