mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix yum installroot test releasever lookup.
With this change the tests will pass on a RHEL 7.3 AMI.
This commit is contained in:
@@ -21,9 +21,13 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
|
- name: get yum releasever
|
||||||
|
shell: python -c 'import yum; yb = yum.YumBase(); print(yb.conf.yumvar["releasever"])' | tail -n 1
|
||||||
|
register: releasever
|
||||||
|
|
||||||
- name: Populate directory
|
- name: Populate directory
|
||||||
copy:
|
copy:
|
||||||
content: "{{ ansible_distribution_major_version }}\n"
|
content: "{{ releasever.stdout }}\n"
|
||||||
dest: "/{{ yumroot.stdout }}/etc/yum/vars/releasever"
|
dest: "/{{ yumroot.stdout }}/etc/yum/vars/releasever"
|
||||||
|
|
||||||
# This will drag in > 200 MB.
|
# This will drag in > 200 MB.
|
||||||
|
|||||||
Reference in New Issue
Block a user