Giter Club home page Giter Club logo

ansible-virtualbox's People

Contributors

dependabot[bot] avatar fgtatsuro avatar lawliet89 avatar ricofehr avatar stephane-monnot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ansible-virtualbox's Issues

apt-add-key and apt-get install fail at first run

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!

Invalid repository string: http://download.virtualbox.org/virtualbox/debian

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.