Optimise pip install tasks
Unlike the Ansible apt module, the Ansible pip module does not recognise a with_items list and process all the items at once. To optimise the pip install tasks, this patch replaces the use of with_items with a join filter so that the pip install task does an install with all the packages in a list, ensuring that the execution is one action instead of many. Change-Id: Iee697a868e52bd5851864406e66fa3d58c7379a6
This commit is contained in:
parent
413151fddc
commit
95adb62cd6
@ -73,14 +73,13 @@
|
||||
- utility-yum-packages
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
name: "{{ utility_pip_packages | join(' ') }}"
|
||||
state: latest
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ utility_pip_packages }}"
|
||||
tags:
|
||||
- utility-pip-packages
|
||||
- name: Distribute private ssh key
|
||||
|
Loading…
Reference in New Issue
Block a user