fgtatsuro / ansible-virtualbox Goto Github PK
View Code? Open in Web Editor NEWAnsible role for virtualbox.
License: MIT License
Ansible role for virtualbox.
License: MIT License
Hi,
I step across with this issue lately when building a custom playbook to install my local Ubuntu machine. The first time I ran the playbook, this role throws an error when registering repository because no key can be found.
TASK [FGtatsuro.virtualbox : Run tasks on current environment] ****************************************************************************************************************************************************
included: /home/d70rr3s/.installer/roles/FGtatsuro.virtualbox/tasks/Debian.yml for localhost
TASK [FGtatsuro.virtualbox : Add key for the repository of VirtualBox] ********************************************************************************************************************************************
changed: [localhost]
TASK [FGtatsuro.virtualbox : Add key for the repository ov VirtualBox(latest distribution)] ***********************************************************************************************************************
skipping: [localhost]
TASK [FGtatsuro.virtualbox : Add the repository of VirtualBox] ****************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt.cache.FetchFailedException: W:GPG error: http://download.virtualbox.org/virtualbox/debian artful InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF, E:The repository 'http://download.virtualbox.org/virtualbox/debian artful InRelease' is not signed.
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_BBKb7l/ansible_module_apt_repository.py\", line 556, in <module>\n main()\n File \"/tmp/ansible_BBKb7l/ansible_module_apt_repository.py\", line 544, in main\n cache.update()\n File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 464, in update\n raise FetchFailedException(e)\napt.cache.FetchFailedException: W:GPG error: http://download.virtualbox.org/virtualbox/debian artful InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF, E:The repository 'http://download.virtualbox.org/virtualbox/debian artful InRelease' is not signed.\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
to retry, use: --limit @/home/d70rr3s/.installer/playbook.retry
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=84 changed=8 unreachable=0 failed=1
I thought maybe was an error when adding the key, so I implemented a pre-task to add it. At second run this step went well, but when installing the package I got No matching package found error.
TASK [FGtatsuro.virtualbox : Run tasks on current environment] ****************************************************************************************************************************************************
included: /home/d70rr3s/.installer/roles/FGtatsuro.virtualbox/tasks/Debian.yml for localhost
TASK [FGtatsuro.virtualbox : Add key for the repository of VirtualBox] ********************************************************************************************************************************************
ok: [localhost]
TASK [FGtatsuro.virtualbox : Add key for the repository ov VirtualBox(latest distribution)] ***********************************************************************************************************************
skipping: [localhost]
TASK [FGtatsuro.virtualbox : Add the repository of VirtualBox] ****************************************************************************************************************************************************
ok: [localhost]
TASK [FGtatsuro.virtualbox : Install VirtualBox] ******************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'virtualbox-5.1' is available"}
to retry, use: --limit @/home/d70rr3s/.installer/playbook.retry
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=85 changed=1 unreachable=0 failed=1
In this case I reviewed the installation task and I didn't see nothing wrong, actually when you added the repository were setting the task to trigger a registry update. I decide to run the apt-get update myself after that the role executed successfully.
As you can see I'm running an Ubuntu 17.10 and I was trying to install VirtualBox 5.1.
You can check out my playbook here.
Thanks!
I am using this role defined as follows in a playbook:
- { role: FGtatsuro.virtualbox,
virtualbox_apt_package: 'virtualbox-5.0',
virtualbox_apt_repository: 'http://download.virtualbox.org/virtualbox/debian',
virtualbox_allow_unauthenticated: no
}
As described here: https://github.com/FGtatsuro/ansible-virtualbox
I am receiving the following error:
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"filename": null,
"install_python_apt": true,
"mode": null,
"repo": "http://download.virtualbox.org/virtualbox/debian",
"state": "present",
"update_cache": true,
"validate_certs": true
},
"module_name": "apt_repository"
},
"msg": "Invalid repository string: http://download.virtualbox.org/virtualbox/debian"
}
Please let me know if there is anything else I can provide to help troubleshoot this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.