Fix: Update python-install to build with latest
[ansible/roles/python-install.git] / molecule / default / prepare.yml
1 ---
2 - name: Prepare
3   hosts: all
4   gather_facts: true
5   tasks:
6     - ansible.builtin.rpm_key:
7         state: present
8         key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8
9       when: ansible_os_family == 'RedHat'
10       become: true
11     - name: Install Fedora EPEL repo
12       ansible.builtin.yum:
13         name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
14         state: present
15       when: ansible_os_family == 'RedHat'
16       become: true
17
18     - name: Update APT cache
19       ansible.builtin.package:
20         update_cache: yes
21       when: ansible_distribution == 'Ubuntu'
22       become: true
23
24     - name: Install Git
25       ansible.builtin.package: name=git state=present
26
27     - name: Install Python compile dependencies
28       ansible.builtin.yum:
29         name:
30           - bzip2-devel
31           - gcc
32           - make
33           - openssl-devel
34         state: present
35       when: ansible_os_family == 'RedHat'
36       become: true
37
38     - name: Install Python compile dependencies
39       ansible.builtin.package:
40         name:
41           - libbz2-dev
42           - gcc
43           - make
44           - libssl-dev
45           - wget
46           - zlib1g-dev
47         state: present
48       when: ansible_distribution == 'Ubuntu'
49       become: true