ansible-role-virtualbox-guest
ansible-role-virtualbox-guest copied to clipboard
On Debian and Mint desktop it fails to work
On Debian and Mint desktop it fails to work with several errors.
ISO image is missing on host. and also it skips download. thanks
Thanks for reporting - would you mind pasting the (relevant) Ansible logs, and version numbers you're using ? That 'll help troubleshooting.
@PeterMosmans I don't know if it helps, but I was having the same problem, for some reason it was not trying to download the ISO file. So I went to your code and remove this
- name: Copy ISO file from guest to host
copy:
src: "{{ local_virtualbox_iso }}"
dest: "{{ virtualbox_iso }}"
owner: root
group: root
mode: "0644"
when: local_virtualbox_iso is defined and virtualbox_iso is defined
- name: Check if the ISO file is present on the host
stat:
path: "{{ virtualbox_iso }}"
register: file_path
ignore_errors: yes
- name: Check if the CD is present on the host
stat:
path: "/dev/sr0"
register: file_path
ignore_errors: yes
when: file_path.stat is not defined or not file_path.stat.exists
Then it started to work (it downloaded the file, and when I put the code back it went fine)
I don't know if it is because I don't have the cd-rom (/dev/sr0) it was thinking that it was 'okay' and was going to try to use it or something else.
I don't have the debug log (I'm learning Ansible) but I have some basic logs here, I don't know if it helps
PLAY [Install VBox Guest] ****************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************
ok: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Remove OS installation of virtualbox guest additions] **********************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Determine the host version] ************************************************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Check if virtualbox_version could be determined] ***************************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Override virtualbox_version if defaults set to auto] ***********************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Determine if (the requested version of) vboxguestadditions is installed] ***************************************************
changed: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Copy ISO file from guest to host] ******************************************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Check if the ISO file is present on the host] ******************************************************************************
ok: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Check if the CD is present on the host] ************************************************************************************
ok: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : debug] *********************************************************************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Download ISO file when the requested version is not present on the host] ***************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Re-check if the ISO file is present on the host] ***************************************************************************
skipping: [lab-tftp-ftp-server-1]
TASK [PeterMosmans.virtualbox-guest : Fail if CD or ISO file is still not present on the host] *******************************************************************
fatal: [lab-tftp-ftp-server-1]: FAILED! => {"changed": false, "msg": "Could not find necessary CD or ISO file on the host, nor download it"}
If you need some more logs let me know how to enable and collect then so I can try to reproduce here.
Tks