kayobe/ansible/roles/pip/tasks/main.yml
Mark Goddard 43650cb966 Performance: refactor pip configuration
Currently we perform pip configuration for a list of users, including
pip_conf.yml in a loop for each user. It is slightly more efficient to
loop over each task, since individual tasks have a higher overhead than
loops.

This change refactors the code into multiple loops, with a single
include. We keep the include to allow skipping the tasks when pip
configuration is not required.

Change-Id: I698d38613f45bd03a2e51572f6e6fb69e934f614
Story: 2007993
Task: 40719
2020-08-24 10:29:02 +01:00

5 lines
129 B
YAML

---
- name: Ensure pip is configured
include_tasks: pip_conf.yml
when: (pip_local_mirror | bool) or (pip_proxy | length > 0)