From: Andrew Schoen Date: Sat, 21 Mar 2015 21:17:08 +0000 (-0500) Subject: Move install of python-pip to pip.yml X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c83be93a82467e0e93dbf95bee2175f97c2ba924;p=ceph-cm-ansible.git Move install of python-pip to pip.yml This makes the pip.conf and .pip directory tasks idempotent. Signed-off-by: Andrew Schoen --- 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