- name: Prepare
hosts: all
gather_facts: true
+
tasks:
- name: Update APT cache
apt:
update_cache: yes
when: ansible_distribution == 'Ubuntu'
become: true
+
- rpm_key:
state: present
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8
when: ansible_os_family == 'RedHat'
become: true
+
- name: Install EPEL repository
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
state: present
when: ansible_os_family == 'RedHat'
become: true
+
+ - name: Install yum-plugin-versionlock
+ yum:
+ name:
+ - yum-plugin-versionlock
+ when: ansible_os_family == 'RedHat'
+ become: true
+
+ - name: Install mock
+ yum:
+ name:
+ - mock-2.17-1.el7
+ state: present
+ when:
+ - ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
+ become: true
+
+ - name: Lock mock-core-configs version$
+ command: yum versionlock mock
+ args:
+ warn: false
+ when:
+ - ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
+ become: true
+
+ - name: Install mock-core-configs from remote repo
+ yum:
+ name: https://rpmfind.net/linux/epel/testing/7/aarch64/Packages/m/mock-core-configs-31.6-1.el7.noarch.rpm
+ state: present
+ when:
+ - ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
+ become: true