python.yml 1.21 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
2
---
- name: Software for dependency installation
3
4
  dnf: "{{item}}"
  state: installed
julian.gethmann's avatar
julian.gethmann committed
5
6
  become: yes
  with_items:
7
8
9
10
11
12
13
14
15
16
  - gcc
  - gcc-c++
  - glibc-devel.x86_64
  - openssl-devel
  # - atlas-devel
  - python-devel
  - lapack-devel
  - numpy-f2py
  # iminuit
  - redhat-rpm-config
julian.gethmann's avatar
julian.gethmann committed
17
18
19
  when: ansible_distribution == 'Fedora'

- name: "Install Python stack for scientific purposes (Distribution)"
20
21
  package: "{{ item }}"
  state: installed
julian.gethmann's avatar
julian.gethmann committed
22
  become: yes
julian.gethmann's avatar
julian.gethmann committed
23
  with_items:
julian.gethmann's avatar
julian.gethmann committed
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

33
34
35
36
- name: upgrade pip2  # install --upgrade pip
  pip:
    name: pip
    state: latest
julian.gethmann's avatar
julian.gethmann committed
37
  become: yes
julian.gethmann's avatar
julian.gethmann committed
38
39
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
40
41

- name: install pip packages Python 2
42
43
44
  pip:
    name: "{{ item }}"
    state: installed
julian.gethmann's avatar
julian.gethmann committed
45
46
47
48
  become: yes
  with_items: "{{python2pip}}"

- name: upgrade pip3
49
50
51
52
  pip:
    executable: pip3
    state: latest
    name: pip
julian.gethmann's avatar
julian.gethmann committed
53
  become: yes
julian.gethmann's avatar
julian.gethmann committed
54
55
  tags:
    - skip_ansible_lint
julian.gethmann's avatar
julian.gethmann committed
56
57

- name: install pip packages Python 2
58
59
60
61
  pip:
    executable: pip3
    name: "{{ item }}"
    state: installed
julian.gethmann's avatar
julian.gethmann committed
62
63
  become: yes
  with_items: "{{python3pip}}"