CentOS: Fix jq and pip installation

This PS fixes pip and jq installation on CentOS. It also removes
some duplicate code in the gate playbooks.

Co-Authored-By: portdirect <pete@port.direct>

This patch set should fix an issue where centos cannot find
python-pip in the EPEL.

Change-Id: If3a437e0756a363b8cefaa9a8bdd1c3498fedbfd
This commit is contained in:
tin.l.lam 2017-11-24 19:17:42 -06:00 committed by Pete Birley
parent 2fb6a79b49
commit e4de36d97b
3 changed files with 22 additions and 37 deletions

View File

@ -10,42 +10,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: installing OS-H dev tools
include_role:
name: deploy-package
tasks_from: dist
vars:
packages:
deb:
- git
- make
- curl
- ca-certificates
- jq
rpm:
- git
- make
- curl
- jq
- block:
- name: removing jq binary on centos
become: true
become_user: root
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
file:
path: "{{ item }}"
state: absent
with_items:
- /usr/bin/jq
- name: installing jq 1.5 binary for centos
become: true
become_user: root
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
get_url:
url: https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
dest: /usr/bin/jq
mode: 0555
- name: installing OS-H dev tools
include_role:
name: deploy-package
tasks_from: dist
vars:
packages:
deb:
- git
- make
- curl
- ca-certificates
rpm:
- git
- make
- curl
- name: installing jq
include_role:
name: deploy-jq
tasks_from: main
- name: assemble charts
make:

View File

@ -27,13 +27,13 @@
state: present
- name: ensuring python pip package is present for centos
yum:
name: python-pip
name: python-devel
state: present
- name: ensuring python pip package is present for fedora via the python-devel rpm
when: ansible_distribution == 'Fedora'
dnf:
name: python-devel
name: python2-pip
state: present
- name: ensuring pip is the latest version

View File

@ -14,6 +14,7 @@
- block:
- name: ensuring jq is deployed on host
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' or ansible_distribution == 'Fedora'
include_role:
name: deploy-package
tasks_from: dist