python.yml 1.14 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
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
45
46
---
- name: Software for dependency installation
  dnf: name={{item}} state=installed
  become: yes
  with_items:
          - gcc
          - gcc-c++
          - glibc-devel.x86_64
          # - atlas-devel
          - python-devel
          - lapack-devel
          - numpy-f2py
          # iminuit
          - redhat-rpm-config
  when: ansible_distribution == 'Fedora'

- name: "Install Python stack for scientific purposes (Distribution)"
  package: name={{ item }} state=latest
  become: yes
  with_items: 
  - "{{ python2pkg }}"
  - "{{ python3pkg }}"

- name: Update setuptools
  become: yes
  command: easy_install -U setuptools
  register: command_result
  changed_when: not command_result.stdout.find("Adding setuptools") # not working

- name: upgrade pip2 #install --upgrade pip
  pip: state=latest name=pip
  become: yes

- name: install pip packages Python 2
  pip: name={{ item }} state=latest
  become: yes
  with_items: "{{python2pip}}"

- name: upgrade pip3
  pip: executable=pip3 state=latest name=pip
  become: yes

- name: install pip packages Python 2
  pip: executable=pip3 name={{ item }} state=latest
  become: yes
  with_items: "{{python3pip}}"