From 10c6ad4d3adae775b17418b618b0dfd64d6e2182 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 10 Aug 2018 15:04:49 +0300 Subject: xci: create-vm-nodes: Install virtualbmc in the XCI virtualenv XCI prepares a virtualenv for us, so we should install virtualbmc in it. Change-Id: I320d1c7cad9c5c821269b55252cb7ab4f5136f40 Signed-off-by: Markos Chandras --- xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml | 8 ++++++++ xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml | 1 + 2 files changed, 9 insertions(+) (limited to 'xci/playbooks') diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml index d8169c2f..b2585be2 100644 --- a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml +++ b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml @@ -97,11 +97,15 @@ # with a custom Ansible module using vbmc Python API - name: get list of nodes from virtualbmc command: vbmc list + environment: + PATH: "{{ lookup('env', 'XCI_VENV') }}/bin" register: vbmc_list # NOTE(NobodyCam): Space at the end of the find clause is required for proper matching. - name: delete vm from virtualbmc if it is there command: vbmc delete {{ vm_name }} + environment: + PATH: "{{ lookup('env', 'XCI_VENV') }}/bin" when: vbmc_list.stdout.find(vm_name) != -1 - set_fact: @@ -109,9 +113,13 @@ - name: plug vm into vbmc command: vbmc add {{ vm_name }} --libvirt-uri {{ vm_libvirt_uri }} --port {{ virtual_ipmi_port }} + environment: + PATH: "{{ lookup('env', 'XCI_VENV') }}/bin" - name: start virtualbmc command: vbmc start {{ vm_name }} + environment: + PATH: "{{ lookup('env', 'XCI_VENV') }}/bin" - name: get XML of the vm virt: diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml b/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml index e09e2d6b..a4fef469 100644 --- a/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml +++ b/xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml @@ -117,3 +117,4 @@ - name: install virtualbmc pip: name: virtualbmc + virtualenv: "{{ lookup('env', 'XCI_VENV') }}" -- cgit 1.2.3-korg