ansible-role-virtualbox-guest icon indicating copy to clipboard operation
ansible-role-virtualbox-guest copied to clipboard

Sometimes a sudo password is required, sometimes not?

Open bartmcleod opened this issue 7 years ago • 2 comments

This task does not seem to be idempotent: [ansible-role-virtualbox-guest : If virtualbox_version is set to auto then determine the host version]

fatal: [default -> localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: a password is required\n", "module_stdout": "", "msg": "MODULE FAILURE"}

This error does not occur always, yet a lot of the times I try.

bartmcleod avatar Mar 09 '17 08:03 bartmcleod

Thanks for posting this issue. It looks like the error has something to do with... authentication... weird enough? It would be great if you could trace the error to a 'specific' state.

Thanks in advance.

PeterMosmans avatar Mar 09 '17 08:03 PeterMosmans

I locked it down to the following: If you have done nothing special, it will fail. If you have, before calling vagrant provision, entered your sudo password for anything (for example: create a directory in / on the host), it will pass. So it needs sudo permissions on the host for this task.

bartmcleod avatar Mar 09 '17 17:03 bartmcleod