From 8dfb29437b3038ae5e961bb1305dd0126aad6e48 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Tue, 14 Mar 2017 18:17:26 +0000 Subject: [PATCH] Always install shade to system even when installation of ironic and others into virtualenv is requested, we still need to install shade outside of virtualenv so that other os_* modules can succeed. Change-Id: Ic4d60e126bba1a9e8faee0e183d01710ac76f07a --- .../bifrost-ironic-install/tasks/install.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 59af5fdcd..19a3c0225 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -54,13 +54,18 @@ - name: "Install iSCSI client if PXE driver support is enabled" action: "{{ ansible_pkg_mgr }} name={{ iscsi_client_package }} state=present" when: skip_install is not defined and enable_pxe_drivers | bool == true -- name: "Shade - Install" - include: pip_install.yml - package=shade - state=latest - sourcedir={{ shade_git_folder }} - source_install={{ shade_source_install }} + +# 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 + - name: "dib-utils - install from pip" include: pip_install.yml package=dib-utils