Do not install yum-plugin-copr for later releses.
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com
rebased onto 62351725317870f2b12ae28b34c471cc385845d8
@mvadkert, there is a typo, it should be ansible_distribution_version and not ansible_distribution.
ansible_distribution_version
ansible_distribution
I think we need to define a some fact like:
- name: Set fact 'is_rhel_based' set_fact: is_rhel_based : "{{ "[hostvars[test_runner_inventory_name]['ansible_distribution']] | intersect(['RedHat', 'CentOS']) and hostvars[test_runner_inventory_name]['ansible_distribution']|int <= 7" }}"
I like the idea of using fact.
Maybe we could use 2 facts is_dnf_based and is_dnf_based.
is_dnf_based
And update also when: hostvars[test_runner_inventory_name]['ansible_distribution'] == 'Fedora', so dnf copr enable does not run only on Fedora.
when: hostvars[test_runner_inventory_name]['ansible_distribution'] == 'Fedora'
dnf copr enable
Maybe we could use 2 facts is_yum_based and is_dnf_based.
is_yum_based
I think we need to define a some fact like: - name: Set fact 'is_rhel_based' set_fact: is_rhel_based : "{{ "[hostvars[test_runner_inventory_name]['ansible_distribution']] | intersect(['RedHat', 'CentOS']) and hostvars[test_runner_inventory_name]['ansible_distribution']|int <= 7" }}"
I agree with Bruno, that we actually need is_yum_based and is_dnf_based. The is_rhel_based is actually only "[hostvars[test_runner_inventory_name]['ansible_distribution']] | intersect(['RedHat', 'CentOS'])". @astepano where should we put these facts? is this something in the standard common role?
Will add this for now in the patch, we can move it if needed
rebased onto e67a07d74d40be7f72c24f78b51dc3f8ce4a14f5
@astepano @bgoncalv I added test_runner_is_yum_based and test_runner_is_dnf_based to str_common.
Hi. looks good, would you mind to move OS ident code to str-common/tasks/inspect.yml ? thank you!
rebased onto 3597f5024cf5b38413831ec9b8a5cb3c5c7131af
rebased onto 438f4d46de434b99848e9c6b4bd608e7e4a51d6c
{{ ( ['ansible_distribution'] | intersect(['RedHat', 'CentOS']) | bool ) and ansible_distribution_version|int <= 7 }}
just a note.
Proposed changes were taken to https://pagure.io/standard-test-roles/pull-request/118
Pull-Request has been closed by astepano
Do not install yum-plugin-copr for later releses.
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com