ganeti-ansible/roles/web-manager/tasks/python.yml

39 lines
908 B
YAML

- name: Download sources
ansible.builtin.get_url:
url: "{{ python.src }}"
dest: /tmp/python.tgz
mode: "0644"
- name: Extract python sources
ansible.builtin.unarchive:
src: /tmp/python.tgz
dest: /tmp
remote_src: true
- name: Install dependencies
ansible.builtin.apt:
name: "{{ item }}"
state: present
install_recommends: false
loop: "{{ python.dependencies }}"
- name: Compile and install python
ansible.builtin.command:
cmd: bash -c "./configure && make install"
register: python_compile_result
changed_when: python_compile_result.rc == 0
args:
chdir: /tmp/Python-2.7.18
- name: Download get-pip.py
ansible.builtin.get_url:
url: "{{ python.pip_src }}"
dest: /tmp
mode: "0644"
- name: Install pip
ansible.builtin.command:
cmd: python /tmp/get-pip.py
register: pip_install_result
changed_when: pip_install_result.rc == 0