From c83be93a82467e0e93dbf95bee2175f97c2ba924 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Sat, 21 Mar 2015 16:17:08 -0500 Subject: [PATCH] Move install of python-pip to pip.yml This makes the pip.conf and .pip directory tasks idempotent. Signed-off-by: Andrew Schoen --- roles/common/tasks/main.yml | 8 +++++--- roles/common/tasks/pip.yml | 12 ++++++++++++ roles/common/vars/yum_systems.yml | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index ec883bf..de7ff22 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -4,9 +4,6 @@ tags: - vars -# configure pip to use our mirror -- include: pip.yml - - name: Set a high max open files limit for the teuthology user. template: src: security_limits.conf @@ -28,3 +25,8 @@ # configure red hat specific things - include: setup-redhat.yml when: ansible_os_family == 'RedHat' + +# configure pip to use our mirror +- include: pip.yml + tags: + - pip diff --git a/roles/common/tasks/pip.yml b/roles/common/tasks/pip.yml index 0fe23ab..619c661 100644 --- a/roles/common/tasks/pip.yml +++ b/roles/common/tasks/pip.yml @@ -1,4 +1,16 @@ --- +- name: Install python-pip on rpm based systems. + yum: + name: python-pip + state: present + when: ansible_pkg_mgr == "yum" + +- name: Install python-pip on deb based systems. + apt: + name: python-pip + state: present + when: ansible_pkg_mgr == "deb" + - name: Create the .pip directory for the teuthology user. file: path: "/home/{{ teuthology_user }}/.pip" diff --git a/roles/common/vars/yum_systems.yml b/roles/common/vars/yum_systems.yml index 4002ef9..cfc2c75 100644 --- a/roles/common/vars/yum_systems.yml +++ b/roles/common/vars/yum_systems.yml @@ -67,7 +67,6 @@ packages: - httpd-tools - mod_ssl - mod_fastcgi-2.4.7-1.ceph.el7 - - python-pip - libevent-devel - perl-JSON-XS - perl-XML-Twig -- 2.39.5