xci: create-vm-nodes: Install virtualbmc in the XCI virtualenv 41/60841/1
authorMarkos Chandras <mchandras@suse.de>
Fri, 10 Aug 2018 12:04:49 +0000 (15:04 +0300)
committerMarkos Chandras <mchandras@suse.de>
Fri, 10 Aug 2018 12:10:47 +0000 (15:10 +0300)
XCI prepares a virtualenv for us, so we should install virtualbmc
in it.

Change-Id: I320d1c7cad9c5c821269b55252cb7ab4f5136f40
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml

index d8169c2..b2585be 100644 (file)
   # 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:
 
   - 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:
index e09e2d6..a4fef46 100644 (file)
 - name: install virtualbmc
   pip:
     name: virtualbmc
+    virtualenv: "{{ lookup('env', 'XCI_VENV') }}"