diff options
author | Markos Chandras <mchandras@suse.de> | 2018-08-10 15:04:49 +0300 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-08-10 15:10:47 +0300 |
commit | 10c6ad4d3adae775b17418b618b0dfd64d6e2182 (patch) | |
tree | d479600d03ca07c1fd142838d002fafe8a2f93a5 /xci | |
parent | f96e0020a659881ce4dc16e6c99c80b7404a43f9 (diff) |
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 <mchandras@suse.de>
Diffstat (limited to 'xci')
-rw-r--r-- | xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml | 8 | ||||
-rw-r--r-- | xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml | 1 |
2 files changed, 9 insertions, 0 deletions
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') }}" |