From d4bd08f82e2713cbabed01eda67fbdd78201047e Mon Sep 17 00:00:00 2001 From: Anton Patsev <10828883+patsevanton@users.noreply.github.com> Date: Thu, 27 Dec 2018 20:30:59 +0600 Subject: [PATCH] Install python-pip from local yum repository (#3940) Add support install python-pip from local yum repository if local yum repository exist. --- roles/bootstrap-os/tasks/bootstrap-centos.yml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/roles/bootstrap-os/tasks/bootstrap-centos.yml b/roles/bootstrap-os/tasks/bootstrap-centos.yml index 692fae868..519a43733 100644 --- a/roles/bootstrap-os/tasks/bootstrap-centos.yml +++ b/roles/bootstrap-os/tasks/bootstrap-centos.yml @@ -29,20 +29,36 @@ state: present when: http_proxy is defined -- name: Install packages requirements for bootstrap +- name: Install libselinux-python and yum-utils for bootstrap yum: name: "{{ packages }}" state: present vars: packages: - libselinux-python - - epel-release + - yum-utils when: - not is_atomic +- name: Check python-pip package + yum: + list=python-pip + register: package_python_pip + when: + - not is_atomic + +- name: Install epel-release for bootstrap + yum: + name: epel-release + state: present + when: + - not is_atomic + - package_python_pip.results | length != 0 + - name: Install pip for bootstrap yum: name: python-pip state: present when: - not is_atomic + - package_python_pip.results | length != 0