Optional extra arguments for pip install (#24)

Change-Id: I80a2081962d0636400492c99973aff69d28955e5

Co-authored-by: Morgan Lindqvist <Morgan@quzed.com>
This commit is contained in:
Morgan Lindqvist 2022-12-10 22:35:30 +01:00 committed by GitHub
parent 4ac86968ff
commit e96ad2577f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,10 @@ Whether to install Ansible via the system `package` manager (`apt`, `yum`, `dnf`
If `ansible_install_method` is set to `pip`, the specific Ansible version to be installed via Pip. If not set, the latest version of Ansible will be installed.
ansible_install_pip_extra_args: ''
If `ansible_install_method` is set to `pip`, the extra arguments to be given to `pip` are listed here. If not set, no extra arguments are given.
## Dependencies
None.
@ -38,6 +42,7 @@ Install from pip:
vars:
ansible_install_method: pip
ansible_install_version_pip: "2.7.0"
ansible_install_pip_extra_args: "--user"
roles:
- role: geerlingguy.pip
- role: geerlingguy.ansible

View File

@ -6,3 +6,6 @@ ansible_install_method: package
# Used only if ansible_install_method is 'pip'. If empty, defaults to latest.
ansible_install_version_pip: ''
# Which extra arguments should be gived to pip
ansible_install_pip_extra_args: ''

View File

@ -6,6 +6,7 @@
vars:
ansible_install_method: pip
ansible_install_version_pip: "2.6.2"
ansible_install_pip_extra_args: "--user"
roles:
- role: geerlingguy.pip

View File

@ -3,3 +3,4 @@
pip:
name: ansible
version: "{{ ansible_install_version_pip | default(omit) }}"
extra_args: "{{ ansible_install_pip_extra_args | default(omit) }}"