/home/zuul/src/opendev.org/opendev/system-config/playbooks/service-lists3.yaml
Execution
Date 08 Apr 2026 21:37:16 +0000
Duration 00:03:38.72
Controller bridge99.opendev.org
User root
Versions
Ansible 2.15.13
ara 1.7.5 / 1.7.5
Python 3.10.12
Summary
1 Hosts
161 Tasks
159 Results
1 Plays
21 Files
0 Records

File: /home/zuul/src/opendev.org/opendev/system-config/playbooks/roles/pip3/tasks/main.yaml

- name: Remove pip and virtualenv packages
  package:
    name:
      - python3-pip
      - python3-virtualenv
    state: absent

# NOTE(ianw) : See https://github.com/pypa/get-pip/issues/43;
# requirement of get-pip.py
# Xenial doesn't have python3-distutils as it appears to be part
# of python3 itself.
- name: Ensure distutils
  package:
    name:
      - python3-distutils
    state: present
  when: ansible_distribution_release != 'xenial'

- name: Download OS/Python specific get-pip.py
  include_tasks: "{{ get_pip_os }}"
  with_first_found:
    - "{{ ansible_distribution_release }}.yaml"
    - "{{ ansible_distribution }}.yaml"
    - "{{ ansible_os_family }}.yaml"
    - "default.yaml"
  loop_control:
    loop_var: get_pip_os

- name: Install pip
  command: python3 /var/lib/get-pip.py
  args:
    creates: /usr/local/bin/pip3

- name: Install latest pip and virtualenv
  pip:
    name: "{{ item }}"
    state: latest
    executable: pip3
  loop:
    - pip
    - virtualenv

# TODO(frickler): pbr is being installed as a workaround for issues
# with eavesdrop running on xenial with py27/35. It can be dropped
# once the host has been upgraded
- name: Install latest pbr on xenial
  pip:
    name: pbr
    state: latest
    executable: pip3
  when: ansible_distribution_release == 'xenial'