diff options
-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') }}" |