Fixes for epel repo name, and allow to specify a pip executable name (#25)

* Fixes for epel repo name, and allow to specify a pip executable name

* Renamed ansible_epel_name to ansible_epel_repo_name

---------

Co-authored-by: Steven Jorgensen <sjorgen@sandia.gov>
This commit is contained in:
Steve Jorgensen 2023-04-27 13:19:21 -06:00 committed by GitHub
parent e01427a892
commit ac2fc8372c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -24,6 +24,15 @@ If `ansible_install_method` is set to `pip`, the specific Ansible version to be
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.
ansible_pip_executable: ''
if `ansible_install_method` is set to `pip`, this is the path to the pip executable, in case your platform doesn't find the right name.
ansible_epel_repo_name: 'epel'
if `ansible_install_method` is set to `package` and you are on a RHEL machine, and your local satellite server admins decided to name the epel repository something other than epel, this variable gives you the opportunity to provide the right name.
## Dependencies
None.

View File

@ -9,3 +9,9 @@ ansible_install_version_pip: ''
# Which extra arguments should be gived to pip
ansible_install_pip_extra_args: ''
# path to pip executable to use
ansible_pip_executable: ''
# name of epel repo if it isn't standard
ansible_epel_repo_name: 'epel'

View File

@ -3,4 +3,4 @@
package:
name: ansible
state: "{{ ansible_package_state }}"
enablerepo: epel
enablerepo: "{{ ansible_epel_repo_name }}"

View File

@ -2,5 +2,6 @@
- name: Install Ansible via Pip.
pip:
name: ansible
executable: "{{ ansible_pip_executable | default(omit) }}"
version: "{{ ansible_install_version_pip | default(omit) }}"
extra_args: "{{ ansible_install_pip_extra_args | default(omit) }}"