From 4e8b86b9798e0a45bacc26124a84829c3d54af5e Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 24 Aug 2018 11:47:02 -0700 Subject: [PATCH] Reorder client install order Openstackclient now installs openstacksdk. So we must install it along with shade last if we wish to ensure that what is in GIT or what the user has specified is to be installed overwriting what may have been pulled in via dependency. Depends-On: https://review.openstack.org/596530 Change-Id: I58e19c85400a1cd860aa4b870dc6c5eaa4686eb8 --- .../bifrost-ironic-install/tasks/install.yml | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 60df84d77..05a3d6155 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -38,6 +38,12 @@ - name: "Ensure /opt/stack is present" file: name=/opt/stack state=directory owner=root group=root +- name: "OpenStack Client - Install" + include: pip_install.yml + package=python-openstackclient + extra_args="-c {{ upper_constraints_file }}" + when: skip_install is not defined + - name: "proliantutils - Install from pip" include: pip_install.yml package=proliantutils @@ -57,17 +63,6 @@ action: "{{ ansible_pkg_mgr }} name={{ iscsi_client_package }} state=present" when: skip_install is not defined -# NOTE(TheJulia): Install openstacksdk since shade wraps to openstacksdk and the -# logic is largely going into openstacksdk as time goes on. -- block: - - name: install openstacksdk from PyPI - command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install openstacksdk" - when: not (openstacksdk_source_install | default(false) | bool) - - name: install openstacksdk from source - command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install {{ openstacksdk_git_folder }}" - when: openstacksdk_source_install | default(false) | bool - when: skip_install is not defined - # NOTE(pas-ha) even when install into virtualenv is requested, # we need to install shade into system for enroll-dynamic to succeed - block: @@ -88,12 +83,6 @@ # as a result. when: skip_install is not defined and install_dib | bool == true -- name: "OpenStack Client - Install" - include: pip_install.yml - package=python-openstackclient - extra_args="-c {{ upper_constraints_file }}" - when: skip_install is not defined - - name: "Ironic Client - Install" include: pip_install.yml package=python-ironicclient @@ -154,3 +143,25 @@ include: staging_install.yml when: skip_install is not defined and staging_drivers_include | bool == true +# NOTE(pas-ha) even when install into virtualenv is requested, +# we need to install shade into system for enroll-dynamic to succeed +- block: + - name: install shade from PyPI + command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install shade" + when: not (shade_source_install | default(false) | bool) + - name: install shade from source + command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install {{ shade_git_folder }}" + when: shade_source_install | default(false) | bool + when: skip_install is not defined + +# NOTE(TheJulia): Install openstacksdk since shade wraps to openstacksdk and the +# logic is largely going into openstacksdk as time goes on. +- block: + - name: install openstacksdk from PyPI + command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install openstacksdk" + when: not (openstacksdk_source_install | default(false) | bool) + - name: install openstacksdk from source + command: "{{ hostvars[inventory_hostname].ansible_python.executable }} -m pip install {{ openstacksdk_git_folder }}" + when: openstacksdk_source_install | default(false) | bool + when: skip_install is not defined +