|
|
@ -627,41 +627,40 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "rpm_lsof_result is failed"
|
|
|
|
- "rpm_lsof_result is failed"
|
|
|
|
|
|
|
|
|
|
|
|
- name: exclude lsof
|
|
|
|
- name: create conf file that excludes lsof
|
|
|
|
lineinfile:
|
|
|
|
copy:
|
|
|
|
dest: /etc/dnf/dnf.conf
|
|
|
|
content: |
|
|
|
|
regexp: (^exclude=)(.)*
|
|
|
|
[main]
|
|
|
|
line: "exclude=lsof*"
|
|
|
|
exclude=lsof*
|
|
|
|
state: present
|
|
|
|
dest: '{{ output_dir }}/test-dnf.conf'
|
|
|
|
|
|
|
|
register: test_dnf_copy
|
|
|
|
|
|
|
|
|
|
|
|
# begin test case where disable_excludes is supported
|
|
|
|
- block:
|
|
|
|
- name: Try install lsof without disable_excludes
|
|
|
|
# begin test case where disable_excludes is supported
|
|
|
|
dnf: name=lsof state=latest
|
|
|
|
- name: Try install lsof without disable_excludes
|
|
|
|
|
|
|
|
dnf: name=lsof state=latest conf_file={{ test_dnf_copy.dest }}
|
|
|
|
register: dnf_lsof_result
|
|
|
|
register: dnf_lsof_result
|
|
|
|
ignore_errors: True
|
|
|
|
ignore_errors: True
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify lsof did not install because it is in exclude list
|
|
|
|
- name: verify lsof did not install because it is in exclude list
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "dnf_lsof_result is failed"
|
|
|
|
- "dnf_lsof_result is failed"
|
|
|
|
|
|
|
|
|
|
|
|
- name: install lsof with disable_excludes
|
|
|
|
- name: install lsof with disable_excludes
|
|
|
|
dnf: name=lsof state=latest disable_excludes=all
|
|
|
|
dnf: name=lsof state=latest disable_excludes=all conf_file={{ test_dnf_copy.dest }}
|
|
|
|
register: dnf_lsof_result_using_excludes
|
|
|
|
register: dnf_lsof_result_using_excludes
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify lsof did install using disable_excludes=all
|
|
|
|
- name: verify lsof did install using disable_excludes=all
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "dnf_lsof_result_using_excludes is success"
|
|
|
|
- "dnf_lsof_result_using_excludes is success"
|
|
|
|
- "dnf_lsof_result_using_excludes is changed"
|
|
|
|
- "dnf_lsof_result_using_excludes is changed"
|
|
|
|
- "dnf_lsof_result_using_excludes is not failed"
|
|
|
|
- "dnf_lsof_result_using_excludes is not failed"
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: remove exclude lsof (cleanup dnf.conf)
|
|
|
|
- name: remove exclude lsof conf file
|
|
|
|
lineinfile:
|
|
|
|
file:
|
|
|
|
dest: /etc/dnf/dnf.conf
|
|
|
|
path: '{{ output_dir }}/test-dnf.conf'
|
|
|
|
regexp: (^exclude=lsof*)
|
|
|
|
state: absent
|
|
|
|
line: "exclude="
|
|
|
|
|
|
|
|
state: present
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# end test case where disable_excludes is supported
|
|
|
|
# end test case where disable_excludes is supported
|
|
|
|