csmart / ansible-role-virt-infra

Define and manage guests and networks on a KVM host with Ansible
GNU General Public License v3.0
67 stars 48 forks source link

vmbc not in path on centos #28

Closed csmart closed 4 years ago

csmart commented 4 years ago

Default path is PATH=/sbin:/bin:/usr/sbin:/usr/bin and so vbmc commands fail.

failed: [localhost] (item=testing-opensuse-15) => {"ansible_loop_var": "item", "attempts": 10, "changed": true, "cmd": "vbmc add testing-opensuse-15 --libvirt-uri qemu:///system --port 62331 --username admin --password password\n", "delta": "0:00:00.001564", "end": "2020-08-16 15:48:12.140335", "item": "testing-opensuse-15", "msg": "non-zero return code", "rc": 127, "start": "2020-08-16 15:48:12.138771", "stderr": "/bin/bash: vbmc: command not found", "stderr_lines": ["/bin/bash: vbmc: command not found"], "stdout": "", "stdout_lines": []}

We might need to get the path of vbmc and call it directly, or modify the path when running vbmc commands.