Add support for extra_args

'extra_args' has been available since 1.0 of ansible.builtin and this
module already uses 'executable' which was added in 1.3 so this should
be perfectly safe to add.
This commit is contained in:
David Gray 2022-08-25 14:22:26 +01:00
parent 248ac65fbb
commit 21455b6dba
2 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,10 @@ A list of packages to install with pip. Examples below:
- name: docker
virtualenv: /my_app/venv
# Or pass through any extra arguments.
- name: my_special_package_from_my_special_repo
extra_args: --extra-index-url https://my-domain/pypi/pypi-master/simple
## Dependencies
None.

View File

@ -10,5 +10,6 @@
version: "{{ item.version | default(omit) }}"
virtualenv: "{{ item.virtualenv | default(omit) }}"
state: "{{ item.state | default(omit) }}"
extra_args: "{{ item.extra_args | default(omit) }}"
executable: "{{ pip_executable }}"
loop: "{{ pip_install_packages }}"