mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
545 B
YAML
29 lines
545 B
YAML
6 years ago
|
- 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'
|