# provisioning attempts on VPS and VirtualBox (vagrant) Ubuntu distros leads to different results

**URL:** <https://forum.ansible.com/t/provisioning-attempts-on-vps-and-virtualbox-vagrant-ubuntu-distros-leads-to-different-results/14906>\
**Category:** Ansible Project\
**Tags:** ubuntu, galaxy-ng\
**Created:** [April 1, 2014, 7:32pm UTC](https://forum.ansible.com/t/provisioning-attempts-on-vps-and-virtualbox-vagrant-ubuntu-distros-leads-to-different-results/14906 "2014-04-01T19:32:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gallagher\_Polyn](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@Gallagher\_Polyn](https://forum.ansible.com/u/Gallagher_Polyn)\
**Post date:** [April 1, 2014, 7:32pm UTC](https://forum.ansible.com/t/provisioning-attempts-on-vps-and-virtualbox-vagrant-ubuntu-distros-leads-to-different-results/14906/1 "2014-04-01T19:32:06Z")

</div>

I’m experimenting with Ansible (1.5) on VirtualBox (using Vagrant) and on a VPS. For this, I’ve been using a role from Ansible Galaxy (sgmac.rbenv - [galaxy.ansible.com/list#/roles/335.](http://galaxy.ansible.com/list#/roles/335.))

The role installs without error on my VirtualBox Ubuntu Lucid vm, but I encounter two fatal errors on my (Digital Ocean) VPS Lucid vm:

- Could not import python modules: apt, apt\_pkg. Please install python-apt package.

- (Then, after installing python-apt, manually,) stderr: rbenv: no such command `install’

Why would the base VMs be different? Can an issue like this be avoided by choice of another distro?

Thanks,

G

---

<div class="post-metadata">

**Author:** ![Paul\_Durivage](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Paul\_Durivage](https://forum.ansible.com/u/Paul_Durivage)\
**Post date:** [April 1, 2014, 8:07pm UTC](https://forum.ansible.com/t/provisioning-attempts-on-vps-and-virtualbox-vagrant-ubuntu-distros-leads-to-different-results/14906/2 "2014-04-01T20:07:21Z")

</div>

I think this is a side effect of the many package managers out there, and unfortunately, is the nature of the beast. Your VPS has chosen to image a version of Ubuntu that has fewer packages installed than your Vagrant VM.

This error you’re seeing with python-apt should be resolved in the next dot release: [https://github.com/ansible/ansible/issues/6530](https://github.com/ansible/ansible/issues/6530).

That’s pretty weird that you’re seeing some rbenv errors – I’m not sure how they’re related to python-apt. I’m a bit out of my league here (since these are both parts of the Ruby toolchain), but I think you’d benefit from reinstalling the latest version of rbenv and ruby-build via apt.

---

<div class="post-metadata">

**Author:** ![Gallagher\_Polyn](https://avatars.discourse-cdn.com/v4/letter/g/94ad74/32.png) [@Gallagher\_Polyn](https://forum.ansible.com/u/Gallagher_Polyn)\
**Post date:** [April 3, 2014, 7:19pm UTC](https://forum.ansible.com/t/provisioning-attempts-on-vps-and-virtualbox-vagrant-ubuntu-distros-leads-to-different-results/14906/3 "2014-04-03T19:19:08Z")

</div>

> I think this is a side effect of the many package managers out there, and unfortunately, is the nature of the beast. Your VPS has chosen to image a version of Ubuntu that has fewer packages installed than your Vagrant VM.

Yes, this is confirmed by at least one respondent to my question about this on Digital Ocean: [www.digitalocean.com/community/questions/why-are-my-virtualbox-ubuntu-images-different-from-the-same-do-distros](http://www.digitalocean.com/community/questions/why-are-my-virtualbox-ubuntu-images-different-from-the-same-do-distros)

Since my post, I’ve been encountering this difference between Digital Ocean Ubuntu VMs and my local VirtualBox development VMs routinely.

Thanks,

G
