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.)
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
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.
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.
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
Since my post, I’ve been encountering this difference between Digital Ocean Ubuntu VMs and my local VirtualBox development VMs routinely.
Thanks,
G