Add possibility to pass extra arguments to pip command
It is possible to do this in pip module already using: extra_args https://docs.ansible.com/ansible/latest/modules/pip_module.html#parameter-extra_args With this change you can define these extra_args within the pip_install_packages item as shown in the README addition coming along with this PR.
This commit is contained in:
parent
ca07424814
commit
11033feaa2
|
@ -30,7 +30,11 @@ A list of packages to install with pip. Examples below:
|
|||
version: "1.2.3"
|
||||
- name: awscli
|
||||
version: "1.11.91"
|
||||
|
||||
|
||||
# Or pass extra arguments to the command
|
||||
- name: setuptools
|
||||
extra_args: "--upgrade"
|
||||
|
||||
# Or specify bare packages to get the latest release.
|
||||
- docker
|
||||
- awscli
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
- name: Ensure pip_install_packages are installed.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
extra_args: "{{ item.extra_args | default(omit) }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
virtualenv: "{{ item.virtualenv | default(omit) }}"
|
||||
state: "{{ item.state | default(omit) }}"
|
||||
|
|
Loading…
Reference in New Issue