python.yml 783 Bytes
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
2
---
- name: Software for dependency installation
julian.gethmann's avatar
julian.gethmann committed
3
  dnf:
julian.gethmann's avatar
julian.gethmann committed
4
    name: ["gcc", "gcc-c++", "glibc-devel.x86_64", "openssl-devel", "python-devel", "lapack-devel", "numpy-f2py", "redhat-rpm-config"]
julian.gethmann's avatar
julian.gethmann committed
5
    state: present
julian.gethmann's avatar
julian.gethmann committed
6
7
8
9
  become: yes
  when: ansible_distribution == 'Fedora'

- name: "Install Python stack for scientific purposes (Distribution)"
julian.gethmann's avatar
julian.gethmann committed
10
11
  package:
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
12
    state: present
julian.gethmann's avatar
julian.gethmann committed
13
  become: yes
julian.gethmann's avatar
julian.gethmann committed
14
  with_items:
julian.gethmann's avatar
julian.gethmann committed
15
16
17
18
  - "{{ python2pkg }}"
  - "{{ python3pkg }}"

- name: install pip packages Python 2
19
20
  pip:
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
21
    state: present
julian.gethmann's avatar
julian.gethmann committed
22
23
24
25
  become: yes
  with_items: "{{python2pip}}"

- name: install pip packages Python 2
julian.gethmann's avatar
julian.gethmann committed
26
  become: yes
27
  pip:
julian.gethmann's avatar
julian.gethmann committed
28
    executable: "{{ pip3bin }}"
29
    name: "{{ item }}"
julian.gethmann's avatar
julian.gethmann committed
30
    state: present
julian.gethmann's avatar
julian.gethmann committed
31
  with_items: "{{python3pip}}"
32
33
  tags:
    - python3