From 4c18f3da3d02fcc231b92a32291272e44318cdb1 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Fri, 2 Sep 2016 06:37:45 -0500 Subject: [PATCH] Fixed assumed utility pip install for specific clients This change implements a dynamic lookup and installation of python clients within the utility container. The purpose of this change is to ensure that only python clients known to the environment are installed within the utility container. Change-Id: I60e79f3017a5ad3eec6ffca36839acf50fbdf3ce Signed-off-by: Kevin Carter --- playbooks/inventory/group_vars/utility_all.yml | 12 ------------ playbooks/utility-install.yml | 10 +++++++++- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/playbooks/inventory/group_vars/utility_all.yml b/playbooks/inventory/group_vars/utility_all.yml index 671f75b5ef..436e77c626 100644 --- a/playbooks/inventory/group_vars/utility_all.yml +++ b/playbooks/inventory/group_vars/utility_all.yml @@ -41,18 +41,6 @@ utility_package_state: "{{ package_state }}" # Python packages to be installed into the utility container utility_pip_packages: - - gnocchiclient - - python-openstackclient - - python-ceilometerclient - - python-cinderclient - - python-glanceclient - - python-heatclient - - python-keystoneclient - - python-neutronclient - - python-novaclient - - python-ironicclient - - python-saharaclient - - python-swiftclient - python-memcached - pycrypto diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index f1e4e5dfae..43f5dd3d6d 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -72,9 +72,17 @@ - ansible_pkg_mgr == 'yum' tags: - utility-yum-packages + - name: Get list of python clients + shell: "curl -s {{ openstack_repo_url }}/os-releases/{{ openstack_release }}/requirements_absolute_requirements.txt | grep client | cut -d'=' -f1" + register: client_list + run_once: true + changed_when: false + tags: + - utility-pip-packages + - skip_ansible_lint - name: Install pip packages pip: - name: "{{ utility_pip_packages | join(' ') }}" + name: "{{ client_list.stdout_lines | union(utility_pip_packages) | join(' ') }}" state: latest extra_args: "{{ pip_install_options|default('') }}" register: install_packages