python.yml 1.21 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
---
- 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)"
julian.gethmann's avatar
julian.gethmann committed
18
  package: name={{ item }} state=installed
julian.gethmann's avatar
julian.gethmann committed
19
  become: yes
julian.gethmann's avatar
julian.gethmann committed
20
  with_items:
julian.gethmann's avatar
julian.gethmann committed
21
22
23
24
25
26
27
28
29
30
31
32
  - "{{ 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
julian.gethmann's avatar
julian.gethmann committed
33
34
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
35
36

- name: install pip packages Python 2
julian.gethmann's avatar
julian.gethmann committed
37
  pip: name={{ item }} state=installed
julian.gethmann's avatar
julian.gethmann committed
38
39
40
41
42
43
  become: yes
  with_items: "{{python2pip}}"

- name: upgrade pip3
  pip: executable=pip3 state=latest name=pip
  become: yes
julian.gethmann's avatar
julian.gethmann committed
44
45
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
46
47

- name: install pip packages Python 2
julian.gethmann's avatar
julian.gethmann committed
48
  pip: executable=pip3 name={{ item }} state=installed
julian.gethmann's avatar
julian.gethmann committed
49
50
  become: yes
  with_items: "{{python3pip}}"