Include OS specific variables

The package naming for pip has changed in centos8. Previously the pip
package was called python-pip for python2 and python3-pip for python3.
In CentOS 8 the packages are now called python2-pip for python2 ad
python3-pip for python3.
This commit is contained in:
fgierlinger 2020-04-24 18:46:45 +02:00
parent b348af1dcb
commit 080746e32a
2 changed files with 9 additions and 0 deletions

View File

@ -1,4 +1,11 @@
---
- name: Gather OS specific variables.
include_vars: "{{ item }}"
with_first_found:
- "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "vars/{{ ansible_distribution }}.yml"
- "defaults/main.yml"
- name: Ensure Pip is installed.
package:
name: "{{ pip_package }}"

2
vars/CentOS-8.yml Normal file
View File

@ -0,0 +1,2 @@
---
pip_package: python3-pip