forked from metal3-io/metal3-dev-env
/
main.yml
44 lines (41 loc) · 1.26 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
- name: Install packages on Ubuntu
block:
- name: Install packages using standard package manager
package:
name: "{{ packages.ubuntu.packages}}"
state: present
become: true
- name: Install packages using pip # ansible uses these packages in python2 to run on the local machine
pip:
name: "{{ packages.ubuntu.pip }}"
state: present
become: true
- name: Install packages using pip3
pip:
executable: "pip3"
name: "{{ packages.ubuntu.pip3 }}"
state: present
become: true
when: ansible_facts['distribution'] == "Ubuntu"
- name: Install packages on CentOS 7
block:
- package:
name: "{{ packages.centos7.packages }}"
state: present
- name: Install packages using pip
pip:
name: "{{ packages.centos7.pip }}"
state: present
become: true
when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int == 7
- name: Install packages on RHEL8
block:
- package:
name: "{{ packages.rhel8.packages }}"
state: present
- pip:
executable: "pip3"
name: "{{ packages.rhel8.pip3 }}"
state: present
become: true
when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int == 8